Skip to content

Random crashes during grow #55

Description

@matejsp

I am not sure what is wrong, but migrating to haxmap introduced a lots of crashing in tests (random crashes).
https://github.com/quickfixgo/quickfix/pull/685/files

goroutine 130 gp=0x14000102700 m=5 mp=0x1400022a808 [running]:
runtime.throw({0x105053623?, 0x14000194570?})
	/opt/homebrew/opt/go/libexec/src/runtime/panic.go:1067 +0x38 fp=0x1400021d270 sp=0x1400021d240 pc=0x104b0f648
runtime.sigpanic()
	/opt/homebrew/opt/go/libexec/src/runtime/signal_unix.go:931 +0x224 fp=0x1400021d2d0 sp=0x1400021d270 pc=0x104b11364
github.com/alphadose/haxmap.(*element[...]).isDeleted(...)
	/Users/matej.spiller-muys/go/pkg/mod/github.com/alphadose/haxmap@v1.4.1/list.go:110
github.com/alphadose/haxmap.(*element[...]).next(0x105239fc0?)
	/Users/matej.spiller-muys/go/pkg/mod/github.com/alphadose/haxmap@v1.4.1/list.go:38 +0x74 fp=0x1400021d320 sp=0x1400021d2e0 pc=0x104f14a84
github.com/alphadose/haxmap.(*element[...]).search(0x105239fc0?, 0xe664a19d58b3cdf5, 0x62)
	/Users/matej.spiller-muys/go/pkg/mod/github.com/alphadose/haxmap@v1.4.1/list.go:87 +0x68 fp=0x1400021d350 sp=0x1400021d320 pc=0x104f147a8
github.com/alphadose/haxmap.(*element[...]).inject(0x105239fc0?, 0xe664a19d58b3cdf5, 0x62, 0x14000194570)
	/Users/matej.spiller-muys/go/pkg/mod/github.com/alphadose/haxmap@v1.4.1/list.go:61 +0x34 fp=0x1400021d3a0 sp=0x1400021d350 pc=0x104f14874
github.com/alphadose/haxmap.(*Map[...]).Set(0x10523e440, 0x62, {0x140000faa90, 0x1, 0x3})
	/Users/matej.spiller-muys/go/pkg/mod/github.com/alphadose/haxmap@v1.4.1/map.go:167 +0x144 fp=0x1400021d400 sp=0x1400021d3a0 pc=0x104f135d4

Any idea how to debug this since ti is very random.

I tried:

m.tagLookup = haxmap.New[Tag, field]() -> works
m.tagLookup = haxmap.New[Tag, field](1) -> works
m.tagLookup = haxmap.New[Tag, field](10) -> crashes
m.tagLookup = haxmap.New[Tag, field](100) -> crashes

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions