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

[Tracking] Rust 1.48 introduced crashes for a project; 0.4.11 works. Unsure of the reason #173

Closed
mathstuf opened this issue Jan 11, 2021 · 3 comments

Comments

@mathstuf
Copy link
Contributor

mathstuf commented Jan 11, 2021

I have a project which has a Cargo.lock. At some point, we started getting failures on our nightly builds (missed due to no need to do any development). Testing now shows that we get OK testing for 1.47 and older and SIGSEGV with 1.48 and newer. Updating arrayvec (and only arrayvec to 0.4.11 works again; 0.4.10 fails). The backtrace (with 0.4.10):

#0  core::sync::atomic::atomic_load<usize> (dst=0x818, order=core::sync::atomic::Ordering::Acquire) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/sync/atomic.rs:2242
#1  0x0000555555e32c80 in core::sync::atomic::AtomicUsize::load (self=0x818, order=core::sync::atomic::Ordering::Acquire) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/sync/atomic.rs:1366
#2  0x0000555555e306fc in crossbeam_epoch::atomic::Atomic<crossbeam_epoch::sync::queue::Node<crossbeam_epoch::internal::SealedBag>>::load<crossbeam_epoch::sync::queue::Node<crossbeam_epoch::internal::SealedBag>> (self=0x818,
    ord=core::sync::atomic::Ordering::Acquire) at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/atomic.rs:209
#3  0x0000555555e34c5a in crossbeam_epoch::sync::queue::Queue<crossbeam_epoch::internal::SealedBag>::pop_internal<crossbeam_epoch::internal::SealedBag> (self=0x7ffff767f780,
    guard=0x5555562970b8 <crossbeam_epoch::guard::unprotected::UNPROTECTED>) at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/sync/queue.rs:111
#4  crossbeam_epoch::sync::queue::Queue<crossbeam_epoch::internal::SealedBag>::try_pop<crossbeam_epoch::internal::SealedBag> (self=0x7ffff767f780, guard=0x5555562970b8 <crossbeam_epoch::guard::unprotected::UNPROTECTED>)
    at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/sync/queue.rs:156
#5  0x0000555555e35190 in crossbeam_epoch::sync::queue::{{impl}}::drop<crossbeam_epoch::internal::SealedBag> (self=0x7ffff767f780)
    at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/sync/queue.rs:184
#6  0x0000555555e33e3f in core::ptr::drop_in_place<crossbeam_epoch::sync::queue::Queue<crossbeam_epoch::internal::SealedBag>> () at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ptr/mod.rs:175
#7  0x0000555555e344c5 in crossbeam_epoch::sync::queue::Queue<crossbeam_epoch::internal::SealedBag>::new<crossbeam_epoch::internal::SealedBag> ()
    at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/sync/queue.rs:60
#8  0x0000555555e2e014 in crossbeam_epoch::internal::Global::new () at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/internal.rs:150
#9  0x0000555555e37ccc in crossbeam_epoch::collector::Collector::new () at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/collector.rs:33
#10 0x0000555555e33b8a in crossbeam_epoch::default::{{impl}}::deref::__static_ref_initialize () at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/default.rs:12
#11 core::ops::function::FnOnce::call_once<fn() -> crossbeam_epoch::collector::Collector,()> () at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:227
#12 0x0000555555e336b6 in lazy_static::lazy::{{impl}}::get::{{closure}}<crossbeam_epoch::collector::Collector,fn() -> crossbeam_epoch::collector::Collector> ()
    at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/inline_lazy.rs:31
#13 0x0000555555e3537f in std::sync::once::{{impl}}::call_once::{{closure}}<closure-0> () at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sync/once.rs:261
#14 0x000055555622e9f2 in std::sync::once::Once::call_inner () at library/std/src/sync/once.rs:419
#15 0x0000555555e35301 in std::sync::once::Once::call_once<closure-0> (self=0x555556645398 <<crossbeam_epoch::default::COLLECTOR as core::ops::deref::Deref>::deref::__stability::LAZY+8>, f=...)
    at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sync/once.rs:261
#16 0x0000555555e34169 in lazy_static::lazy::Lazy<crossbeam_epoch::collector::Collector>::get<crossbeam_epoch::collector::Collector,fn() -> crossbeam_epoch::collector::Collector> (
    self=0x555556645390 <<crossbeam_epoch::default::COLLECTOR as core::ops::deref::Deref>::deref::__stability::LAZY>, f=<optimized out>)
    at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/inline_lazy.rs:30
#17 crossbeam_epoch::default::{{impl}}::deref::__stability () at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/lib.rs:142
#18 crossbeam_epoch::default::{{impl}}::deref (self=0x555556296dd4) at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/lib.rs:144
#19 0x0000555555e341e4 in crossbeam_epoch::default::HANDLE::__init () at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/default.rs:17
#20 0x0000555555e33ba9 in core::ops::function::FnOnce::call_once<fn() -> crossbeam_epoch::collector::LocalHandle,()> () at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:227
#21 0x0000555555e3945c in std::thread::local::lazy::LazyKeyInner<crossbeam_epoch::collector::LocalHandle>::initialize<crossbeam_epoch::collector::LocalHandle,fn() -> crossbeam_epoch::collector::LocalHandle> (self=0x7ffff7682500, init=0x0)
    at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/thread/local.rs:304
#22 0x0000555555e35422 in std::thread::local::fast::Key<crossbeam_epoch::collector::LocalHandle>::try_initialize<crossbeam_epoch::collector::LocalHandle,fn() -> crossbeam_epoch::collector::LocalHandle> (self=0x7ffff7682500, init=0x0)
    at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/thread/local.rs:473
#23 0x0000555555e35577 in std::thread::local::fast::Key<crossbeam_epoch::collector::LocalHandle>::get<crossbeam_epoch::collector::LocalHandle,fn() -> crossbeam_epoch::collector::LocalHandle> (self=0x7ffff7682500, init=0x0)
    at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/thread/local.rs:456
#24 0x0000555555e3422d in crossbeam_epoch::default::HANDLE::__getit () at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/thread/local.rs:183
#25 0x0000555555e0da25 in std::thread::local::LocalKey<crossbeam_epoch::collector::LocalHandle>::try_with<crossbeam_epoch::collector::LocalHandle,closure-0,bool> (self=0x5555565e2d90, f=...)
    at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/thread/local.rs:271
#26 0x0000555555e061b3 in crossbeam_epoch::default::with_handle<closure-0,bool> (f=...) at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/default.rs:42
#27 0x0000555555e0641a in crossbeam_epoch::default::is_pinned () at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.7.2/src/default.rs:29
#28 0x0000555555e235f8 in crossbeam_deque::Stealer<rayon_core::job::JobRef>::steal<rayon_core::job::JobRef> (self=0x555556668a70)
    at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/crossbeam-deque-0.7.1/src/lib.rs:689
#29 0x0000555555e04f9a in rayon_core::registry::{{impl}}::steal::{{closure}} (victim_index=9) at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.6.0/src/registry.rs:765
#30 0x0000555555e01fcb in core::ops::function::impls::{{impl}}::call_mut<(usize),closure-1> (self=0x7ffff76806f8, args=...) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:269
#31 0x0000555555e0ac61 in core::iter::traits::iterator::Iterator::find_map::check::{{closure}}<usize,rayon_core::job::JobRef,&mut closure-1> (x=9)
    at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/iter/traits/iterator.rs:2257
#32 0x0000555555e11635 in core::iter::adapters::filter_try_fold::{{closure}}<usize,(),core::ops::control_flow::ControlFlow<rayon_core::job::JobRef, ()>,closure-0,closure-0> (acc=(), item=9)
    at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/iter/adapters/mod.rs:1078
#33 0x0000555555e0f48c in core::ops::function::impls::{{impl}}::call_mut<((), usize),closure-0> (self=0x7ffff76805b8, args=...) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:269
#34 0x0000555555e0e504 in core::iter::traits::iterator::Iterator::try_fold<core::ops::range::Range<usize>,(),&mut closure-0,core::ops::control_flow::ControlFlow<rayon_core::job::JobRef, ()>> (self=0x7ffff76808d8, init=(),
    f=0x7ffff76806f0) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/iter/traits/iterator.rs:1888
#35 0x0000555555e05da3 in core::iter::adapters::chain::{{impl}}::try_fold<core::ops::range::Range<usize>,core::ops::range::Range<usize>,(),closure-0,core::ops::control_flow::ControlFlow<rayon_core::job::JobRef, ()>> (self=0x7ffff76808d0,
    acc=(), f=...) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/iter/adapters/chain.rs:105
#36 0x0000555555e0f246 in core::iter::adapters::{{impl}}::try_fold<core::iter::adapters::chain::Chain<core::ops::range::Range<usize>, core::ops::range::Range<usize>>,closure-0,(),closure-0,core::ops::control_flow::ControlFlow<rayon_core::job::JobRef, ()>> (self=0x7ffff76808d0, init=(), fold=...) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/iter/adapters/mod.rs:1127
#37 0x0000555555e112c1 in core::iter::traits::iterator::Iterator::find_map<core::iter::adapters::Filter<core::iter::adapters::chain::Chain<core::ops::range::Range<usize>, core::ops::range::Range<usize>>, closure-0>,rayon_core::job::JobRef,&mut closure-1> (self=0x7ffff76808d0, f=0x7ffff7680908) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/iter/traits/iterator.rs:2263
#38 0x0000555555e0f2b6 in core::iter::adapters::{{impl}}::next<rayon_core::job::JobRef,core::iter::adapters::Filter<core::iter::adapters::chain::Chain<core::ops::range::Range<usize>, core::ops::range::Range<usize>>, closure-0>,closure-1>
    (self=0x7ffff76808d0) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/iter/adapters/mod.rs:1245
#39 0x0000555555e04ec8 in rayon_core::registry::WorkerThread::steal (self=0x7ffff7680d80) at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.6.0/src/registry.rs:759
#40 0x0000555555e04bf2 in rayon_core::registry::{{impl}}::wait_until_cold::{{closure}}<rayon_core::latch::CountLatch> () at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.6.0/src/registry.rs:715
#41 0x0000555555e1dbaf in core::option::Option<rayon_core::job::JobRef>::or_else<rayon_core::job::JobRef,closure-0> (self=..., f=...) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/option.rs:752
#42 0x0000555555e048b7 in rayon_core::registry::WorkerThread::wait_until_cold<rayon_core::latch::CountLatch> (self=0x7ffff7680d80, latch=0x555556668d70)
    at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.6.0/src/registry.rs:713
#43 0x0000555555e043fb in rayon_core::registry::WorkerThread::wait_until<rayon_core::latch::CountLatch> (self=0x7ffff7680d80, latch=0x555556668d70)
    at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.6.0/src/registry.rs:693
#44 0x0000555555e054e4 in rayon_core::registry::main_loop (worker=..., registry=..., index=0) at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.6.0/src/registry.rs:813
#45 0x0000555555e022e0 in rayon_core::registry::ThreadBuilder::run (self=...) at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.6.0/src/registry.rs:58
#46 0x0000555555e02861 in rayon_core::registry::{{impl}}::spawn::{{closure}} () at /home/boeckb/misc/root/rustup/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.6.0/src/registry.rs:103
#47 0x0000555555e0f345 in std::sys_common::backtrace::__rust_begin_short_backtrace<closure-0,()> (f=...) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:137
#48 0x0000555555e1b6d1 in std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}<closure-0,()> () at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/thread/mod.rs:464
#49 0x0000555555e1a3a1 in std::panic::{{impl}}::call_once<(),closure-0> (self=..., _args=()) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs:308
#50 0x0000555555e0a852 in std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,()> (data=0x7ffff7681578) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:381
#51 0x0000555555e0bc1d in __rust_try ()
#52 0x0000555555e0a734 in std::panicking::try<(),std::panic::AssertUnwindSafe<closure-0>> (f=...) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:345
#53 0x0000555555e1a973 in std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,()> (f=...) at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs:382
#54 0x0000555555e1b4c1 in std::thread::{{impl}}::spawn_unchecked::{{closure}}<closure-0,()> () at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/thread/mod.rs:463
#55 0x0000555555e0f51f in core::ops::function::FnOnce::call_once<closure-0,()> () at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:227
#56 0x0000555556239fba in alloc::boxed::{{impl}}::call_once<(),FnOnce<()>> () at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs:1042
#57 alloc::boxed::{{impl}}::call_once<(),alloc::boxed::Box<FnOnce<()>>> () at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs:1042
#58 std::sys::unix::thread::{{impl}}::new::thread_start () at library/std/src/sys/unix/thread.rs:87
#59 0x00007ffff78b33f9 in start_thread () from /lib64/libpthread.so.0
#60 0x00007ffff7b15903 in clone () from /lib64/libc.so.6

The main difference is commit b56c3b7 which has a release note which mentions behavior changes around 1.36.

Maybe the fix is to upgrade, but I'd just like to leave this note here in case there's not another underlying bug that is actually showing up here.

@bluss
Copy link
Owner

bluss commented Jan 11, 2021

What about 0.4.12? And can you update to 0.5?

@bluss
Copy link
Owner

bluss commented Jan 11, 2021

This was in an old version of arrayvec and there is a fix in the 0.4 branch, so everything's as it should be. Fixed.

@bluss bluss closed this as completed Jan 11, 2021
@mathstuf
Copy link
Contributor Author

Yes, updating to 0.4.11 (or 0.4.12) fixes it (in that it doesn't crash anymore). I just want to make sure that the change made is understood to fix the crash rather than just having it be a side-effect. Basically: if there's was a soundness issue that was fixed, is it understood to actually have been fixed.

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