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

lazy_static: very rare (?) BorrowMut panic #126

Closed
jonhoo opened this issue Apr 11, 2020 · 2 comments · Fixed by #128
Closed

lazy_static: very rare (?) BorrowMut panic #126

jonhoo opened this issue Apr 11, 2020 · 2 comments · Fixed by #128
Assignees

Comments

@jonhoo
Copy link
Sponsor Contributor

jonhoo commented Apr 11, 2020

After running loom for a very long time on the crossbeam Treiber stack example, I got this:

 ================== Iteration 100980000 ==================

thread 'main' panicked at 'already borrowed: BorrowMutError', /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/cell.rs:878:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1504
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:511
  11: rust_begin_unwind
             at src/libstd/panicking.rs:419
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:111
  13: core::option::expect_none_failed
             at src/libcore/option.rs:1268
  14: core::result::Result<T,E>::expect
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/result.rs:963
  15: core::cell::RefCell<T>::borrow_mut
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/cell.rs:878
  16: loom::rt::scheduler::Scheduler::with_execution::{{closure}}
             at /home/jon/dev/others/loom/src/rt/scheduler.rs:48
  17: scoped_tls::ScopedKey<T>::with
             at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:189
  18: loom::rt::scheduler::Scheduler::with_execution
             at /home/jon/dev/others/loom/src/rt/scheduler.rs:48
  19: loom::rt::execution
             at /home/jon/dev/others/loom/src/rt/mod.rs:135
  20: loom::rt::branch
             at /home/jon/dev/others/loom/src/rt/mod.rs:92
  21: loom::rt::object::Ref<T>::branch_action
             at /home/jon/dev/others/loom/src/rt/object.rs:325
  22: loom::rt::arc::Arc::branch
             at /home/jon/dev/others/loom/src/rt/arc.rs:123
  23: loom::rt::arc::Arc::ref_dec
             at /home/jon/dev/others/loom/src/rt/arc.rs:93
  24: <loom::sync::arc::Arc<T> as core::ops::drop::Drop>::drop
             at /home/jon/dev/others/loom/src/sync/arc.rs:90
  25: core::ptr::drop_in_place
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  26: core::ptr::drop_in_place
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  27: core::ptr::drop_in_place
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  28: core::ptr::drop_in_place
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  29: core::ptr::drop_in_place
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  30: loom::rt::lazy_static::Set::init_static
             at /home/jon/dev/others/loom/src/rt/lazy_static.rs:59
  31: loom::lazy_static::Lazy<T>::get::{{closure}}
             at /home/jon/dev/others/loom/src/lazy_static.rs:52
  32: loom::rt::scheduler::Scheduler::with_execution::{{closure}}
             at /home/jon/dev/others/loom/src/rt/scheduler.rs:48
  33: scoped_tls::ScopedKey<T>::with
             at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:189
  34: loom::rt::scheduler::Scheduler::with_execution
             at /home/jon/dev/others/loom/src/rt/scheduler.rs:48
  35: loom::rt::execution
             at /home/jon/dev/others/loom/src/rt/mod.rs:135
  36: loom::lazy_static::Lazy<T>::get
             at /home/jon/dev/others/loom/src/lazy_static.rs:48
  37: <crossbeam_epoch::default::COLLECTOR as core::ops::deref::Deref>::deref::__stability
             at /home/jon/dev/others/loom/src/lib.rs:248
  38: <crossbeam_epoch::default::COLLECTOR as core::ops::deref::Deref>::deref
             at /home/jon/dev/others/loom/src/lib.rs:250
  39: crossbeam_epoch::default::HANDLE::{{closure}}
             at crossbeam-epoch/src/default.rs:17
  40: core::ops::function::FnOnce::call_once
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
  41: loom::thread::LocalKey<T>::try_with
             at /home/jon/dev/others/loom/src/thread.rs:122
  42: crossbeam_epoch::default::with_handle
             at ./src/default.rs:42
  43: crossbeam_epoch::default::pin
             at ./src/default.rs:23
  44: loom::treiber_stack::TreiberStack<T>::push
             at crossbeam-epoch/tests/loom.rs:76
  45: loom::treiber_stack::{{closure}}
             at crossbeam-epoch/tests/loom.rs:139
  46: loom::model::Builder::check::{{closure}}
             at /home/jon/dev/others/loom/src/model.rs:198
  47: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
  48: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/boxed.rs:1008
  49: loom::rt::scheduler::spawn_threads::{{closure}}::{{closure}}
             at /home/jon/dev/others/loom/src/rt/scheduler.rs:140
  50: generator::gen_impl::GeneratorImpl<A,T>::init::{{closure}}
             at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.6.20/src/gen_impl.rs:154
  51: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
  52: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/boxed.rs:1008
  53: generator::gen_impl::gen_init::{{closure}}
             at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.6.20/src/gen_impl.rs:387
  54: core::ops::function::FnOnce::call_once
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
  55: std::panicking::try::do_call
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panicking.rs:331
  56: std::panicking::try
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panicking.rs:274
  57: std::panic::catch_unwind
             at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panic.rs:394
  58: generator::gen_impl::gen_init
             at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.6.20/src/gen_impl.rs:401
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'already borrowed: BorrowMutError', /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/cell.rs:878:9
stack backtrace:
   0:     0x5568a4a1bb54 - backtrace::backtrace::libunwind::trace::h59a3549909dc85d8
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1:     0x5568a4a1bb54 - backtrace::backtrace::trace_unsynchronized::h4914389b3e3bde2a
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2:     0x5568a4a1bb54 - std::sys_common::backtrace::_print_fmt::hb5d6f7947976752c
                               at src/libstd/sys_common/backtrace.rs:78
   3:     0x5568a4a1bb54 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7374a32156a91956
                               at src/libstd/sys_common/backtrace.rs:59
   4:     0x5568a4a44a6c - core::fmt::write::hadc5762fc721fd48
                               at src/libcore/fmt/mod.rs:1069
   5:     0x5568a4a18673 - std::io::Write::write_fmt::h04f87a0d1d606933
                               at src/libstd/io/mod.rs:1504
   6:     0x5568a4a1e605 - std::sys_common::backtrace::_print::h378a405d8cc63cba
                               at src/libstd/sys_common/backtrace.rs:62
   7:     0x5568a4a1e605 - std::sys_common::backtrace::print::h41467859da656030
                               at src/libstd/sys_common/backtrace.rs:49
   8:     0x5568a4a1e605 - std::panicking::default_hook::{{closure}}::h99cf0826a76d7d87
                               at src/libstd/panicking.rs:198
   9:     0x5568a4a1e342 - std::panicking::default_hook::h48aeb629a84fa376
                               at src/libstd/panicking.rs:218
  10:     0x5568a4a1ec62 - std::panicking::rust_panic_with_hook::h83a53b468de03d15
                               at src/libstd/panicking.rs:511
  11:     0x5568a4a1e84b - rust_begin_unwind
                               at src/libstd/panicking.rs:419
  12:     0x5568a4a43461 - core::panicking::panic_fmt::hc5ff7eb515c111c7
                               at src/libcore/panicking.rs:111
  13:     0x5568a4a43283 - core::option::expect_none_failed::h43abe93f50cffa2b
                               at src/libcore/option.rs:1268
  14:     0x5568a4a02c69 - core::result::Result<T,E>::expect::hfa48030a2708ecd6
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/result.rs:963
  15:     0x5568a4a02c69 - core::cell::RefCell<T>::borrow_mut::h2d113da5caaad761
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/cell.rs:878
  16:     0x5568a4a02c69 - loom::rt::scheduler::Scheduler::with_execution::{{closure}}::h3509fb2e84a1ffec
                               at /home/jon/dev/others/loom/src/rt/scheduler.rs:48
  17:     0x5568a4a02c69 - scoped_tls::ScopedKey<T>::with::h0107b6daedaea52a
                               at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:189
  18:     0x5568a49ff8ed - loom::rt::scheduler::Scheduler::with_execution::h54a277ea94c579c0
                               at /home/jon/dev/others/loom/src/rt/scheduler.rs:48
  19:     0x5568a49ff8ed - loom::rt::execution::h662ade3801d3f000
                               at /home/jon/dev/others/loom/src/rt/mod.rs:135
  20:     0x5568a49ff8ed - loom::sync::atomic::atomic::Atomic<T>::load::h729d471f17abbb15
                               at /home/jon/dev/others/loom/src/sync/atomic/atomic.rs:28
  21:     0x5568a49ff8ed - loom::sync::atomic::int::AtomicUsize::load::h3534981295176dc6
                               at /home/jon/dev/others/loom/src/sync/atomic/int.rs:33
  22:     0x5568a49e7143 - crossbeam_epoch::atomic::Atomic<T>::load::h553aca8697d3dc5f
                               at crossbeam-epoch/src/atomic.rs:209
  23:     0x5568a49e7143 - <crossbeam_epoch::sync::list::List<T,C> as core::ops::drop::Drop>::drop::h327c4fa948bc6f03
                               at crossbeam-epoch/src/sync/list.rs:222
  24:     0x5568a49e7143 - core::ptr::drop_in_place::hf6e1a21efb828f17
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  25:     0x5568a49e7143 - core::ptr::drop_in_place::hbd1348898b0a63b6
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  26:     0x5568a49e7143 - core::ptr::drop_in_place::hb99a6cbe449c11da
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  27:     0x5568a49e7ad0 - alloc::sync::Arc<T>::drop_slow::hf3bbc42f6c58aa37
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/sync.rs:768
  28:     0x5568a49e70a4 - core::ptr::drop_in_place::h64e50f617e2f7011
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  29:     0x5568a49e70a4 - core::ptr::drop_in_place::h7cca2e333485cc69
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  30:     0x5568a49e9c73 - core::ptr::drop_in_place::h1f9e9a03c054741b
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  31:     0x5568a49e9c73 - core::ptr::drop_in_place::h5868c99decd2b0c3
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  32:     0x5568a49e9c73 - core::ptr::drop_in_place::hc9dca4e76bd3ce6b
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:177
  33:     0x5568a49e9c73 - loom::rt::lazy_static::Set::init_static::h31229a10e164c0f4
                               at /home/jon/dev/others/loom/src/rt/lazy_static.rs:59
  34:     0x5568a49e9c73 - loom::lazy_static::Lazy<T>::get::{{closure}}::h1fed97cf8ac479fd
                               at /home/jon/dev/others/loom/src/lazy_static.rs:52
  35:     0x5568a49e9c73 - loom::rt::scheduler::Scheduler::with_execution::{{closure}}::hc58ec40ade8187ed
                               at /home/jon/dev/others/loom/src/rt/scheduler.rs:48
  36:     0x5568a49e9c73 - scoped_tls::ScopedKey<T>::with::h96db6b97b9583615
                               at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:189
  37:     0x5568a49ea2cc - loom::rt::scheduler::Scheduler::with_execution::hc1c9d5dd51d39a35
                               at /home/jon/dev/others/loom/src/rt/scheduler.rs:48
  38:     0x5568a49ea2cc - loom::rt::execution::h1a20acd413d3aef3
                               at /home/jon/dev/others/loom/src/rt/mod.rs:135
  39:     0x5568a49ea2cc - loom::lazy_static::Lazy<T>::get::h9529d211e7fe36f9
                               at /home/jon/dev/others/loom/src/lazy_static.rs:48
  40:     0x5568a49e85ed - <crossbeam_epoch::default::COLLECTOR as core::ops::deref::Deref>::deref::__stability::hda60d5fb7e6b9ac8
                               at /home/jon/dev/others/loom/src/lib.rs:248
  41:     0x5568a49e85ed - <crossbeam_epoch::default::COLLECTOR as core::ops::deref::Deref>::deref::h58b29347df7b4334
                               at /home/jon/dev/others/loom/src/lib.rs:250
  42:     0x5568a49e85ed - crossbeam_epoch::default::HANDLE::{{closure}}::h812e5c27674f3edc
                               at crossbeam-epoch/src/default.rs:17
  43:     0x5568a49e85ed - core::ops::function::FnOnce::call_once::hc4818b5110b57210
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
  44:     0x5568a49a2fa9 - loom::thread::LocalKey<T>::try_with::h0a01685127dddbf9
                               at /home/jon/dev/others/loom/src/thread.rs:122
  45:     0x5568a49a51b8 - crossbeam_epoch::default::with_handle::h9c8dcab9f23ad1ca
                               at /home/jon/dev/others/crossbeam/crossbeam-epoch/src/default.rs:42
  46:     0x5568a49a51b8 - crossbeam_epoch::default::pin::hd61ad685e130ca12
                               at /home/jon/dev/others/crossbeam/crossbeam-epoch/src/default.rs:23
  47:     0x5568a49a54a5 - loom::treiber_stack::TreiberStack<T>::push::h9885ac72b6062e01
                               at crossbeam-epoch/tests/loom.rs:76
  48:     0x5568a49a5ea4 - loom::treiber_stack::{{closure}}::h34062294dfd9f36b
                               at crossbeam-epoch/tests/loom.rs:139
  49:     0x5568a49a5ea4 - loom::model::Builder::check::{{closure}}::h635e763cf3dabc67
                               at /home/jon/dev/others/loom/src/model.rs:198
  50:     0x5568a49a5ea4 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h83166ca326c76fb8
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
  51:     0x5568a4a07acf - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::he1636322512be8af
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/boxed.rs:1008
  52:     0x5568a4a07231 - loom::rt::scheduler::spawn_threads::{{closure}}::{{closure}}::h6709f32b98e6591b
                               at /home/jon/dev/others/loom/src/rt/scheduler.rs:140
  53:     0x5568a4a06ac6 - generator::gen_impl::GeneratorImpl<A,T>::init::{{closure}}::hb182f3ba7238636d
                               at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.6.20/src/gen_impl.rs:154
  54:     0x5568a4a06ac6 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h19cb81283cb5653b
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
  55:     0x5568a4a0c5bf - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hd0feb95953821b78
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/boxed.rs:1008
  56:     0x5568a4a0c78b - generator::gen_impl::gen_init::{{closure}}::h3286d450a96d6ade
                               at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.6.20/src/gen_impl.rs:387
  57:     0x5568a4a0c78b - core::ops::function::FnOnce::call_once::h2e07fd4f3dfbcc23
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
  58:     0x5568a4a0c78b - std::panicking::try::do_call::hcf4dd71c5303e067
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panicking.rs:331
  59:     0x5568a4a0c78b - std::panicking::try::ha9c067d0babd3b88
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panicking.rs:274
  60:     0x5568a4a0c78b - std::panic::catch_unwind::h8b6e0eb8c176ac00
                               at /home/jon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panic.rs:394
  61:     0x5568a4a0c78b - generator::gen_impl::gen_init::h1686779882458f9d
                               at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/generator-0.6.20/src/gen_impl.rs:401
  62:                0x0 - <unknown>
thread panicked while panicking. aborting.

Will try to debug tomorrow, just wanted to leave a record of it.

@jonhoo jonhoo self-assigned this Apr 11, 2020
@jonhoo
Copy link
Sponsor Contributor Author

jonhoo commented Apr 12, 2020

@carllerche is it possible for another thread to be executed by this line?

sv.sync.sync_store(&mut execution.threads, Ordering::AcqRel);

If so, I think this bug arises when a different thread gets to run, and it initializes the value, so when we then continue to initialize the value, we end up dropping the value they inserted. That drop may be a drop of an Arc, which can then re-enter the scheduler.

jonhoo added a commit to jonhoo/loom that referenced this issue Apr 12, 2020
The real lazy_static uses a lock to avoid races in initialization. We
don't implement that lock yet, so our initialization can race. If we do,
we should not crash like we did before.

Fixes tokio-rs#126.
@jonhoo
Copy link
Sponsor Contributor Author

jonhoo commented Apr 12, 2020

Can confirm that #128 fixes this.

jonhoo added a commit that referenced this issue Apr 13, 2020
The real lazy_static uses a lock to avoid races in initialization. We
don't implement that lock yet, so our initialization can race. If we do,
we should not crash like we did before.

Fixes #126.
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

Successfully merging a pull request may close this issue.

1 participant