-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOSimPOR fails to find a race under specific circumstances #183
Comments
The attached trace contains:
while the code snippet doesn't mentions any |
ok, the |
For me the property fails with a |
Yes, the problem is that the code with the writeTQueue still exhibits the race condition and IOSimPOR suddenly stops being able to find it |
After chatting with @rjmh this might be a symptom of our implementation of MVars in terms of STM might be too deterministic and hides races. Here's a direct quote:
Although this situation is not ideal, i.e. IOSimPOR should still be able to find the races, this might be not a bug in IOSimPOR itself but rather a consequence of the MVar implementation |
Describe the bug
This test case:
will succeed. However removing the
atomically $ writeTQueue tq ()
will make it fail because of a Deadlock. The deadlock is indeed present in the implementation: t1 takes, t1 puts, t1 receives exception, t2 takes, t1 tryPut succesfully, t2 blocks on put.Writing to that tqueue before running the
bracketOnError
results in the race not being found by IOSimPOR. This looks like a direct bug.Desktop (please complete the following information):
GHC
version: 9.6.6io-sim
version: 1.6.0.0io-classes
version: 1.7.0.0Additional context
Add any other context about the problem here. Attach
io-sim
orio-sim-por
trace if possible.A trace with the deadlock if removing the mentioned line:
fail.txt
The text was updated successfully, but these errors were encountered: