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

crossbeam-utils atomic::seq_lock::tests::test_abort unit test fails on 32-bit architectures #595

Closed
decathorpe opened this issue Nov 12, 2020 · 1 comment

Comments

@decathorpe
Copy link

From the test output:

test atomic::seq_lock::tests::test_abort ... FAILED
failures:
---- atomic::seq_lock::tests::test_abort stdout ----
thread 'atomic::seq_lock::tests::test_abort' panicked at 'assertion failed: `(left == right)`
  left: `(0, 0)`,
 right: `(0, 2)`: aborted write does not update the stamp', src/atomic/seq_lock_wide.rs:151:9

The same failure occurs on both i686 and armv7hl, on fedora rawhide. Running the tests on 64-bit architectures is fine.

Can I ignore this test failure for now or is it indicative of a real problem?

@jeehoonkang
Copy link
Contributor

I think it's indicative of a real problem. But I cannot understand why this happens, even though test_abort() is relatively easy because it's completely sequential without concurrency...

I wonder if inserting the following line between L112 and L113 works for your test environment (https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-utils/src/atomic/seq_lock_wide.rs#L112-L113):

mem::forget(self);

I'm suspecting that the write guard is wrongly dropped in abort().

bors bot added a commit that referenced this issue Nov 12, 2020
596: Fix a bug in seq_lock_wide (closes #595) r=jeehoonkang a=jeehoonkang

It's quite an embarrassing bug by me...

Co-authored-by: Jeehoon Kang <jeehoon.kang@kaist.ac.kr>
@bors bors bot closed this as completed in 4b1ce50 Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants