|
From: Marcin J. <mju...@re...> - 2016-09-16 21:37:12
|
Hi everyone! At start I would like to tell that I may not know how exactly Valgrind works and how to use it for personal projects. But (as distribution developer/packager) I built lot of software. During last few years most of my work was related to AArch64 architecture and I pushed wherever I could to get Valgrind working and used there. About week ago some of my bugs against Valgrind got closed and when I read all bugs I reported in past (especially bug 359503 [1]) I decided to check how LTP (Linux Test Project) would work when run with Valgrind on AArch64 box. 1. https://bugs.kde.org/show_bug.cgi?id=359503 So I started it. Then stopped as I had some work to do and needed that box. Then started again. etc Result so far is 19 bugs reported to get system calls implemented. Hope that there will be more as I want AArch64 to be fully covered ;D But how to run LTP under Valgrind? Does it involve magic? Is it easy? 1. fetch LTP code from git://github.com/linux-test-project/ltp 2. build it 3. run "runltp -M3" I edited 'runalltests.sh' script, and changed calls to 'runltp' to have '-M3' argument added. When you go to [2] you will see logs from my runs. They are from Fedora/rawhide system. Today's one (2016_09_16-22h_25m_48s) has 'runtest/syscalls' in reverse order to catch all missing system calls earlier. 2. https://fedora.juszkiewicz.com.pl/ltp/ If you look to logs you will see that impossible things happened. For example: ----------------------------------------------------------------------------- <<<test_start>>> tag=rt_sigprocmask02_valgrind_thread_concurrency_check stime=1473974621 cmdline=" valgrind -q --tool=helgrind --trace-children=yes rt_sigprocmask02" contacts="" analysis=exit <<<test_output>>> --25286-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting --25286-- si_code=1; Faulting address: 0xFFFFFFFFFFFFFF; sp: 0x802fafbe0 valgrind: the 'impossible' happened: Killed by fatal signal host stacktrace: ==25286== at 0x3803B0CC: ??? (in /usr/lib64/valgrind/helgrind-arm64-linux) ==25286== by 0x3809B5EB: ??? (in /usr/lib64/valgrind/helgrind-arm64-linux) ==25286== by 0x3807A5CB: ??? (in /usr/lib64/valgrind/helgrind-arm64-linux) ==25286== by 0x38076F8F: ??? (in /usr/lib64/valgrind/helgrind-arm64-linux) ==25286== by 0x38078A3B: ??? (in /usr/lib64/valgrind/helgrind-arm64-linux) ==25286== by 0x380897EB: ??? (in /usr/lib64/valgrind/helgrind-arm64-linux) ==25286== by 0xFFFFFFFFFFFFFFFF: ??? sched status: running_tid=1 Thread 1: status = VgTs_Runnable (lwpid 25286) ==25286== at 0x49CECD4: syscall (in /usr/lib64/libc-2.24.90.so) ==25286== by 0x402A9F: main (rt_sigprocmask02.c:107) Note: see also the FAQ in the source distribution. It contains workarounds to several common problems. In particular, if Valgrind aborted or crashed after identifying problems in your program, there's a good chance that fixing those problems will prevent Valgrind aborting or crashing, especially if it happened in m_mallocfree.c. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what OS and version you are using. Thanks. <<<execution_status>>> initiation_status="ok" duration=1 termination_type=exited termination_id=1 corefile=no cutime=30 cstime=1 <<<test_end>>> ----------------------------------------------------------------------------- Or others. Some of those may require code changes but catching which ones is a bit beyond my knowledge. If you tell me which types should be reported as bugs I would do that next week. I would like to thank Mark Wielaard (mjw) for his help with handling most of my Valgrind issues. |