Skip to content
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

Loom panics #302

Open
terrarier2111 opened this issue Feb 3, 2023 · 6 comments
Open

Loom panics #302

terrarier2111 opened this issue Feb 3, 2023 · 6 comments

Comments

@terrarier2111
Copy link

terrarier2111 commented Feb 3, 2023

when trying to use loom, it just panics all the time:


stack backtrace:
thread '<unnamed>' panicked at 'index out of bounds: the len is 0 but the index is 0', /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/object.rs:382:25
   0: rust_begin_unwind
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/panicking.rs:64:14
   2: core::panicking::panic_bounds_check
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/panicking.rs:159:5
   3: <usize as core::slice::index::SliceIndex<[T]>>::index
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/slice/index.rs:260:10
   4: core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/slice/index.rs:18:9
   5: <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/alloc/src/vec/mod.rs:2732:9
   6: loom::rt::object::Ref<T>::set_action
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/object.rs:382:25
   7: loom::rt::object::Ref<T>::branch_action::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/object.rs:354:13
   8: loom::rt::branch::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/mod.rs:119:19
   9: loom::rt::scheduler::Scheduler::with_execution::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:48:34
  10: loom::rt::scheduler::Scheduler::with_state::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:130:28
  11: scoped_tls::ScopedKey<T>::with
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.1/src/lib.rs:171:13
  12: loom::rt::scheduler::Scheduler::with_state
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:130:9
  13: loom::rt::scheduler::Scheduler::with_execution
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:48:9
  14: loom::rt::execution
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/mod.rs:171:5
  15: loom::rt::branch
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/mod.rs:118:25
  16: loom::rt::object::Ref<T>::branch_action
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/object.rs:351:9
  17: loom::rt::atomic::Atomic<T>::branch
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/atomic.rs:389:9
  18: loom::rt::atomic::Atomic<T>::rmw
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/atomic.rs:307:9
  19: loom::sync::atomic::atomic::Atomic<T>::try_rmw
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/sync/atomic/atomic.rs:57:9
  20: loom::sync::atomic::atomic::Atomic<T>::rmw
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/sync/atomic/atomic.rs:49:9
  21: loom::sync::atomic::int::AtomicUsize::fetch_add
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/sync/atomic/int.rs:111:17
  22: swap_arc::swap_arc_tls_optimistic::SwapArcIntermediateTLS<T,D,_>::load_internal
             at /home/threadexception/Desktop/rust-playground/src/swap_arc_tls_optimistic.rs:407:23
  23: swap_arc::swap_arc_tls_optimistic::SwapArcIntermediateTLS<T,D,_>::load::{{closure}}
             at /home/threadexception/Desktop/rust-playground/src/swap_arc_tls_optimistic.rs:126:24
  24: thread_local::ThreadLocal<T>::get_or::{{closure}}
             at /home/threadexception/.cargo/git/checkouts/thread_local-rs-f6087f069186d8d8/436fa68/src/lib.rs:213:44
  25: thread_local::ThreadLocal<T>::get_or_try
             at /home/threadexception/.cargo/git/checkouts/thread_local-rs-f6087f069186d8d8/436fa68/src/lib.rs:248:24
  26: thread_local::ThreadLocal<T>::get_or
             at /home/threadexception/.cargo/git/checkouts/thread_local-rs-f6087f069186d8d8/436fa68/src/lib.rs:213:13
  27: swap_arc::swap_arc_tls_optimistic::SwapArcIntermediateTLS<T,D,_>::load
             at /home/threadexception/Desktop/rust-playground/src/swap_arc_tls_optimistic.rs:125:22
  28: swap_arc::main::{{closure}}::{{closure}}::{{closure}}
             at /home/threadexception/Desktop/rust-playground/src/main.rs:38:34
  29: loom::model::Builder::check::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/model.rs:185:17
  30: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/ops/function.rs:250:5
  31: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/alloc/src/boxed.rs:1988:9
  32: loom::rt::scheduler::spawn_threads::{{closure}}::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:149:21
  33: generator::gen_impl::GeneratorImpl<A,T>::init_code::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:344:21
  34: generator::stack::StackBox<F>::call_once
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/stack/mod.rs:139:13
  35: generator::stack::Func::call_once
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/stack/mod.rs:121:9
  36: generator::gen_impl::gen_init::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:560:9
  37: core::ops::function::FnOnce::call_once
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/ops/function.rs:250:5
  38: std::panicking::try::do_call
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:483:40
  39: std::panicking::try
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:447:19
  40: std::panic::catch_unwind
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panic.rs:140:14
  41: generator::gen_impl::catch_unwind_filter
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:551:5
  42: generator::gen_impl::gen_init
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:578:25
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/panicking.rs:64:14
   2: core::panicking::panic_bounds_check
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/panicking.rs:159:5
   3: <usize as core::slice::index::SliceIndex<[T]>>::index
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/slice/index.rs:260:10
   4: core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/slice/index.rs:18:9
   5: <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/alloc/src/vec/mod.rs:2732:9
   6: loom::rt::object::Ref<T>::set_action
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/object.rs:382:25
   7: loom::rt::object::Ref<T>::branch_action::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/object.rs:354:13
   8: loom::rt::branch::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/mod.rs:119:19
   9: loom::rt::scheduler::Scheduler::with_execution::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:48:34
  10: loom::rt::scheduler::Scheduler::with_state::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:130:28
  11: scoped_tls::ScopedKey<T>::with
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.1/src/lib.rs:171:13
  12: loom::rt::scheduler::Scheduler::with_state
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:130:9
  13: loom::rt::scheduler::Scheduler::with_execution
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:48:9
  14: loom::rt::execution
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/mod.rs:171:5
  15: loom::rt::branch
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/mod.rs:118:25
  16: loom::rt::object::Ref<T>::branch_action
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/object.rs:351:9
  17: loom::rt::atomic::Atomic<T>::branch
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/atomic.rs:389:9
  18: loom::rt::atomic::Atomic<T>::rmw
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/atomic.rs:307:9
  19: loom::sync::atomic::atomic::Atomic<T>::try_rmw
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/sync/atomic/atomic.rs:57:9
  20: loom::sync::atomic::atomic::Atomic<T>::compare_exchange
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/sync/atomic/atomic.rs:89:9
  21: loom::sync::atomic::int::AtomicUsize::compare_exchange
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/sync/atomic/int.rs:93:17
  22: swap_arc::swap_arc_tls_optimistic::SwapArcIntermediateTLS<T,D,_>::_store_raw
             at /home/threadexception/Desktop/rust-playground/src/swap_arc_tls_optimistic.rs:602:19
  23: swap_arc::swap_arc_tls_optimistic::SwapArcIntermediateTLS<T,D,_>::store
             at /home/threadexception/Desktop/rust-playground/src/swap_arc_tls_optimistic.rs:577:13
  24: swap_arc::main::{{closure}}::{{closure}}::{{closure}}
             at /home/threadexception/Desktop/rust-playground/src/main.rs:66:25
  25: loom::model::Builder::check::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/model.rs:185:17
  26: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/ops/function.rs:250:5
  27: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/alloc/src/boxed.rs:1988:9
  28: loom::rt::scheduler::spawn_threads::{{closure}}::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:149:21
  29: generator::gen_impl::GeneratorImpl<A,T>::init_code::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:344:21
  30: generator::stack::StackBox<F>::call_once
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/stack/mod.rs:139:13
  31: generator::stack::Func::call_once
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/stack/mod.rs:121:9
  32: generator::gen_impl::gen_init::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:560:9
  33: core::ops::function::FnOnce::call_once
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/ops/function.rs:250:5
  34: std::panicking::try::do_call
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:483:40
  35: std::panicking::try
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:447:19
  36: std::panic::catch_unwind
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panic.rs:140:14
  37: generator::gen_impl::catch_unwind_filter
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:551:5
  38: generator::gen_impl::gen_init
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:578:25
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/panicking.rs:64:14
   2: core::panicking::panic_bounds_check
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/panicking.rs:159:5
   3: <usize as core::slice::index::SliceIndex<[T]>>::index
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/slice/index.rs:260:10
   4: core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/slice/index.rs:18:9
   5: <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/alloc/src/vec/mod.rs:2732:9
   6: loom::rt::object::Ref<T>::set_action
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/object.rs:382:25
   7: loom::rt::object::Ref<T>::branch_action::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/object.rs:354:13
   8: loom::rt::branch::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/mod.rs:119:19
   9: loom::rt::scheduler::Scheduler::with_execution::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:48:34
  10: loom::rt::scheduler::Scheduler::with_state::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:130:28
  11: scoped_tls::ScopedKey<T>::with
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.1/src/lib.rs:171:13
  12: loom::rt::scheduler::Scheduler::with_state
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:130:9
  13: loom::rt::scheduler::Scheduler::with_execution
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:48:9
  14: loom::rt::execution
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/mod.rs:171:5
  15: loom::rt::branch
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/mod.rs:118:25
  16: loom::rt::object::Ref<T>::branch_action
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/object.rs:351:9
  17: loom::rt::atomic::Atomic<T>::branch
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/atomic.rs:389:9
  18: loom::rt::atomic::Atomic<T>::rmw
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/atomic.rs:307:9
  19: loom::sync::atomic::atomic::Atomic<T>::try_rmw
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/sync/atomic/atomic.rs:57:9
  20: loom::sync::atomic::atomic::Atomic<T>::rmw
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/sync/atomic/atomic.rs:49:9
  21: loom::sync::atomic::int::AtomicUsize::fetch_add
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/sync/atomic/int.rs:111:17
  22: swap_arc::swap_arc_tls_optimistic::SwapArcIntermediateTLS<T,D,_>::load_internal
             at /home/threadexception/Desktop/rust-playground/src/swap_arc_tls_optimistic.rs:407:23
  23: swap_arc::swap_arc_tls_optimistic::SwapArcIntermediateTLS<T,D,_>::load::{{closure}}
             at /home/threadexception/Desktop/rust-playground/src/swap_arc_tls_optimistic.rs:126:24
  24: thread_local::ThreadLocal<T>::get_or::{{closure}}
             at /home/threadexception/.cargo/git/checkouts/thread_local-rs-f6087f069186d8d8/436fa68/src/lib.rs:213:44
  25: thread_local::ThreadLocal<T>::get_or_try
             at /home/threadexception/.cargo/git/checkouts/thread_local-rs-f6087f069186d8d8/436fa68/src/lib.rs:248:24
  26: thread_local::ThreadLocal<T>::get_or
             at /home/threadexception/.cargo/git/checkouts/thread_local-rs-f6087f069186d8d8/436fa68/src/lib.rs:213:13
  27: swap_arc::swap_arc_tls_optimistic::SwapArcIntermediateTLS<T,D,_>::load
             at /home/threadexception/Desktop/rust-playground/src/swap_arc_tls_optimistic.rs:125:22
  28: swap_arc::main::{{closure}}::{{closure}}::{{closure}}
             at /home/threadexception/Desktop/rust-playground/src/main.rs:38:34
  29: loom::model::Builder::check::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/model.rs:185:17
  30: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/ops/function.rs:250:5
  31: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/alloc/src/boxed.rs:1988:9
  32: loom::rt::scheduler::spawn_threads::{{closure}}::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:149:21
  33: generator::gen_impl::GeneratorImpl<A,T>::init_code::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:344:21
  34: generator::stack::StackBox<F>::call_once
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/stack/mod.rs:139:13
  35: generator::stack::Func::call_once
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/stack/mod.rs:121:9
  36: generator::gen_impl::gen_init::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:560:9
  37: core::ops::function::FnOnce::call_once
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/ops/function.rs:250:5
  38: std::panicking::try::do_call
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:483:40
  39: std::panicking::try
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:447:19
  40: std::panic::catch_unwind
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panic.rs:140:14
  41: generator::gen_impl::catch_unwind_filter
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:551:5
  42: generator::gen_impl::gen_init
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:578:25
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', src/main.rs:76:46
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/panicking.rs:64:14
   2: core::result::unwrap_failed
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/result.rs:1790:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/result.rs:1112:23
   4: swap_arc::main::{{closure}}::{{closure}}
             at /home/threadexception/Desktop/rust-playground/src/main.rs:76:32
   5: core::iter::traits::iterator::Iterator::for_each::call::{{closure}}
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/iter/traits/iterator.rs:834:29
   6: core::iter::traits::iterator::Iterator::fold
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/iter/traits/iterator.rs:2438:21
   7: core::iter::traits::iterator::Iterator::for_each
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/iter/traits/iterator.rs:837:9
   8: swap_arc::main::{{closure}}
             at /home/threadexception/Desktop/rust-playground/src/main.rs:74:9
   9: loom::model::Builder::check::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/model.rs:185:17
  10: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/ops/function.rs:250:5
  11: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/alloc/src/boxed.rs:1988:9
  12: loom::rt::scheduler::spawn_threads::{{closure}}::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/loom-0.5.6/src/rt/scheduler.rs:149:21
  13: generator::gen_impl::GeneratorImpl<A,T>::init_code::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:344:21
  14: generator::stack::StackBox<F>::call_once
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/stack/mod.rs:139:13
  15: generator::stack::Func::call_once
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/stack/mod.rs:121:9
  16: generator::gen_impl::gen_init::{{closure}}
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:560:9
  17: core::ops::function::FnOnce::call_once
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/core/src/ops/function.rs:250:5
  18: std::panicking::try::do_call
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:483:40
  19: std::panicking::try
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panicking.rs:447:19
  20: std::panic::catch_unwind
             at /rustc/d7948c843de94245c794e8c63dd4301a78bb5ba3/library/std/src/panic.rs:140:14
  21: generator::gen_impl::catch_unwind_filter
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:551:5
  22: generator::gen_impl::gen_init
             at /home/threadexception/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.7.2/src/gen_impl.rs:578:25
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.```
@Darksonn
Copy link
Contributor

Darksonn commented Feb 3, 2023

We would need more information to help you.

@terrarier2111
Copy link
Author

We would need more information to help you.

What kinds of information should I provide in order to enable you to help me?

@Darksonn
Copy link
Contributor

Darksonn commented Feb 4, 2023

What code did you run to run into this issue?

@terrarier2111
Copy link
Author

I tried this code: https://github.com/terrarier2111/SwapArc/tree/loom

@terrarier2111
Copy link
Author

terrarier2111 commented Feb 6, 2023

just use cargo run on it

@Darksonn
Copy link
Contributor

Darksonn commented Feb 6, 2023

Test panics can be due to your loom test doing something its not allowed to, or it may be a bug in loom. Your code is very large, so its not easy for me to tell which one is the case here. Perhaps you could create a MCVE that is easier to understand?

You might also want to check the other open issues for similar panics.

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

No branches or pull requests

2 participants