Skip to content

Fix failing rpass-valgrind test #29896

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

Closed
nrc opened this issue Nov 17, 2015 · 6 comments
Closed

Fix failing rpass-valgrind test #29896

nrc opened this issue Nov 17, 2015 · 6 comments
Assignees
Labels
P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nrc
Copy link
Member

nrc commented Nov 17, 2015

This is blocking turning valgrind tests back on.

exit-flushes.rs is apparently the culprit.

cc @edunham, @nikomatsakis, @alexcrichton

(p-high since it is blocking fixing our test infra)

@nrc nrc added P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 17, 2015
@nrc
Copy link
Member Author

nrc commented Nov 17, 2015

cc @nagisa

@nrc
Copy link
Member Author

nrc commented Nov 17, 2015

cc @rust-lang/compiler (I wish labelling T-compiler did this automatically)

@alexcrichton
Copy link
Member

What's the actual errors here? Running valgrind without flags reports:

$ valgrind ./exit-flushes
==15994== Memcheck, a memory error detector
==15994== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==15994== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==15994== Command: ./exit-flushes
==15994== 
==15994== 
==15994== HEAP SUMMARY:
==15994==     in use at exit: 32 bytes in 1 blocks
==15994==   total heap usage: 52 allocs, 51 frees, 3,200 bytes allocated
==15994== 
==15994== LEAK SUMMARY:
==15994==    definitely lost: 0 bytes in 0 blocks
==15994==    indirectly lost: 0 bytes in 0 blocks
==15994==      possibly lost: 0 bytes in 0 blocks
==15994==    still reachable: 32 bytes in 1 blocks
==15994==         suppressed: 0 bytes in 0 blocks
==15994== Rerun with --leak-check=full to see details of leaked memory
==15994== 
==15994== For counts of detected and suppressed errors, rerun with: -v
==15994== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

And running with more flags:

$ valgrind --show-leak-kinds=all --leak-check=full ./exit-flushes
==16010== Memcheck, a memory error detector
==16010== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==16010== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==16010== Command: ./exit-flushes
==16010== 
==16010== 
==16010== HEAP SUMMARY:
==16010==     in use at exit: 32 bytes in 1 blocks
==16010==   total heap usage: 52 allocs, 51 frees, 3,200 bytes allocated
==16010== 
==16010== 32 bytes in 1 blocks are still reachable in loss record 1 of 1
==16010==    at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16010==    by 0x4E3868F: _dlerror_run (dlerror.c:141)
==16010==    by 0x4E380C0: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==16010==    by 0x115427: dynamic_lib::_$LT$impl$GT$::open::h18d9049daa783e54g0d (in /home/alex/code/rust4/exit-flushes)
==16010==    by 0x11E675: sys::thread::_$LT$impl$GT$::new::h12092075689a77b6yFw (in /home/alex/code/rust4/exit-flushes)
==16010==    by 0x11BB4F: process::_$LT$impl$GT$::wait_with_output::h9de87472d42d007c8Qm (in /home/alex/code/rust4/exit-flushes)
==16010==    by 0x11B86C: process::_$LT$impl$GT$::output::hc2dfccaa9143d1c54Cm (in /home/alex/code/rust4/exit-flushes)
==16010==    by 0x11034A: main::h82a74a745ccbaed7iaa (in /home/alex/code/rust4/exit-flushes)
==16010==    by 0x1256B4: sys_common::unwind::try::try_fn::h5598476508523168281 (in /home/alex/code/rust4/exit-flushes)
==16010==    by 0x1229C8: __rust_try (in /home/alex/code/rust4/exit-flushes)
==16010==    by 0x125356: rt::lang_start::he15236a7da0e712coox (in /home/alex/code/rust4/exit-flushes)
==16010==    by 0x114329: main (in /home/alex/code/rust4/exit-flushes)
==16010== 
==16010== LEAK SUMMARY:
==16010==    definitely lost: 0 bytes in 0 blocks
==16010==    indirectly lost: 0 bytes in 0 blocks
==16010==      possibly lost: 0 bytes in 0 blocks
==16010==    still reachable: 32 bytes in 1 blocks
==16010==         suppressed: 0 bytes in 0 blocks
==16010== 
==16010== For counts of detected and suppressed errors, rerun with: -v
==16010== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

(which looks benign)

@nagisa
Copy link
Member

nagisa commented Nov 18, 2015

Happens with simple check-stage1-rpass-valgrind

---- [run-pass-valgrind] run-pass-valgrind/exit-flushes.rs stdout ----

error: test run failed!
status: exit code: 100
command: /usr/bin/valgrind --error-exitcode=100 --fair-sched=try --quiet --soname-synonyms=somalloc=NONE --suppressions=/home/nagisa/Documents/rust/rust/src/etc/x86.supp --tool=memcheck --leak-check=full x86_64-unknown-linux-gnu/test/run-pass-valgrind/exit-flushes.stage1-x86_64-unknown-linux-gnu
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
==28178== 288 bytes in 1 blocks are possibly lost in loss record 2 of 2
==28178==    at 0x4C2A987: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28178==    by 0x4011841: allocate_dtv (in /usr/lib/ld-2.22.so)
==28178==    by 0x401221D: _dl_allocate_tls (in /usr/lib/ld-2.22.so)
==28178==    by 0x5CDB044: pthread_create@@GLIBC_2.2.5 (in /usr/lib/libpthread-2.22.so)
==28178==    by 0x4F4E989: sys::thread::_$LT$impl$GT$::new::h18c8e1383a16a102QFw (in /home/nagisa/Documents/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-71b07a99.so)
==28178==    by 0x4F4BD67: thread::_$LT$impl$GT$::spawn::h8240507308132532220 (in /home/nagisa/Documents/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-71b07a99.so)
==28178==    by 0x4F4AE15: thread::spawn::h8206638966982322642 (in /home/nagisa/Documents/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-71b07a99.so)
==28178==    by 0x4F4341D: process::_$LT$impl$GT$::wait_with_output::read::h16290293560351911718 (in /home/nagisa/Documents/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-71b07a99.so)
==28178==    by 0x4F4042A: process::_$LT$impl$GT$::wait_with_output::h149e8dca7ba9fec96Pm (in /home/nagisa/Documents/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-71b07a99.so)
==28178==    by 0x4F402AD: process::_$LT$impl$GT$::output::_$LT$closure$GT$::closure.38650 (in /home/nagisa/Documents/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-71b07a99.so)
==28178==    by 0x4F40128: result::_$LT$impl$GT$::and_then::and_then::h12745603337970662170 (in /home/nagisa/Documents/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-71b07a99.so)
==28178==    by 0x4F40077: process::_$LT$impl$GT$::output::h85147110d45a11184Bm (in /home/nagisa/Documents/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-71b07a99.so)
==28178== 
------------------------------------------

@alexcrichton
Copy link
Member

Ah I think that may have been fixed by #29897

@nrc nrc self-assigned this Nov 19, 2015
@nrc
Copy link
Member Author

nrc commented Nov 20, 2015

Confirmed - we now pass all rpass-valgrind tests.

@nrc nrc closed this as completed Nov 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants