Skip to content

"fatal error: checkptr: unsafe pointer conversion" in test #6371

Closed

Description

@calmh

Using Go 1.14 as @imsodin already noted in spaolacci/murmur3#29:

jb@kvin:../syncthing/syncthing % ./build.sh test
ok  	github.com/syncthing/syncthing/lib/api	13.745s
ok  	github.com/syncthing/syncthing/lib/auto	0.224s
ok  	github.com/syncthing/syncthing/lib/beacon	0.523s
ok  	github.com/syncthing/syncthing/lib/build	0.349s
ok  	github.com/syncthing/syncthing/lib/config	0.420s
ok  	github.com/syncthing/syncthing/lib/connections	7.285s
ok  	github.com/syncthing/syncthing/lib/connections/registry	0.361s
fatal error: checkptr: unsafe pointer conversion

goroutine 264 [running]:
runtime.throw(0x4929e54, 0x23)
	/usr/local/Cellar/go/1.14/libexec/src/runtime/panic.go:1112 +0x72 fp=0xc0002a3a50 sp=0xc0002a3a20 pc=0x4036992
runtime.checkptrAlignment(0xc0001bc631, 0x4858bc0, 0x1)
	/usr/local/Cellar/go/1.14/libexec/src/runtime/checkptr.go:13 +0xd0 fp=0xc0002a3a80 sp=0xc0002a3a50 pc=0x4008980
github.com/spaolacci/murmur3.(*digest128).bmix(0xc000b235c0, 0xc0001bc631, 0x20, 0x2f, 0x0, 0x48, 0x58)
	/Users/jb/go/pkg/mod/github.com/spaolacci/[email protected]/murmur128.go:67 +0xc0 fp=0xc0002a3ae8 sp=0xc0002a3a80 pc=0x473b9e0
github.com/spaolacci/murmur3.(*digest).Write(0xc000b235c0, 0xc0001bc631, 0x20, 0x2f, 0x473b464, 0xc000b235c0, 0xc000b235c0)
	/Users/jb/go/pkg/mod/github.com/spaolacci/[email protected]/murmur.go:51 +0x127 fp=0xc0002a3b98 sp=0xc0002a3ae8 pc=0x473adc7
github.com/spaolacci/murmur3.(*digest128).Write(0xc000b235c0, 0xc0001bc631, 0x20, 0x2f, 0x10, 0x10, 0x21)
	<autogenerated>:1 +0x6a fp=0xc0002a3bf8 sp=0xc0002a3b98 pc=0x473c57a
github.com/willf/bloom.baseHashes(0xc0001bc631, 0x20, 0x2f, 0x0, 0x0, 0x0, 0x0)
	/Users/jb/go/pkg/mod/github.com/willf/[email protected]+incompatible/bloom.go:97 +0xb9 fp=0xc0002a3c68 sp=0xc0002a3bf8 pc=0x4744169
github.com/willf/bloom.(*BloomFilter).Test(0xc000134de0, 0xc0001bc631, 0x20, 0x2f, 0x4a11c00)
	/Users/jb/go/pkg/mod/github.com/willf/[email protected]+incompatible/bloom.go:183 +0x6b fp=0xc0002a3d20 sp=0xc0002a3c68 pc=0x4744e9b
github.com/syncthing/syncthing/lib/db.(*Lowlevel).gcBlocks(0xc00010e640, 0x0, 0x0)
	/Users/jb/dev/syncthing/syncthing/lib/db/lowlevel.go:584 +0x4df fp=0xc0002a3eb8 sp=0xc0002a3d20 pc=0x4750e7f
github.com/syncthing/syncthing/lib/db.(*Lowlevel).gcRunner(0xc00010e640)
	/Users/jb/dev/syncthing/syncthing/lib/db/lowlevel.go:495 +0x279 fp=0xc0002a3fd8 sp=0xc0002a3eb8 pc=0x4750579
runtime.goexit()
	/usr/local/Cellar/go/1.14/libexec/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc0002a3fe0 sp=0xc0002a3fd8 pc=0x406a361
created by github.com/syncthing/syncthing/lib/db.NewLowlevel
	/Users/jb/dev/syncthing/syncthing/lib/db/lowlevel.go:65 +0x36a

Activity

  1. imsodin commented on Feb 26, 2020

    @imsodin
    Member
  2. calmh commented on Feb 26, 2020

    @calmh
    MemberAuthor

    I've filed a PR to fix it.

  3. calmh commented on Feb 26, 2020

    @calmh
    MemberAuthor

    ... which might not get a lot of traction given there are other open PRs for a long time on similar issues. Might need to fork. :/

  4. AudriusButkevicius commented on Feb 26, 2020

    @AudriusButkevicius
    Member

    Add a PR allowing to use a custom hash in the bloom filter? 🤣 😱

  5. imsodin commented on Feb 26, 2020

    @imsodin
    Member

    Speaking of open PRs: You have probably seen spaolacci/murmur3#27 which touches the same code and it's not sufficient to fix?

  6. calmh commented on Feb 26, 2020

    @calmh
    MemberAuthor

    Yeah, it’s insufficient. Probably was enough to pass vet but not the new pointer checker. Apart from not fixing the 128 bit version it doesn’t fix the issue of the pointer not being correctly aligned.

  7. imsodin commented on Apr 6, 2020

    @imsodin
    Member

    Fixed by #6486

  8. added
    frozen-due-to-age
    on Apr 7, 2021
  9. locked and limited conversation to collaborators on Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions