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

Test failures on 32 bit architectures #16

Open
sebastinas opened this issue Sep 8, 2024 · 4 comments · Fixed by #17
Open

Test failures on 32 bit architectures #16

sebastinas opened this issue Sep 8, 2024 · 4 comments · Fixed by #17

Comments

@sebastinas
Copy link

While packaging concurrent_arena, we have observed test failures on 32 bit architectures:

179s running 13 tests
179s test arena::tests::realworld_test ... FAILED
179s test arena::tests::test_new ... FAILED
179s test arena::tests::test_with_capacity ... FAILED
180s test bitmap::tests::realworld_test ... ok
180s test arcs::tests::test ... ok
181s test bucket::tests::realworld_test ... FAILED
181s test bucket::tests::test_basic ... FAILED
181s test bucket::tests::test_clone ... FAILED
181s test bucket::tests::test_concurrent_remove ... FAILED
181s test bucket::tests::test_concurrent_remove2 ... FAILED
181s test bucket::tests::test_reuse ... FAILED
181s test bucket::tests::test_reuse2 ... FAILED
181s test bitmap::tests::test ... ok
181s 
181s failures:
181s 
181s ---- arena::tests::realworld_test stdout ----
181s thread 'arena::tests::realworld_test' panicked at src/arena.rs:67:5:
181s BITARRAY_LEN must be equal to LEN / usize::BITS
181s stack backtrace:
181s    0: std::panicking::begin_panic
181s              at /usr/src/rustc-1.79.0/library/std/src/panicking.rs:693:12
181s    1: concurrent_arena::arena::check_const_generics
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:67:5
181s    2: concurrent_arena::arena::Arena<T,_,_>::with_capacity
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:89:9
181s    3: concurrent_arena::arena::tests::realworld_test
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:288:61
181s    4: concurrent_arena::arena::tests::realworld_test::{{closure}}
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:279:24
181s    5: core::ops::function::FnOnce::call_once
181s              at /usr/src/rustc-1.79.0/library/core/src/ops/function.rs:250:5
181s    6: core::ops::function::FnOnce::call_once
181s              at /usr/src/rustc-1.79.0/library/core/src/ops/function.rs:250:5
181s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
181s 
181s ---- arena::tests::test_new stdout ----
181s thread 'arena::tests::test_new' panicked at src/arena.rs:67:5:
181s BITARRAY_LEN must be equal to LEN / usize::BITS
181s stack backtrace:
181s    0: std::panicking::begin_panic
181s              at /usr/src/rustc-1.79.0/library/std/src/panicking.rs:693:12
181s    1: concurrent_arena::arena::check_const_generics
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:67:5
181s    2: concurrent_arena::arena::Arena<T,_,_>::with_capacity
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:89:9
181s    3: concurrent_arena::arena::Arena<T,_,_>::new
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:85:9
181s    4: concurrent_arena::arena::tests::test_new
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:255:38
181s    5: concurrent_arena::arena::tests::test_new::{{closure}}
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:254:18
181s    6: core::ops::function::FnOnce::call_once
181s              at /usr/src/rustc-1.79.0/library/core/src/ops/function.rs:250:5
181s    7: core::ops::function::FnOnce::call_once
181s              at /usr/src/rustc-1.79.0/library/core/src/ops/function.rs:250:5
181s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
181s 
181s ---- arena::tests::test_with_capacity stdout ----
181s thread 'arena::tests::test_with_capacity' panicked at src/arena.rs:67:5:
181s BITARRAY_LEN must be equal to LEN / usize::BITS
181s stack backtrace:
181s    0: std::panicking::begin_panic
181s              at /usr/src/rustc-1.79.0/library/std/src/panicking.rs:693:12
181s    1: concurrent_arena::arena::check_const_generics
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:67:5
181s    2: concurrent_arena::arena::Arena<T,_,_>::with_capacity
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:89:9
181s    3: concurrent_arena::arena::tests::test_with_capacity
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:262:38
181s    4: concurrent_arena::arena::tests::test_with_capacity::{{closure}}
181s              at /usr/share/cargo/registry/concurrent-arena-0.1.8/src/arena.rs:261:28
181s    5: core::ops::function::FnOnce::call_once
181s              at /usr/src/rustc-1.79.0/library/core/src/ops/function.rs:250:5
181s    6: core::ops::function::FnOnce::call_once
181s              at /usr/src/rustc-1.79.0/library/core/src/ops/function.rs:250:5
181s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
181s 
181s 
181s failures:
181s     arena::tests::realworld_test
181s     arena::tests::test_new
181s     arena::tests::test_with_capacity
181s     bucket::tests::realworld_test
181s     bucket::tests::test_basic
181s     bucket::tests::test_clone
181s     bucket::tests::test_concurrent_remove
181s     bucket::tests::test_concurrent_remove2
181s     bucket::tests::test_reuse
181s     bucket::tests::test_reuse2

For a full log, see https://ci.debian.net/packages/r/rust-concurrent-arena/testing/i386/50631019/.

@NobodyXu
Copy link
Owner

Thanks, this is probably because I hardcoded some numbers for 64-bit platform, I would investigate and fix this.

@NobodyXu
Copy link
Owner

@sebastinas the tests have been fixed, if you've found other issues when packaging it, I'll be more than happy to solve them.

@sebastinas
Copy link
Author

Thanks, that fixed it on most of our 32 bit architectures except for armel. The remaining errors there are:

332s running 13 tests
332s test arena::tests::test_new ... FAILED
332s test arena::tests::test_with_capacity ... FAILED
334s test bucket::tests::test_basic ... ok
334s test bucket::tests::test_reuse2 ... ok
334s test bucket::tests::realworld_test ... ok
334s test bucket::tests::test_concurrent_remove ... ok
334s test arcs::tests::test ... ok
334s test bucket::tests::test_concurrent_remove2 ... ok
334s test bucket::tests::test_clone ... ok
334s test bitmap::tests::realworld_test ... ok
334s test arena::tests::realworld_test ... ok
334s test bucket::tests::test_reuse ... ok
334s test bitmap::tests::test ... ok
334s 
334s failures:
334s 
334s ---- arena::tests::test_new stdout ----
334s thread 'arena::tests::test_new' panicked at src/bucket.rs:33:9:
334s assertion failed: cnt <= 1
334s stack backtrace:
334s    0: rust_begin_unwind
334s              at /usr/src/rustc-1.80.1/library/std/src/panicking.rs:652:5
334s    1: core::panicking::panic_fmt
334s              at /usr/src/rustc-1.80.1/library/core/src/panicking.rs:72:14
334s    2: core::panicking::panic
334s              at /usr/src/rustc-1.80.1/library/core/src/panicking.rs:146:5
334s    3: <concurrent_arena::bucket::Entry<T> as core::ops::drop::Drop>::drop
334s              at /usr/share/cargo/registry/concurrent-arena-0.1.9/src/bucket.rs:33:9
334s    4: core::ptr::drop_in_place<concurrent_arena::bucket::Entry<()>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s    5: core::ptr::drop_in_place<[concurrent_arena::bucket::Entry<()>; 32]>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s    6: core::ptr::drop_in_place<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s    7: core::ptr::drop_in_place<triomphe::arc::ArcInner<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s    8: core::ptr::drop_in_place<alloc::boxed::Box<triomphe::arc::ArcInner<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s    9: triomphe::arc::Arc<T>::drop_slow
334s              at /usr/share/cargo/registry/triomphe-0.1.9/src/arc.rs:236:42
334s   10: <triomphe::arc::Arc<T> as core::ops::drop::Drop>::drop
334s              at /usr/share/cargo/registry/triomphe-0.1.9/src/arc.rs:622:13
334s   11: core::ptr::drop_in_place<triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   12: core::ptr::drop_in_place<[triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>]>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   13: core::ptr::drop_in_place<triomphe::header::HeaderSlice<triomphe::header::HeaderWithLength<()>,[triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>]>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   14: core::ptr::drop_in_place<triomphe::arc::ArcInner<triomphe::header::HeaderSlice<triomphe::header::HeaderWithLength<()>,[triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>]>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   15: core::ptr::drop_in_place<alloc::boxed::Box<triomphe::arc::ArcInner<triomphe::header::HeaderSlice<triomphe::header::HeaderWithLength<()>,[triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>]>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   16: triomphe::arc::Arc<T>::drop_slow
334s              at /usr/share/cargo/registry/triomphe-0.1.9/src/arc.rs:236:42
334s   17: <triomphe::arc::Arc<T> as core::ops::drop::Drop>::drop
334s              at /usr/share/cargo/registry/triomphe-0.1.9/src/arc.rs:622:13
334s   18: core::ptr::drop_in_place<triomphe::arc::Arc<triomphe::header::HeaderSlice<triomphe::header::HeaderWithLength<()>,[triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>]>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   19: <triomphe::thin_arc::ThinArc<H,T> as core::ops::drop::Drop>::drop
334s              at /usr/share/cargo/registry/triomphe-0.1.9/src/thin_arc.rs:161:11
334s   20: core::ptr::drop_in_place<triomphe::thin_arc::ThinArc<(),triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   21: core::ptr::drop_in_place<core::option::Option<triomphe::thin_arc::ThinArc<(),triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   22: core::mem::drop
334s              at /usr/src/rustc-1.80.1/library/core/src/mem/mod.rs:938:24
334s   23: arc_swap::ref_cnt::RefCnt::dec
334s              at /usr/share/cargo/registry/arc-swap-1.6.0/src/ref_cnt.rs:86:9
334s   24: <arc_swap::ArcSwapAny<T,S> as core::ops::drop::Drop>::drop
334s              at /usr/share/cargo/registry/arc-swap-1.6.0/src/lib.rs:328:13
334s   25: core::ptr::drop_in_place<arc_swap::ArcSwapAny<core::option::Option<triomphe::thin_arc::ThinArc<(),triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   26: core::ptr::drop_in_place<concurrent_arena::arcs::Arcs<triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   27: core::ptr::drop_in_place<concurrent_arena::arena::Arena<(),1_usize,32_usize>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   28: concurrent_arena::arena::tests::test_new
334s              at /usr/share/cargo/registry/concurrent-arena-0.1.9/src/arena.rs:259:5
334s   29: concurrent_arena::arena::tests::test_new::{{closure}}
334s              at /usr/share/cargo/registry/concurrent-arena-0.1.9/src/arena.rs:255:18
334s   30: core::ops::function::FnOnce::call_once
334s              at /usr/src/rustc-1.80.1/library/core/src/ops/function.rs:250:5
334s   31: core::ops::function::FnOnce::call_once
334s              at /usr/src/rustc-1.80.1/library/core/src/ops/function.rs:250:5
334s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
334s 
334s ---- arena::tests::test_with_capacity stdout ----
334s thread 'arena::tests::test_with_capacity' panicked at src/bucket.rs:33:9:
334s assertion failed: cnt <= 1
334s stack backtrace:
334s    0: rust_begin_unwind
334s              at /usr/src/rustc-1.80.1/library/std/src/panicking.rs:652:5
334s    1: core::panicking::panic_fmt
334s              at /usr/src/rustc-1.80.1/library/core/src/panicking.rs:72:14
334s    2: core::panicking::panic
334s              at /usr/src/rustc-1.80.1/library/core/src/panicking.rs:146:5
334s    3: <concurrent_arena::bucket::Entry<T> as core::ops::drop::Drop>::drop
334s              at /usr/share/cargo/registry/concurrent-arena-0.1.9/src/bucket.rs:33:9
334s    4: core::ptr::drop_in_place<concurrent_arena::bucket::Entry<()>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s    5: core::ptr::drop_in_place<[concurrent_arena::bucket::Entry<()>; 32]>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s    6: core::ptr::drop_in_place<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s    7: core::ptr::drop_in_place<triomphe::arc::ArcInner<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s    8: core::ptr::drop_in_place<alloc::boxed::Box<triomphe::arc::ArcInner<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s    9: triomphe::arc::Arc<T>::drop_slow
334s              at /usr/share/cargo/registry/triomphe-0.1.9/src/arc.rs:236:42
334s   10: <triomphe::arc::Arc<T> as core::ops::drop::Drop>::drop
334s              at /usr/share/cargo/registry/triomphe-0.1.9/src/arc.rs:622:13
334s   11: core::ptr::drop_in_place<triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   12: core::ptr::drop_in_place<[triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>]>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   13: core::ptr::drop_in_place<triomphe::header::HeaderSlice<triomphe::header::HeaderWithLength<()>,[triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>]>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   14: core::ptr::drop_in_place<triomphe::arc::ArcInner<triomphe::header::HeaderSlice<triomphe::header::HeaderWithLength<()>,[triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>]>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   15: core::ptr::drop_in_place<alloc::boxed::Box<triomphe::arc::ArcInner<triomphe::header::HeaderSlice<triomphe::header::HeaderWithLength<()>,[triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>]>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   16: triomphe::arc::Arc<T>::drop_slow
334s              at /usr/share/cargo/registry/triomphe-0.1.9/src/arc.rs:236:42
334s   17: <triomphe::arc::Arc<T> as core::ops::drop::Drop>::drop
334s              at /usr/share/cargo/registry/triomphe-0.1.9/src/arc.rs:622:13
334s   18: core::ptr::drop_in_place<triomphe::arc::Arc<triomphe::header::HeaderSlice<triomphe::header::HeaderWithLength<()>,[triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>]>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   19: <triomphe::thin_arc::ThinArc<H,T> as core::ops::drop::Drop>::drop
334s              at /usr/share/cargo/registry/triomphe-0.1.9/src/thin_arc.rs:161:11
334s   20: core::ptr::drop_in_place<triomphe::thin_arc::ThinArc<(),triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   21: core::ptr::drop_in_place<core::option::Option<triomphe::thin_arc::ThinArc<(),triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   22: core::mem::drop
334s              at /usr/src/rustc-1.80.1/library/core/src/mem/mod.rs:938:24
334s   23: arc_swap::ref_cnt::RefCnt::dec
334s              at /usr/share/cargo/registry/arc-swap-1.6.0/src/ref_cnt.rs:86:9
334s   24: <arc_swap::ArcSwapAny<T,S> as core::ops::drop::Drop>::drop
334s              at /usr/share/cargo/registry/arc-swap-1.6.0/src/lib.rs:328:13
334s   25: core::ptr::drop_in_place<arc_swap::ArcSwapAny<core::option::Option<triomphe::thin_arc::ThinArc<(),triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   26: core::ptr::drop_in_place<concurrent_arena::arcs::Arcs<triomphe::arc::Arc<concurrent_arena::bucket::Bucket<(),1_usize,32_usize>>>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   27: core::ptr::drop_in_place<concurrent_arena::arena::Arena<(),1_usize,32_usize>>
334s              at /usr/src/rustc-1.80.1/library/core/src/ptr/mod.rs:542:1
334s   28: concurrent_arena::arena::tests::test_with_capacity
334s              at /usr/share/cargo/registry/concurrent-arena-0.1.9/src/arena.rs:266:5
334s   29: concurrent_arena::arena::tests::test_with_capacity::{{closure}}
334s              at /usr/share/cargo/registry/concurrent-arena-0.1.9/src/arena.rs:262:28
334s   30: core::ops::function::FnOnce::call_once
334s              at /usr/src/rustc-1.80.1/library/core/src/ops/function.rs:250:5
334s   31: core::ops::function::FnOnce::call_once
334s              at /usr/src/rustc-1.80.1/library/core/src/ops/function.rs:250:5
334s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
334s 
334s 
334s failures:
334s     arena::tests::test_new
334s     arena::tests::test_with_capacity

See https://ci.debian.net/packages/r/rust-concurrent-arena/testing/armel/51583890/ for the full log.

I am however not sure how much sense it makes to spend time on fixing things for armel. The next Debian release will probably be the last one with this architecture.

@NobodyXu
Copy link
Owner

Thanks for reporting, I will investigate to see if this is a bug and attempt to fix it.

@NobodyXu NobodyXu reopened this Sep 13, 2024
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.

2 participants