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

Spurious failure in run-make/sanitizer-memory #46313

Closed
kennytm opened this issue Nov 27, 2017 · 2 comments
Closed

Spurious failure in run-make/sanitizer-memory #46313

kennytm opened this issue Nov 27, 2017 · 2 comments
Labels
A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) C-tracking-issue Category: A tracking issue for an RFC or an unstable feature.

Comments

@kennytm
Copy link
Member

kennytm commented Nov 27, 2017

Symptom: on x86_64-gnu, the run-make/sanitizer-memory fails with exit code 2.

Example log
[01:11:45] failures:
[01:11:45] 
[01:11:45] ---- [run-make] run-make/sanitizer-memory stdout ----
[01:11:45] 	
[01:11:45] error: make failed
[01:11:45] status: exit code: 2
[01:11:45] command: "make"
[01:11:45] stdout:
[01:11:45] ------------------------------------------
[01:11:45] LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib:" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu  -g -Z sanitizer=memory -Z print-link-args uninit.rs | "/checkout/src/etc/cat-and-grep.sh" librustc_msan
[01:11:45] [[[ begin stdout ]]]
[01:11:45] �[90m"cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu/uninit.uninit0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu/uninit.uninit1.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu/uninit" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu/uninit.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-a99e131203633592.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-d795c34fd7eb72c9.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-0f4b95d88e53e455.rlib" "-Wl,--whole-archive" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu/rustc.C7xlHMKdVa9A/librustc_msan-92d1518a2bbae70e.rlib" "-Wl,--no-whole-archive" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-6d9370e956155877.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-f874e85b0fc1f5b8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-c7758873e5bedec1.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-c9b8ae6d904bd621.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-c80c8268f013635d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6389cf691b0a8db6.rlib" "-Wl,-Bdynamic" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util"
[01:11:45] �[0m
[01:11:45] [[[ end stdout ]]]
[01:11:45] /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu/uninit 2>&1 | "/checkout/src/etc/cat-and-grep.sh" use-of-uninitialized-value
[01:11:45] [[[ begin stdout ]]]
[01:11:45] �[90mFATAL: Code 0x0100d5be8c70 is out of application range. Non-PIE build?
[01:11:45] FATAL: MemorySanitizer can not mmap the shadow memory.
[01:11:45] FATAL: Make sure to compile with -fPIE and to link with -pie.
[01:11:45] FATAL: Disabling ASLR is known to cause this error.
[01:11:45] FATAL: If running under GDB, try 'set disable-randomization off'.
[01:11:45] ==21730==Process memory map follows:
[01:11:45] 	0x0100d5bc4000-0x0100d5c93000	/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu/uninit
[01:11:45] 	0x0100d5e93000-0x0100d5e98000	/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu/uninit
[01:11:45] 	0x0100d5e98000-0x0100d5e9b000	/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/sanitizer-memory.stage2-x86_64-unknown-linux-gnu/uninit
[01:11:45] 	0x0100d5e9b000-0x0100d8301000	
[01:11:45] 	0x7f2f79ec0000-0x7f2f7a212000	
[01:11:45] 	0x7f2f7a212000-0x7f2f7a31a000	/lib/x86_64-linux-gnu/libm-2.23.so
[01:11:45] 	0x7f2f7a31a000-0x7f2f7a519000	/lib/x86_64-linux-gnu/libm-2.23.so
[01:11:45] 	0x7f2f7a519000-0x7f2f7a51a000	/lib/x86_64-linux-gnu/libm-2.23.so
[01:11:45] 	0x7f2f7a51a000-0x7f2f7a51b000	/lib/x86_64-linux-gnu/libm-2.23.so
[01:11:45] 	0x7f2f7a51b000-0x7f2f7a6db000	/lib/x86_64-linux-gnu/libc-2.23.so
[01:11:45] 	0x7f2f7a6db000-0x7f2f7a8db000	/lib/x86_64-linux-gnu/libc-2.23.so
[01:11:45] 	0x7f2f7a8db000-0x7f2f7a8df000	/lib/x86_64-linux-gnu/libc-2.23.so
[01:11:45] 	0x7f2f7a8df000-0x7f2f7a8e1000	/lib/x86_64-linux-gnu/libc-2.23.so
[01:11:45] 	0x7f2f7a8e1000-0x7f2f7a8e5000	
[01:11:45] 	0x7f2f7a8e5000-0x7f2f7a8fb000	/lib/x86_64-linux-gnu/libgcc_s.so.1
[01:11:45] 	0x7f2f7a8fb000-0x7f2f7aafa000	/lib/x86_64-linux-gnu/libgcc_s.so.1
[01:11:45] 	0x7f2f7aafa000-0x7f2f7aafb000	/lib/x86_64-linux-gnu/libgcc_s.so.1
[01:11:45] 	0x7f2f7aafb000-0x7f2f7ab13000	/lib/x86_64-linux-gnu/libpthread-2.23.so
[01:11:45] 	0x7f2f7ab13000-0x7f2f7ad12000	/lib/x86_64-linux-gnu/libpthread-2.23.so
[01:11:45] 	0x7f2f7ad12000-0x7f2f7ad13000	/lib/x86_64-linux-gnu/libpthread-2.23.so
[01:11:45] 	0x7f2f7ad13000-0x7f2f7ad14000	/lib/x86_64-linux-gnu/libpthread-2.23.so
[01:11:45] 	0x7f2f7ad14000-0x7f2f7ad18000	
[01:11:45] 	0x7f2f7ad18000-0x7f2f7ad1f000	/lib/x86_64-linux-gnu/librt-2.23.so
[01:11:45] 	0x7f2f7ad1f000-0x7f2f7af1e000	/lib/x86_64-linux-gnu/librt-2.23.so
[01:11:45] 	0x7f2f7af1e000-0x7f2f7af1f000	/lib/x86_64-linux-gnu/librt-2.23.so
[01:11:45] 	0x7f2f7af1f000-0x7f2f7af20000	/lib/x86_64-linux-gnu/librt-2.23.so
[01:11:45] 	0x7f2f7af20000-0x7f2f7af23000	/lib/x86_64-linux-gnu/libdl-2.23.so
[01:11:45] 	0x7f2f7af23000-0x7f2f7b122000	/lib/x86_64-linux-gnu/libdl-2.23.so
[01:11:45] 	0x7f2f7b122000-0x7f2f7b123000	/lib/x86_64-linux-gnu/libdl-2.23.so
[01:11:45] 	0x7f2f7b123000-0x7f2f7b124000	/lib/x86_64-linux-gnu/libdl-2.23.so
[01:11:45] 	0x7f2f7b124000-0x7f2f7b14a000	/lib/x86_64-linux-gnu/ld-2.23.so
[01:11:45] 	0x7f2f7b336000-0x7f2f7b347000	
[01:11:45] 	0x7f2f7b347000-0x7f2f7b349000	
[01:11:45] 	0x7f2f7b349000-0x7f2f7b34a000	/lib/x86_64-linux-gnu/ld-2.23.so
[01:11:45] 	0x7f2f7b34a000-0x7f2f7b34b000	/lib/x86_64-linux-gnu/ld-2.23.so
[01:11:45] 	0x7f2f7b34b000-0x7f2f7b34c000	
[01:11:45] 	0x7ffcca182000-0x7ffcca1a4000	[stack]
[01:11:45] 	0x7ffcca1b5000-0x7ffcca1b7000	[vvar]
[01:11:45] 	0x7ffcca1b7000-0x7ffcca1b9000	[vdso]
[01:11:45] 	0xffffffffff600000-0xffffffffff601000	[vsyscall]
[01:11:45] ==21730==End of process memory map.
[01:11:45] �[0m
[01:11:45] [[[ end stdout ]]]
[01:11:45] �[1;31mError: cannot match: use-of-uninitialized-value�[0m
[01:11:45] Makefile:6: recipe for target 'all' failed
[01:11:45] 
[01:11:45] ------------------------------------------
[01:11:45] stderr:
[01:11:45] ------------------------------------------
[01:11:45] warning: unused variable: `y`
[01:11:45]   --> uninit.rs:15:9
[01:11:45]    |
[01:11:45] 15 |     let y = xs[0] + xs[1];
[01:11:45]    |         ^
[01:11:45]    |
[01:11:45]    = note: #[warn(unused_variables)] on by default
[01:11:45]    = note: to avoid this warning, consider using `_y` instead
[01:11:45] 
[01:11:45] make: *** [all] Error 1
[01:11:45] 
[01:11:45] ------------------------------------------
[01:11:45] 
[01:11:45] thread '[run-make] run-make/sanitizer-memory' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:2570:8
[01:11:45] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:11:45] 
[01:11:45] 
[01:11:45] failures:
[01:11:45]     [run-make] run-make/sanitizer-memory
[01:11:45] 
[01:11:45] test result: �[31mFAILED�(B�[m. 167 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

Affected PRs:

Potentially relevant: golang/go#12898

@kennytm kennytm added A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Nov 27, 2017
@arielb1
Copy link
Contributor

arielb1 commented Dec 18, 2017

My Debian does not exhibit this spurious failure, even after 10000 executions.

HOWEVER, Some googling had found google/sanitizers#856

The breaking change is also present in Ubuntu kernel 4.4.0-93

From https://api.travis-ci.org/v3/job/318251396/log.txt

Runtime kernel version: 4.4.0-93-generic

Could someone with easy access to the alleged kernel check that it is indeed broken?

@tmiasko
Copy link
Contributor

tmiasko commented Aug 29, 2020

This issue should be closed. The test case had been rewritten and there haven't been any failures for quite some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) C-tracking-issue Category: A tracking issue for an RFC or an unstable feature.
Projects
None yet
Development

No branches or pull requests

4 participants