-
Notifications
You must be signed in to change notification settings - Fork 234
Description
Describe the bug
go version go1.24.3 linux/amd64
These bug ocassionally happens. We got a segfault when call golang.NewIndex with correct parameter {0, 2, 128, 0, 0, 0, false}
SIGSEGV: segmentation violation
PC=0x7ff4a394b242 m=19 sigcode=1 addr=0x15c6
signal arrived during cgo execution
goroutine 35218 gp=0xc00be2bdc0 m=19 mp=0xc001001008 [syscall]:
runtime.cgocall(0x401c3a0, 0xc00acc2c18)
/data/xupeng/code/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.linux-amd64/src/runtime/cgocall.go:167 +0x4b fp=0xc00acc2bf0 sp=0xc00acc2bb8 pc=0x47e0cb
github.com/unum-cloud/usearch/golang._Cfunc_usearch_init(0xc02b7dc980, 0xc0384cae08)
_cgo_gotypes.go:414 +0x47 fp=0xc00acc2c18 sp=0xc00acc2bf0 pc=0x1a58067
github.com/unum-cloud/usearch/golang.NewIndex.func1(...)
/data/xupeng/code/pkg/mod/github.com/unum-cloud/usearch/golang@v0.0.0-20250207215718-306d6646b8f5/lib.go:180
github.com/unum-cloud/usearch/golang.NewIndex({0x0, 0x2, 0x80, 0x0, 0x0, 0x0, 0x0})
/data/xupeng/code/pkg/mod/github.com/unum-cloud/usearch/golang@v0.0.0-20250207215718-306d6646b8f5/lib.go:180 +0x245 fp=0xc00acc2c98 sp=0xc00acc2c18 pc=0x1a59145
github.com/matrixorigin/matrixone/pkg/vectorindex/hnsw.NewHnswBuildIndex({0xc038c9701a, 0x6}, {{0x53b02d9, 0x4}, {0x0, 0x2, 0x80, 0x0, 0x0, 0x0, ...}, ...}, ...)
/home/xupeng/github/matrixone/pkg/vectorindex/hnsw/build.go:68 +0xa5 fp=0xc00acc2ce0 sp=0xc00acc2c98 pc=0x34fb465
github.com/matrixorigin/matrixone/pkg/vectorindex/hnsw.(*HnswBuild).getIndexForAdd(0xc0131c7ba0)
/home/xupeng/github/matrixone/pkg/vectorindex/hnsw/build.go:351 +0x33e fp=0xc00acc2e30 sp=0xc00acc2ce0 pc=0x34fcfde
github.com/matrixorigin/matrixone/pkg/vectorindex/hnsw.(*HnswBuild).getIndexForAddSync(0x48b6420?)
/home/xupeng/github/matrixone/pkg/vectorindex/hnsw/build.go:343 +0x99 fp=0xc00acc2e90 sp=0xc00acc2e30 pc=0x34fcbb9
github.com/matrixorigin/matrixone/pkg/vectorindex/hnsw.(*HnswBuild).addVectorSync(0xc0477bc720?, 0x2630, {0xc029cc3e00, 0x80, 0x80})
/home/xupeng/github/matrixone/pkg/vectorindex/hnsw/build.go:388 +0x27 fp=0xc00acc2ed0 sp=0xc00acc2e90 pc=0x34fd107
github.com/matrixorigin/matrixone/pkg/vectorindex/hnsw.(*HnswBuild).addFromChannel(0xc0131c7ba0, 0xc03abbea80)
/home/xupeng/github/matrixone/pkg/vectorindex/hnsw/build.go:286 +0xd6 fp=0xc00acc2f80 sp=0xc00acc2ed0 pc=0x34fc536
github.com/matrixorigin/matrixone/pkg/vectorindex/hnsw.NewHnswBuild.func1()
/home/xupeng/github/matrixone/pkg/vectorindex/hnsw/build.go:259 +0x7e fp=0xc00acc2fe0 sp=0xc00acc2f80 pc=0x34fc37e
runtime.goexit({})
/data/xupeng/code/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.linux-amd64/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00acc2fe8 sp=0xc00acc2fe0 pc=0x48a361
created by github.com/matrixorigin/matrixone/pkg/vectorindex/hnsw.NewHnswBuild in goroutine 34912
/home/xupeng/github/matrixone/pkg/vectorindex/hnsw/build.go:254 +0x2b0
Steps to reproduce
IndexConfig = {0, 2, 128, 0, 0, 0, false}
call usearch.NewIndex(IndexConfig{usearch.F32, usearch.L2sq, 128, 0, 0, 0, false})
It is not always reproducible.
Expected behavior
empty index returns without error.
USearch version
v2.17.1
Operating System
Ubuntu 22.04
Hardware architecture
x86
Which interface are you using?
Other bindings
Contact Details
Are you open to being tagged as a contributor?
- I am open to being mentioned in the project
.githistory as a contributor
Is there an existing issue for this?
- I have searched the existing issues
Code of Conduct
- I agree to follow this project's Code of Conduct