Fantom-foundation / Carmen

Carmen engine for fast world state storage.
Other
18 stars 12 forks source link

Maybe deadlock when initialising forest #1014

Closed kjezek closed 1 month ago

kjezek commented 2 months ago

Our fuzzing pipeline has discovered a bug, that looks like a deadlock, leading to test timeout after 10m.

Shortened log:


[2024-09-09T04:55:04.693Z] goroutine 3314 [select]:
[2024-09-09T04:55:04.693Z] github.com/Fantom-foundation/Carmen/go/database/mpt.startNodeFlusher.func1()
[2024-09-09T04:55:04.693Z]      /tmp/workspace/Carmen/Fuzzing/go/database/mpt/node_flusher.go:52 +0x17a
[2024-09-09T04:55:04.693Z] created by github.com/Fantom-foundation/Carmen/go/database/mpt.startNodeFlusher in goroutine 3313
[2024-09-09T04:55:04.693Z]      /tmp/workspace/Carmen/Fuzzing/go/database/mpt/node_flusher.go:47 +0x234
[2024-09-09T04:55:04.693Z] 
[2024-09-09T04:55:04.693Z] goroutine 3315 [chan receive, 9 minutes]:
[2024-09-09T04:55:04.693Z] github.com/Fantom-foundation/Carmen/go/database/mpt.makeForest.func1()
[2024-09-09T04:55:04.693Z]      /tmp/workspace/Carmen/Fuzzing/go/database/mpt/forest.go:322 +0x12a
[2024-09-09T04:55:04.693Z] created by github.com/Fantom-foundation/Carmen/go/database/mpt.makeForest in goroutine 3313
[2024-09-09T04:55:04.693Z]      /tmp/workspace/Carmen/Fuzzing/go/database/mpt/forest.go:318 +0xb3d
[2024-09-09T04:55:04.693Z] 
[2024-09-09T04:55:04.693Z] goroutine 3316 [chan receive, 9 minutes, locked to thread]:
[2024-09-09T04:55:04.693Z] github.com/Fantom-foundation/Carmen/go/database/mpt.makeWriteBuffer.func1()
[2024-09-09T04:55:04.693Z]      /tmp/workspace/Carmen/Fuzzing/go/database/mpt/write_buffer.go:103 +0xe5
[2024-09-09T04:55:04.693Z] created by github.com/Fantom-foundation/Carmen/go/database/mpt.makeWriteBuffer in goroutine 3313
[2024-09-09T04:55:04.693Z]      /tmp/workspace/Carmen/Fuzzing/go/database/mpt/write_buffer.go:98 +0x20f

Full log: https://scala.fantom.network/job/Carmen/job/Fuzzing/12/console

kjezek commented 1 month ago

We have got a similar report from another pipeline:

https://scala.fantom.network/job/Carmen/job/Stress-tests-unit/24/console

kjezek commented 1 month ago

got fixed by resolving memory leaks in tests, fuzzing tests have passed