kubo icon indicating copy to clipboard operation
kubo copied to clipboard

race condition bug or a flaky test: TestAddMultipleGCLive

Open lidel opened this issue 1 year ago • 0 comments

Not sure if this is a flaky test, or a sign of underlying bug. We should look into this in spare time.

Confirmed this is pretty old bug, reproduces with v0.23.0 and v0.29.0, and the latest master for 0.30.0-rc1.

Not a big surprise, MFS has always been flaky (https://github.com/ipfs/kubo/issues/8131), just documenting here so the next person does not waste time on debugging "new bug".

To reproduce, keep runing TestAddMultipleGCLive many times, it will eventually deadlock on something and produce a timeout:

$ while go test -run TestAddMultipleGCLive -count 100 -timeout 10s ./core/coreunix/...; do sleep 1; done
ok  	github.com/ipfs/kubo/core/coreunix	0.241s
ok  	github.com/ipfs/kubo/core/coreunix	0.339s
ok  	github.com/ipfs/kubo/core/coreunix	0.267s
ok  	github.com/ipfs/kubo/core/coreunix	0.253s
panic: test timed out after 10s
	running tests:
		TestAddMultipleGCLive (10s)
[.. a long stack for panic ..] 

lidel avatar Aug 21 '24 13:08 lidel