Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal:killed during init of go-sqlite #402

Closed
rogierlommers opened this issue Mar 28, 2017 · 19 comments
Closed

Signal:killed during init of go-sqlite #402

rogierlommers opened this issue Mar 28, 2017 · 19 comments

Comments

@rogierlommers
Copy link

rogierlommers commented Mar 28, 2017

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

@mattn
Copy link
Owner

mattn commented Mar 28, 2017

Could you please show me your memory usages?

@itspage
Copy link

itspage commented Mar 28, 2017

seeing the same issue here

@itspage
Copy link

itspage commented Mar 28, 2017

@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).

@joefitzgerald
Copy link

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.

@joefitzgerald
Copy link

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

@mattn
Copy link
Owner

mattn commented Mar 28, 2017

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

@rogierlommers
Copy link
Author

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

@itspage
Copy link

itspage commented Mar 28, 2017

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

@itspage
Copy link

itspage commented Mar 28, 2017

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

@joefitzgerald
Copy link

golang/go#19734

@rogierlommers
Copy link
Author

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

@rking788
Copy link

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

@mattn
Copy link
Owner

mattn commented Mar 30, 2017

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

@mingrammer
Copy link

Same here.

@nuxwork
Copy link

nuxwork commented Apr 6, 2017

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

@rking788
Copy link

rking788 commented Apr 6, 2017

@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.

@mattn
Copy link
Owner

mattn commented Apr 6, 2017

See #404

@rking788
Copy link

rking788 commented Apr 7, 2017

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

@sychikov
Copy link

Got the same issue. Ubuntu 5.15.0-53-generic
go version go1.23.0 linux/amd64
Things that worked for MacOS didn't helped. Any ideas how to fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants