migrate
migrate copied to clipboard
Loading the sqlite3 driver suddenly crashes the process on launch
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.
Cannot allocate memory
I think the machine is just out of memory.
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.
I'm having the same issue on another project. Unfortunately: https://github.com/mattn/go-sqlite3/issues/402 :(
Oh dear, it goes deep… https://github.com/golang/go/issues/19734