-
Notifications
You must be signed in to change notification settings - Fork 111
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
panicked while panicking in loom::sync::arc::Arc::drop after deadlock in code under test #291
Comments
Dug through the backtrace a bit. It looks like one of the panics originates in the
I'm not sure where the second panic is coming from, or whether that one is the first or second panic. I tried setting a breakpoint on |
Ok, I think I've boiled it down to a much smaller repro: Starting with a fresh cargo project:
Then in tests/loom-test.rs:
and repro:
And via gdb, we have a similar backtrace as before:
Obviously there's a bug in the test code: the waiting thread is never woken up. Presumably there's some analogous bug in my original larger code, but I can't debug it since loom aborts before generating a checkpoint or other useful output. |
If I get rid of the
|
What happens if you pass
|
Ah thanks - that gives me the first panic message and a backtrace. The first panic message tells me there's a deadlock, but seems to be missing the thread
The backtrace looks very similar to what I got via gdb. Here's the full output:
|
@sporksmith Could you please try if the code from PR #297 fixes the issue you are describing? |
Hi, I'm trying to get started testing a custom mutex with loom. I have a draft PR here, where you can see the loom tests, and some functions I had to stub out (e.g. futex). https://github.com/shadow/shadow/pull/2553/files#diff-c8d75692cd8a476ff7f5af73e87d2d3567440ad8190c8bbad0e6493fa223b1da
First I run our build wrapper to pre-generate a header file:
Then I'm trying to run loom with:
I get:
If I run the test directly under gdb I'm able to get a backtrace:
It looks like
loom::sync::Arc
'sdrop
implmentation is panicking...?Here's a noisier / more-informative backtrace from a non-release build:
The text was updated successfully, but these errors were encountered: