Go-sqlite3: Signal:killed during init of go-sqlite

Created on 28 Mar 2017  路  18Comments  路  Source: mattn/go-sqlite3

I just have installed the latest version (go get github.com/mattn/go-sqlite3) and tried out an example from the _examples directory. Now the output is: signal: killed and I don't know how to debug.

EDIT
Some further investigation pointed out that:

package main

import (
    "fmt"

    _ "github.com/mattn/go-sqlite3"
)

func main() {
    fmt.Println("test")
}

Also results in signal killed.

screen shot 2017-03-28 at 12 54 24

Most helpful comment

All 18 comments

Could you please show me your memory usages?

seeing the same issue here

@rogierlommers are you on a mac?
My current suspicion is that this has something to do with the latest version of OS X or Xcode (I am running the latest of both).

Having the same issue:

clang -v
Apple LLVM version 8.1.0 (clang-802.0.38)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

This works when clang is 8.0.0.

screen shot 2017-03-28 at 9 19 58 am

Seems to be occured on macOSX. AFAICS, Linux and Windows works well.

Yep, working on a mac; all updates applied. So most probably it's related to the latest Sierra update (from yesterday)

Apple LLVM version 8.1.0 (clang-802.0.38)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

It was definitely broken even before I updated Sierra this morning.
So I think it could be the Xcode update... (and clang as a result?)

edit: yes looks like Xcode 8.2 was the older version of clang: https://gist.github.com/yamaya/2924292#file-xcode-clang-vers-L184

In case it helps anyone (in the mean time).
You can download old version of Xcode (you must be logged in) from here: https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_8.2.1/Xcode_8.2.1.xip

Move that into your Applications folder as Xcode_821.app

and then:
sudo xcode-select -s /Applications/Xcode_821.app/Contents/Developer

So since it's not go-sqlit3 related, shall we close this one?

I would say probably leave this open to avoid more issues being opened and to track the ongoing work until their issue is resolved.

I don't mind leave this open. Feel free to open/close this (if time to come)

Same here.

seeing the same issue here.
when I excuted in command line, demo is running ok
cmd

But it run faild in vscode when i debug, every Exec() or Prepare() can not excute.

2017/04/06 21:18:18 server.go:73: Using API v1
2017/04/06 21:18:18 debugger.go:68: launching process with args: [d:\Workspace\golang\src\webservice\debug]
API server listening at: 127.0.0.1:2345
2017/04/06 21:18:19 debugger.go:259: created breakpoint: &api.Breakpoint{ID:1, Name:"", Addr:0x73a8d7, File:"D:/Workspace/golang/src/webservice/sqltest.go", Line:25, FunctionName:"main.main", Cond:"", Tracepoint:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(nil), LoadLocals:(*api.LoadConfig)(nil), HitCount:map[string]uint64{}, TotalHitCount:0x0}
2017/04/06 21:18:19 debugger.go:259: created breakpoint: &api.Breakpoint{ID:2, Name:"", Addr:0x73ab7c, File:"D:/Workspace/golang/src/webservice/sqltest.go", Line:34, FunctionName:"main.main", Cond:"", Tracepoint:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(nil), LoadLocals:(*api.LoadConfig)(nil), HitCount:map[string]uint64{}, TotalHitCount:0x0}
2017/04/06 21:18:19 debugger.go:414: continuing
Exception 0xc0000005 0x8 0x9632f8 0x9632f8
PC=0x9632f8
signal arrived during external code execution
github.com/mattn/go-sqlite3._Cfunc_sqlite3_prepare_v2(0x1624c78, 0x1628490, 0xc0ffffffff, 0xc042004038, 0xc042004040, 0x0)
    github.com/mattn/go-sqlite3/_obj/_cgo_gotypes.go:780 +0x54
github.com/mattn/go-sqlite3.(*SQLiteConn).prepare.func2(0x1624c78, 0x1628490, 0xffffffff, 0xc042004038, 0xc042004040, 0x77bda0)
    D:/Workspace/golang/src/github.com/mattn/go-sqlite3/sqlite3.go:697 +0x1b1
github.com/mattn/go-sqlite3.(*SQLiteConn).prepare(0xc04200c500, 0x15140c0, 0xc042010360, 0x7f1c4b, 0x62, 0x0, 0x0, 0x0, 0x0)
    D:/Workspace/golang/src/github.com/mattn/go-sqlite3/sqlite3.go:697 +0x119
github.com/mattn/go-sqlite3.(*SQLiteConn).exec(0xc04200c500, 0x15140c0, 0xc042010360, 0x7f1c4b, 0x62, 0x9b4298, 0x0, 0x0, 0x4b01ab, 0x9b41c8, ...)
    D:/Workspace/golang/src/github.com/mattn/go-sqlite3/sqlite3.go:433 +0xb2
github.com/mattn/go-sqlite3.(*SQLiteConn).ExecContext(0xc04200c500, 0x9698a0, 0xc042010360, 0x7f1c4b, 0x62, 0x9b4298, 0x0, 0x0, 0x1514070, 0x4f35a0, ...)
    D:/Workspace/golang/src/github.com/mattn/go-sqlite3/sqlite3_go18.go:40 +0x262
database/sql.ctxDriverExec(0x9698a0, 0xc042010360, 0x1514070, 0xc04200c500, 0x7f1c4b, 0x62, 0x9b4298, 0x0, 0x0, 0x4cd9b5, ...)
    D:/Program_Files/go/go64/src/database/sql/ctxutil.go:31 +0x294
database/sql.(*DB).exec.func2()
    D:/Program_Files/go/go64/src/database/sql/sql.go:1199 +0xa0
database/sql.withLock(0x966da0, 0xc042034070, 0xc04206f590)

web

go version: go1.8 windows/amd64
os: windows10 64 bit
gcc version: gcc (Rev2, Built by MSYS2 project) 6.3.0 64 bit
vscode version: 1.10.2
go plugin: 0.6.59

@swordyang that seems to be a separate issue. The one being tracked here is the program being killed by the system even when the package is just imported and it seems to be a bug in Go on macOS. I would suggest opening a separate issue for what you are seeing.

Go 1.8.1 is now release and i just tested this problem on my mac and it now seems to be fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eaglebush picture eaglebush  路  7Comments

ghost picture ghost  路  6Comments

apertureless picture apertureless  路  4Comments

dylanlyu picture dylanlyu  路  6Comments

student020341 picture student020341  路  9Comments