Bug 439082 - memcheck/tests/linux/stack_changes fails on qemuarm64 builds
Summary: memcheck/tests/linux/stack_changes fails on qemuarm64 builds
Status: CONFIRMED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.15 SVN
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-23 16:40 UTC by Tony Tascioglu
Modified: 2024-07-15 12:02 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
expected vs actual test result from stderr (2.83 KB, text/plain)
2021-06-23 17:40 UTC, Tony Tascioglu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Tascioglu 2021-06-23 16:40:08 UTC
We are running into an issue with the stack_changes test in Yocto.

Running memcheck/tests/linux/stack_changes using the vg-regtest script on qemuarm64 running Poky, causes the test to fail consistently.
When built and run on an ARM Raspberry Pi, the test passes.

The tests fail as follows:
"vg_regtest: `/usr/lib/valgrind/ptest/./coregrind/valgrind' not found or not a file (/usr/lib/valgrind/ptest)"

This is an issue also found by the Yocto project autobuilder.
Corresponding issue on YP bugzilla with the autobuilder logs: https://bugzilla.yoctoproject.org/show_bug.cgi?id=14430
Comment 1 Tony Tascioglu 2021-06-23 17:38:22 UTC
My apologies, that log is from an older testing attempt that was run without the --valgrind and --valgrind-lib parameters.

When run correctly as follows, the test fails with the incorrect diff seen during testing.

root@qemuarm64:/usr/lib/valgrind/ptest# ./tests/vg_regtest --valgrind=/usr/bin/valgrind --valgrind-lib=/usr/libexec/valgrind memcheck/tests/linux/stack_changes 
stack_changes:   valgrind   -q ./stack_changes
*** stack_changes failed (stderr) ***

== 1 test, 1 stderr failure, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/linux/stack_changes       (stderr)

I have attached the stderr diff between the expected output and the result from the test that causes the failure.
Comment 2 Tony Tascioglu 2021-06-23 17:40:01 UTC
Created attachment 139623 [details]
expected vs actual test result from stderr
Comment 3 Tony Tascioglu 2021-07-23 16:30:20 UTC
This works fine on x86_64, and it works when compiled on a Raspberry Pi, but when cross-compiled with Yocto and run on qemuarm64 (on an x86_64 build host), it fails close to 100% of the time. Is there something we can do to help gather more information to help debug this or make progress on the bug?
Thanks,
Tony
Comment 4 Paul Floyd 2024-05-24 12:56:37 UTC
Do you still have this problem? If so could you attach the unfiltered log file?

Run
perl tests/vg_regtest --keep-unfiltered memcheck/tests/linux/stack_changes 

and then attach

stack_changes.stderr.out.unfiltered.out

I'll try it on FreeBSD - reading the commit comments, it's only Darwin that doesn't work with this test.