-
Notifications
You must be signed in to change notification settings - Fork 114
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
coredump with illegal hardware instruction #115
Comments
This is probably due to a double panic. If a panic occurs while a thread is already unwinding, a Typically (but not always) double panics under We'd like to fix this so that Alternatively, double panics can be caused by panics in |
the log is https://fars.ee/kVSp/
in ./src/lib.rs:31 that is while self.using.compare_and_swap(false, true, Ordering::AcqRel) {} I read std doc the AtomicBoll allow use The normal unit test that uses std |
The panic message you posted is:
This means that your code has branched more than 1000 times (the default maximum number of branches that loom will take) before a thread was yielded or preempted. The code you posted here:
looks like you've essentially implemented a simple spin lock. Are you sure that the spinlock is being released in your test? If not, a thread attempting to lock it might be spinning infinitely. You may want to put a |
Oh you found it! I miss use After use this function, the test works well now. Thanks for your help. |
Consider the problem solved, this issue can be closed now :) |
I miss the function spin_loop_hint, after use it, loom test works well now tokio-rs/loom#115
Hello, I am also having this issue with my own lock implementation. I put Is adding |
I try to use loom to check my project
When I run
cargo test --features=concurrent-test --test test
, it reportIs there anything I write wrong? If have, could anyone help me to fix it?
The text was updated successfully, but these errors were encountered: