signal arrived during cgo execution
SIGSEGV: segmentation violation PC=0x7660475c m=7 sigcode=1 addr=0x9395d23b signal arrived during cgo execution
goroutine 116 gp=0x24cec68 m=7 mp=0x2104508 [syscall]:
runtime.cgocall(0xd0b580, 0x252c728)
/go/go1.23.1/src/runtime/cgocall.go:167 +0x50 fp=0x252c710 sp=0x252c6f8 pc=0xd71b8
github.com/mattn/go-sqlite3._Cfunc__sqlite3_open_v2(0x75924580, 0x314e428, 0x10006, 0x0)
_cgo_gotypes.go:318 +0x38 fp=0x252c724 sp=0x252c710 pc=0x71e8cc
github.com/mattn/go-sqlite3.(*SQLiteDriver).Open.func2(0x75924580, 0x314e428, 0x10000)
/workspace/golang/pkg/mod/github.com/mattn/[email protected]+incompatible/sqlite3.go:1359 +0x64 fp=0x252c740 sp=0x252c724 pc=0x72de6c
github.com/mattn/go-sqlite3.(*SQLiteDriver).Open(0x212cca0, {0x1495f77, 0x17})
/workspace/golang/pkg/mod/github.com/mattn/[email protected]+incompatible/sqlite3.go:1359 +0x2a9c fp=0x252ca24 sp=0x252c740 pc=0x72b4e4
database/sql.dsnConnector.Connect(...)
/go/go1.23.1/src/database/sql/sql.go:801
database/sql.(*dsnConnector).Connect(0x265b640, {0x1639b70, 0x1f45708})
I just hit a similar issue:
database/sql.(*DB).QueryRowContext(...)
' /usr/local/go/src/database/sql/sql.go:1733 +0xc5 fp=0xc000768fc8 sp=0xc000768f38 pc=0x1273dc5
'database/sql.(*DB).QueryContext(0xc00127a080?, {0x26f0ea0?, 0xc0012700e0?}, {0x237815b?, 0xb?}, {0xc000769070?, 0xc000e1d0a0?, 0x3?})
' /usr/local/go/src/database/sql/sql.go:1568 +0x42 fp=0xc000768f38 sp=0xc000768ef0 pc=0x1272702
'database/sql.(*DB).retry(0x10?, 0xc000768f60)
' /usr/local/go/src/database/sql/sql.go:1734 +0x4f fp=0xc000768ef0 sp=0xc000768e88 pc=0x1273eaf
database/sql.(*DB).QueryContext.func1(0x90?)
' /usr/local/go/src/database/sql/sql.go:1751 +0x57 fp=0xc000768e88 sp=0xc000768e10 pc=0x1274017
'database/sql.(*DB).query(0xc0011ce270, {0x26f0ea0, 0xc0012700e0}, {0x237815b, 0x34}, {0xc000769070, 0x1, 0x1}, 0x0?)
' /usr/local/go/src/database/sql/sql.go:1423 +0x87e fp=0xc000768e10 sp=0xc000768c70 pc=0x12719be
'database/sql.(*DB).conn(0xc0011ce270, {0x26f0ea0, 0xc0012700e0}, 0x1)
' <autogenerated>:1 +0x31 fp=0xc000768c70 sp=0xc000768c48 pc=0x127dab1
'database/sql.(*dsnConnector).Connect(0xc0011ce290?, {0x20?, 0x10001266390?})
' /usr/local/go/src/database/sql/sql.go:801
database/sql.dsnConnector.Connect(...)
' /volume/code/go/vendor/[github.com/mattn/go-sqlite3/sqlite3.go:1343](http://github.com/mattn/go-sqlite3/sqlite3.go:1343) +0x2506 fp=0xc000768c48 sp=0xc0007686a8 pc=0x1ad2b46
'[github.com/mattn/go-sqlite3](http://github.com/mattn/go-sqlite3).(*SQLiteDriver).Open(0xc0000ad5a0, {0xc00118e3c0, 0x5d})
' /volume/code/go/vendor/[github.com/mattn/go-sqlite3/sqlite3.go:1343](http://github.com/mattn/go-sqlite3/sqlite3.go:1343) +0x65 fp=0xc0007686a8 sp=0xc000768668 pc=0x1ad5805
'[github.com/mattn/go-sqlite3](http://github.com/mattn/go-sqlite3).(*SQLiteDriver).Open.func2(0x7a0ba8000b60, 0xc000e1d220, 0x231a9b6?)
' _cgo_gotypes.go:300 +0x4b fp=0xc000768668 sp=0xc000768640 pc=0x1ac582b
'[github.com/mattn/go-sqlite3._Cfunc__sqlite3_open_v2](http://github.com/mattn/go-sqlite3._Cfunc__sqlite3_open_v2)(0x7a0ba8000b60, 0xc000e1d220, 0x10006, 0x0)
' /usr/local/go/src/runtime/cgocall.go:167 +0x4b fp=0xc000768640 sp=0xc000768608 pc=0x47084b
'runtime.cgocall(0x1b73f90, 0xc000768668)
'goroutine 460 gp=0xc002cffa40 m=12 mp=0xc001002008 [syscall]:
signal arrived during cgo execution
'PC=0x0 m=12 sigcode=1 addr=0x0
SIGSEGV: segmentation violation
@mikestefanello please provide more details. What version of this library are you using? What version of Go are you using? Do you have a minimal reproducer?
@rittneje My apologies, I should have dug in further before posting. For now, please disregard my comment. This was a one-off event and it turns out the app is incorrectly using a retracted v2 release of this lib. I'll report back if I can reproduce using the latest release.