From 549bfd28ebda80e972a8dd8f10621d3f73977f68 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Fri, 12 Jul 2019 11:17:56 -0600 Subject: [PATCH] Try to fix the test_aio_suspend crashes in Travis test_aio_suspend has recently begun to fail on Travis on Linux with rust-nightly with this error message: "../sysdeps/pthread/aio_suspend.c:102: do_aio_misc_wait: Assertion `status == 0 || status == -11' failed" That error is coming from within glibc itself. I'm guessing that glibc's aio_suspend isn't handling signals correctly, probably due to this bug: https://sourceware.org/bugzilla/show_bug.cgi?id=13172 --- test/sys/test_aio.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/sys/test_aio.rs b/test/sys/test_aio.rs index d4b09b0b81..d985adfc8a 100644 --- a/test/sys/test_aio.rs +++ b/test/sys/test_aio.rs @@ -134,6 +134,12 @@ fn test_fsync_error() { #[test] #[cfg_attr(all(target_env = "musl", target_arch = "x86_64"), ignore)] fn test_aio_suspend() { + // Glibc's aio_suspend implementation isn't async-signal-safe, and it causes + // assertions (within glibc) on Travis. + // https://sourceware.org/bugzilla/show_bug.cgi?id=13172 + #[cfg(target_env = "glibc")] + let _m = ::SIGNAL_MTX.lock().expect("Mutex got poisoned by another test"); + const INITIAL: &[u8] = b"abcdef123456"; const WBUF: &[u8] = b"CDEFG"; let timeout = TimeSpec::seconds(10);