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

Testing with go race checker fails #35

Open
aradwann opened this issue Jul 7, 2023 · 1 comment
Open

Testing with go race checker fails #35

aradwann opened this issue Jul 7, 2023 · 1 comment

Comments

@aradwann
Copy link

aradwann commented Jul 7, 2023

when running go test ./... -v -race
it fails with


➜  raft-boltdb git:(master) go test ./... -v -race
=== RUN   TestBoltStore_Implements
--- PASS: TestBoltStore_Implements (0.00s)
=== RUN   TestBoltOptionsTimeout
fatal error: checkptr: converted pointer straddles multiple allocations

goroutine 7 [running]:
runtime.throw({0x7b999f?, 0x69ee01?})
        /usr/lib/golang/src/runtime/panic.go:1047 +0x5d fp=0xc0000958b0 sp=0xc000095880 pc=0x46e41d
runtime.checkptrAlignment(0x0?, 0x3?, 0x4a6b19?)
        /usr/lib/golang/src/runtime/checkptr.go:26 +0x6c fp=0xc0000958d0 sp=0xc0000958b0 pc=0x43e32c
github.com/boltdb/bolt.(*Bucket).write(0xc000095a68)
        /home/ahmedradwan/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/bucket.go:626 +0x211 fp=0xc000095960 sp=0xc0000958d0 pc=0x6a0d71
github.com/boltdb/bolt.(*Bucket).CreateBucket(0xc0000f02b8, {0x98c380, 0x4, 0x4})
        /home/ahmedradwan/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/bucket.go:188 +0x3e9 fp=0xc000095b50 sp=0xc000095960 pc=0x69eee9
github.com/boltdb/bolt.(*Bucket).CreateBucketIfNotExists(0x431580?, {0x98c380, 0x4, 0x4})
        /home/ahmedradwan/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/bucket.go:206 +0x4f fp=0xc000095ba0 sp=0xc000095b50 pc=0x69f1af
github.com/boltdb/bolt.(*Tx).CreateBucketIfNotExists(...)
        /home/ahmedradwan/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/tx.go:115
github.com/hashicorp/raft-boltdb.(*BoltStore).initialize(0xc0000125e8)
        /home/ahmedradwan/Documents/learning/repos/raft-boltdb/bolt_store.go:100 +0xeb fp=0xc000095c48 sp=0xc000095ba0 pc=0x72972b
github.com/hashicorp/raft-boltdb.New({{0xc00001a2b8, 0x13}, 0xc0000201a0, 0x0})
        /home/ahmedradwan/Documents/learning/repos/raft-boltdb/bolt_store.go:83 +0x19c fp=0xc000095cd0 sp=0xc000095c48 pc=0x72957c
github.com/hashicorp/raft-boltdb.TestBoltOptionsTimeout(0xc0000c2ea0)
        /home/ahmedradwan/Documents/learning/repos/raft-boltdb/bolt_store_test.go:61 +0x299 fp=0xc000095ea8 sp=0xc000095cd0 pc=0x72e9f9
testing.tRunner(0xc0000c2ea0, 0x7d6c00)
        /usr/lib/golang/src/testing/testing.go:1576 +0x217 fp=0xc000095fb0 sp=0xc000095ea8 pc=0x56a557
testing.(*T).Run.func1()
        /usr/lib/golang/src/testing/testing.go:1629 +0x48 fp=0xc000095fe0 sp=0xc000095fb0 pc=0x56c068
runtime.goexit()
        /usr/lib/golang/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000095fe8 sp=0xc000095fe0 pc=0x4a53a1
created by testing.(*T).Run
        /usr/lib/golang/src/testing/testing.go:1629 +0x806

goroutine 1 [chan receive]:
runtime.gopark(0xc0000db730?, 0x444b55?, 0x80?, 0x15?, 0x0?)
        /usr/lib/golang/src/runtime/proc.go:381 +0xd6 fp=0xc0000db6b0 sp=0xc0000db690 pc=0x471196
runtime.chanrecv(0xc00007c150, 0xc0000db7ae, 0x1)
        /usr/lib/golang/src/runtime/chan.go:583 +0x42e fp=0xc0000db740 sp=0xc0000db6b0 pc=0x43db0e
runtime.chanrecv1(0x9d1760?, 0x753220?)
        /usr/lib/golang/src/runtime/chan.go:442 +0x18 fp=0xc0000db768 sp=0xc0000db740 pc=0x43d678
testing.(*T).Run(0xc0000c29c0, {0x7af075, 0x16}, 0x7d6c00)
        /usr/lib/golang/src/testing/testing.go:1630 +0x82e fp=0xc0000db8a8 sp=0xc0000db768 pc=0x56bdce
testing.runTests.func1(0x0?)
        /usr/lib/golang/src/testing/testing.go:2036 +0x8e fp=0xc0000db900 sp=0xc0000db8a8 pc=0x56f92e
testing.tRunner(0xc0000c29c0, 0xc0000dbb48)
        /usr/lib/golang/src/testing/testing.go:1576 +0x217 fp=0xc0000dba08 sp=0xc0000db900 pc=0x56a557
testing.runTests(0xc0000a8f00?, {0x9c7ee0, 0xc, 0xc}, {0x1c?, 0x4a6b19?, 0x9d1b20?})
        /usr/lib/golang/src/testing/testing.go:2034 +0x87d fp=0xc0000dbb78 sp=0xc0000dba08 pc=0x56f77d
testing.(*M).Run(0xc0000a8f00)
        /usr/lib/golang/src/testing/testing.go:1906 +0xb45 fp=0xc0000dbed8 sp=0xc0000dbb78 pc=0x56cfe5
main.main()
        _testmain.go:89 +0x2ea fp=0xc0000dbf80 sp=0xc0000dbed8 pc=0x73476a
runtime.main()
        /usr/lib/golang/src/runtime/proc.go:250 +0x207 fp=0xc0000dbfe0 sp=0xc0000dbf80 pc=0x470d47
runtime.goexit()
        /usr/lib/golang/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000dbfe8 sp=0xc0000dbfe0 pc=0x4a53a1

goroutine 2 [force gc (idle)]:
runtime.gopark(0x9d2300?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/golang/src/runtime/proc.go:381 +0xd6 fp=0xc0000527b0 sp=0xc000052790 pc=0x471196
runtime.goparkunlock(...)
        /usr/lib/golang/src/runtime/proc.go:387
runtime.forcegchelper()
        /usr/lib/golang/src/runtime/proc.go:305 +0xb0 fp=0xc0000527e0 sp=0xc0000527b0 pc=0x470fd0
runtime.goexit()
        /usr/lib/golang/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000527e8 sp=0xc0000527e0 pc=0x4a53a1
created by runtime.init.6
        /usr/lib/golang/src/runtime/proc.go:293 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/golang/src/runtime/proc.go:381 +0xd6 fp=0xc000060f80 sp=0xc000060f60 pc=0x471196
runtime.goparkunlock(...)
        /usr/lib/golang/src/runtime/proc.go:387
runtime.bgsweep(0x0?)
        /usr/lib/golang/src/runtime/mgcsweep.go:278 +0x8e fp=0xc000060fc8 sp=0xc000060f80 pc=0x45b4ce
runtime.gcenable.func1()
        /usr/lib/golang/src/runtime/mgc.go:178 +0x26 fp=0xc000060fe0 sp=0xc000060fc8 pc=0x4507a6
runtime.goexit()
        /usr/lib/golang/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000060fe8 sp=0xc000060fe0 pc=0x4a53a1
created by runtime.gcenable
        /usr/lib/golang/src/runtime/mgc.go:178 +0x6b

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc00007c000?, 0x822ab0?, 0x1?, 0x0?, 0x0?)
        /usr/lib/golang/src/runtime/proc.go:381 +0xd6 fp=0xc000066f70 sp=0xc000066f50 pc=0x471196
runtime.goparkunlock(...)
        /usr/lib/golang/src/runtime/proc.go:387
runtime.(*scavengerState).park(0x9d1ba0)
        /usr/lib/golang/src/runtime/mgcscavenge.go:400 +0x53 fp=0xc000066fa0 sp=0xc000066f70 pc=0x459413
runtime.bgscavenge(0x0?)
        /usr/lib/golang/src/runtime/mgcscavenge.go:628 +0x45 fp=0xc000066fc8 sp=0xc000066fa0 pc=0x4599c5
runtime.gcenable.func2()
        /usr/lib/golang/src/runtime/mgc.go:179 +0x26 fp=0xc000066fe0 sp=0xc000066fc8 pc=0x450746
runtime.goexit()
        /usr/lib/golang/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000066fe8 sp=0xc000066fe0 pc=0x4a53a1
created by runtime.gcenable
        /usr/lib/golang/src/runtime/mgc.go:179 +0xaa

goroutine 5 [finalizer wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/golang/src/runtime/proc.go:381 +0xd6 fp=0xc000061e28 sp=0xc000061e08 pc=0x471196
runtime.runfinq()
        /usr/lib/golang/src/runtime/mfinal.go:193 +0x13d fp=0xc000061fe0 sp=0xc000061e28 pc=0x44f7dd
runtime.goexit()
        /usr/lib/golang/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000061fe8 sp=0xc000061fe0 pc=0x4a53a1
created by runtime.createfing
        /usr/lib/golang/src/runtime/mfinal.go:163 +0x45
FAIL    github.com/hashicorp/raft-boltdb        0.010s
FAIL
@pauldicarlo
Copy link

Any resolution on this? I'm seeing it as well.

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

2 participants