Bug 492388

Summary: Detected nondeterminism in Valgrind's log for Helgrind
Product: [Developer tools] valgrind Reporter: jo.alen1 <jo.alen1>
Component: helgrindAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.18.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=492343
https://bugs.kde.org/show_bug.cgi?id=492382
https://bugs.kde.org/show_bug.cgi?id=492348
https://bugs.kde.org/show_bug.cgi?id=492386
https://bugs.kde.org/show_bug.cgi?id=492389
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: PDF that shows file differences between Run #1 and Run #2 of the same binary under Helgrind

Description jo.alen1@outlook.com 2024-08-30 04:13:33 UTC
Created attachment 173112 [details]
PDF that shows file differences between Run #1 and Run #2 of the same binary under Helgrind

Hi Valgrind Maintainers and Team!

I have been using Valgrind as a tool to check for nondeterministic behaviors and I know that there are multiple subtools that Valgrind's suite comes with. I would like to inquire about the Helgrind subtool in analyzing some of the reports generated after each run against a binary. This nondeterminism concerns the the Valgrind generated report. Out of 41 repositories we've tested against Helgrind, we observed 4/41 showing nondeterministic reporting for their respective binaries tested.

Would the respective team and its maintainers for this product take a look at this issue and provide possible explanations? Thank you very much!

STEPS TO REPRODUCE
1. Use a GitHub Actions runner with Ubuntu 22.04 + Valgrind 3.18.1 pulled from the Ubuntu package manager
2. Run your executable with Helgrind enabled. 
3. Obtain the Valgrind report

OBSERVED RESULT
We noticed that out of these four repositories that reported nondeterminism in their Valgrind logs, we saw two distinct variations these logs experienced: either the difference in the number of errors reported and what errors are reported or the different stack traces produced. In the given attachment, the left column represents Run #1 while the right column represents Run #2. If you analyze pages five and six of the attached PDF, you'll notice how Run #2 reports two additional possible data races. Additionally, both runs have different error summary fields with the different error count and context count. 

ADDITIONAL INFORMATION
Scroll down to pages five and six of the attached PDF to see the difference between the two runs of the same binary done under the same configurations.