Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kyri-petrou
Copy link
Contributor

/fixes #9443

Issue seems to be related to the heavy usage of TestClock in ZStreamSpec. Because parallelism is applied per-suite, in cases of nested suites (which ZStreamSpec contains a lot of!) with the default parallelism of 4 the number of suites running in parallel can be up to 4 x 4 x 4 = 64.

This causes issues with TestClock because it "awaits" (using sleep) for all the fibers spawned within the test to be suspended. However, when there is a large number of suites running in parallel, it might falsely determine that a fiber has suspended when it hasn't started running yet. This can cause the suite to deadlock as some test is awaiting for the TestClock to advance, when it already has

@kyri-petrou kyri-petrou merged commit 5e219a4 into zio:series/2.x Jan 18, 2025
18 checks passed
@kyri-petrou kyri-petrou deleted the reduce-ZStreamSpec-parallelism branch January 18, 2025 01:51
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

Successfully merging this pull request may close these issues.

ZStreamSpec can deadlock

1 participant