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

Failure in sync::mutex::test::try_lock #19797

Closed
kmcallister opened this issue Dec 13, 2014 · 3 comments
Closed

Failure in sync::mutex::test::try_lock #19797

kmcallister opened this issue Dec 13, 2014 · 3 comments

Comments

@kmcallister
Copy link
Contributor

$ make check
...

---- sync::mutex::test::try_lock stdout ----
        task 'sync::mutex::test::try_lock' panicked at 'assertion failed: `(left == right) && (right == left)` (left: `16`, right: `0`)', /home/keegan/rust/src/libstd/sys/unix/mutex.rs:50



failures:
    sync::mutex::test::try_lock

test result: FAILED. 788 passed; 1 failed; 63 ignored; 0 measured

task '<main>' panicked at 'Some tests failed', /home/keegan/rust/src/libtest/lib.rs:265
/home/keegan/rust/mk/tests.mk:477: recipe for target 'tmp/check-stage2-T-x86_64-unknown-linux-gnu-H-x86_64-unknown-linux-gnu-std.ok' failed
make: *** [tmp/check-stage2-T-x86_64-unknown-linux-gnu-H-x86_64-unknown-linux-gnu-std.ok] Error 101

$ uname -a
Linux rustmouth 3.16-2-amd64 #1 SMP Debian 3.16.3-2 (2014-09-20) x86_64 GNU/Linux

$ ./x86_64-unknown-linux-gnu/stage2/bin/rustc --version
rustc 0.13.0-dev (ffc111889 2014-12-12 21:07:19 +0000)
@alexcrichton
Copy link
Member

After talking with @kmcallister on IRC, turns out this also produced an error for him:

#include <assert.h>
#include <pthread.h>
#include <stdio.h>

int main() {
    pthread_mutex_t lock;

    assert(pthread_mutex_init(&lock, NULL) == 0);
    assert(pthread_mutex_trylock(&lock) == 0);
    assert(pthread_mutex_unlock(&lock) == 0);
    assert(pthread_mutex_destroy(&lock) == 0);
}

I think this may be a local bug rather than a bug in Rust, so closing.

@kmcallister
Copy link
Contributor Author

Fixed by apt-get dist-upgrade. This is what I get for running Debian unstable...

@sylvestre
Copy link
Contributor

I had the same issue. Upgrading the package libc6 from 2.19-12 to 2.19-13 fixed this issue.

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

3 participants