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

fatal error: checkptr: converted pointer straddles multiple allocations #72

Closed
xiangwanpeng opened this issue Jan 6, 2023 · 0 comments · Fixed by #73
Closed

fatal error: checkptr: converted pointer straddles multiple allocations #72

xiangwanpeng opened this issue Jan 6, 2023 · 0 comments · Fixed by #73
Assignees

Comments

@xiangwanpeng
Copy link
Contributor

Describe this problem

This error occurs when executing unit tests with the -race option on the boltdb module. (Reference: golang/go#34964)
The maintenance of boltdb seems no longer active and they have not fixed this issue.

To Reproduce

Execute the following command in the project root directory:

cd internal/meta/metadata/storage && go test -race

Expected behavior

The following error will occur:

fatal error: checkptr: converted pointer straddles multiple allocations

goroutine 20 [running]:
runtime.throw({0x100354719?, 0x100298bc0?})
        /usr/local/go/src/runtime/panic.go:1047 +0x40 fp=0xc0000585e0 sp=0xc0000585b0 pc=0x10017bd50
runtime.checkptrAlignment(0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/checkptr.go:26 +0x7c fp=0xc000058600 sp=0xc0000585e0 pc=0x10014bc4c
github.com/boltdb/bolt.(*page).leafPageElement(...)
        /Users/wanpeng.xwp/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/page.go:59
github.com/boltdb/bolt.(*node).write(0xc00018fdc0, 0xc000138250)
        /Users/wanpeng.xwp/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/node.go:216 +0x244 fp=0xc000058790 sp=0xc000058600 pc=0x100298dd4
github.com/boltdb/bolt.(*Bucket).write(0xc000178a80)
        /Users/wanpeng.xwp/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/bucket.go:627 +0x1c0 fp=0xc000058820 sp=0xc000058790 pc=0x10028f280
github.com/boltdb/bolt.(*Bucket).spill(0xc0001a2018)
        /Users/wanpeng.xwp/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/bucket.go:535 +0x148 fp=0xc000058b00 sp=0xc000058820 pc=0x10028ea28
github.com/boltdb/bolt.(*Tx).Commit(0xc0001a2000)
        /Users/wanpeng.xwp/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/tx.go:163 +0x11c fp=0xc000058cf0 sp=0xc000058b00 pc=0x10029d7cc
github.com/boltdb/bolt.(*DB).Update(0x100348137?, 0xc000058dc8)
        /Users/wanpeng.xwp/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/db.go:605 +0xf0 fp=0xc000058da0 sp=0xc000058cf0 pc=0x100294d30
github.com/tatris-io/tatris/internal/meta/metadata/storage.(*BoltMetaStore).Set(0xc00012a050, {0x100348137, 0xa}, {0xc00012edde, 0x2, 0x2})
        /Users/wanpeng.xwp/github/tatris-io/tatris/internal/meta/metadata/storage/boltdb.go:56 +0xb0 fp=0xc000058e20 sp=0xc000058da0 pc=0x100345670
github.com/tatris-io/tatris/internal/meta/metadata/storage.TestBoltMetaStore_Get.func1(0x0?)
        /Users/wanpeng.xwp/github/tatris-io/tatris/internal/meta/metadata/storage/boltdb_test.go:15 +0x80 fp=0xc000058e90 sp=0xc000058e20 pc=0x100345ce0
testing.tRunner(0xc00010b860, 0xc00016e2a0)
        /usr/local/go/src/testing/testing.go:1446 +0x18c fp=0xc000058fa0 sp=0xc000058e90 pc=0x100236ddc
testing.(*T).Run.func1()
        /usr/local/go/src/testing/testing.go:1493 +0x44 fp=0xc000058fd0 sp=0xc000058fa0 pc=0x100237f44
runtime.goexit()
        /usr/local/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0xc000058fd0 sp=0xc000058fd0 pc=0x1001afbe4
created by testing.(*T).Run
        /usr/local/go/src/testing/testing.go:1493 +0x560

Additional Information

None.

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

Successfully merging a pull request may close this issue.

1 participant