Comments (4)
Note that the second panic message begins with:
thread 'trigger::loom_tests::test_loom_sender_trigger' panicked at 'deadlock; threads = [(Id(0), Blocked(Location(None))), (Id(1), Terminated)]', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/loom-0.7.0/src/rt/execution.rs:216:13
This indicates thatloom
panicked due to a deadlock in the code under test: either a bug in your code, or in your test.
After this panic occurred, a double-panic occurred while unwinding. This often happens when a Drop
impl does something that requires accessing the loom
test execution state, but the test context has already been torn down. This is kind of an annoying rough edge when using loom
--- we should probably spend some time ensuring that loom
's simulated atomics and synchronization primitives behave more gracefully when used in a Drop
impl during a panic. That would likely require some effort though.
from loom.
The double panic is kind of a loom issue, but it's occurring due to a panic from loom correctly detecting a deadlock in your test. So, loom found an issue in your code, and we should fix the double panic so that loom can report these errors better and make them easier to debug :)
from loom.
Ok for now going to close the issue then. I haven't found the reason yet, but so far the theory from your end is that it is anyway on my end (whether in the test or actual code). So going to not botter your time more here in that case. If it does end up be a loom issue I'll re-open, but so far it doesn't seem like it is. Thanks!
from loom.
Yes I did find the issue in the meanwhile. Turns out I was having a race condition that loom detected which caused me to never wake up... Gosh. Good that i start using loom for these very core primitives of my crate.
from loom.
Related Issues (20)
- Atomic operations on part of an atomic integer? HOT 3
- What to do when loom::AtomicUsize do not implement as_mut_ptr() HOT 7
- Add a mock MaybeUninit HOT 4
- Using `Notify` reports deadlock, while a hand-rolled event does not
- Loom panics HOT 6
- Document for debugging a test case
- Implement atomic-await
- Constructing a !Sized UnsafeCell HOT 4
- Provide a method for spawning scoped threads
- Stack size of spawned threads is not configurable HOT 2
- Panic at loom-0.6.0/src/rt/scheduler.rs:134:48
- `repr(transparent)` for `UnsafeCell`
- Is it possible for `loom::sync::Mutex::new` to be const available? HOT 7
- Add lock_arc API to loom Mutex
- Missing SyncUnsafeCell HOT 1
- Upgrade generator to 0.8
- [feature request] Configure stack size of default thread
- `loom::thread_local` does not support const-initialization
- `loom::LocalKey` does not support specialized implementations for `LocalKey<Cell<T>>` or `LocalKey<RefCell<T>>`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loom.