migrate icon indicating copy to clipboard operation
migrate copied to clipboard

Loading the sqlite3 driver suddenly crashes the process on launch

Open liclac opened this issue 8 years ago • 4 comments

I'm… honestly not sure how or why this happens, but a Go program containing just this:

package main

import (
    _ "github.com/mattes/migrate/driver/sqlite3"
)

func main() {
}

Gets killed by the kernel at launch on my machine. Running it through lldb gets me:

error: error: ::posix_spawnp ( pid => 39157, path = '/path/to/binary', file_actions = 0x7fff5a4513a8, attr = 0x7fff5a4513b8, argv = 0x7fb73bccce50, envp = 0x7fb73bcc8000 ) err = Cannot allocate memory (0x0000000c)

Here's my go env:

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/uppfinnarn/Projects/Go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.8/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.8/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7n/2c0src0x3rzdwj6jwmqy3h1c0000gn/T/go-build573944345=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

Oddly enough, this did not happen just a few weeks ago, then an existing codebase containing this line of code just… stopped running. I'm not even sure what changed to make this happen.

Sorry for the confused bug report, but I have no idea where to even begin to debug this.

liclac avatar Apr 02 '17 13:04 liclac

Cannot allocate memory

I think the machine is just out of memory.

mattes avatar Apr 02 '17 20:04 mattes

Ah, I should have specified that the machine has over 10GB of free RAM, hence my confusion… tested straight after a reboot as well, so there shouldn't be any memory fragmentation playing tricks on me either.

liclac avatar Apr 02 '17 21:04 liclac

I'm having the same issue on another project. Unfortunately: https://github.com/mattn/go-sqlite3/issues/402 :(

gravis avatar Apr 03 '17 00:04 gravis

Oh dear, it goes deep… https://github.com/golang/go/issues/19734

liclac avatar Apr 03 '17 01:04 liclac