https://bugs.kde.org/show_bug.cgi?id=492348

--- Comment #3 from jo.al...@outlook.com <jo.al...@outlook.com> ---
(In reply to Paul Floyd from comment #1)
> Is the test exe totally deterministic?
> 
> An example of non-determinism is a threaded application that uses spinlocks.
> The number of CPU instructions spent in the spins will vary from run to run.
> 
> We can’t do much with just a screenshot. Can you provide a small reproducer?

Of course! I'm sorry if I responded late to this thread...had some things I was
busy with. I should've been more specific as to the "if the test exe is totally
deterministic", which I believe it is where I noticed that in GitHub Actions,
it showed nondeterministic reporting in 6/10 runs. Now, I felt like GitHub
Actions was probably including more program overhead before the main executable
could start, so I tried on my local Ubuntu 22.04 desktop and found out that
running the `./hashcat` command standalone did not report any nondeterminism
for 0/10 runs and was very consistent across those 10 runs. However, when I
tried with hashcat and provided it more options...
> hashcat -D 1 -m 0 -a 0 -o cracked.txt example.hashes example.wordlist 
(you can use the example.hashes and wordlist given in this folder:
https://drive.google.com/drive/folders/1ncz7tR1xrhSNBtysd6RWd0DLehsIMSI7?usp=sharing)
...I noticed only 5/10 runs showing some nondeterminism, where the rest of the
five had either very similar or no variations in their logs after exporting it
using cg_annotate. 

To reproduce the hashcat example from the screenshot:
1. You'll need to fork the hashcat GitHub repository and create a GitHub Action
to run Valgrind on the repository
2. In that Action, you need to checkout that repository and then run `make` in
the folder of that repository
3. Then run Cachegrind on the ./hashcat executable for ten consecutive times
and run 

Also, with the given C file I created to demonstrate some variation of
nondeterminism using those spinlocks you mentioned, and I deduce that this C
program provided 5/10 meaningful nondeterministic where the percents seem to
vastly change on a local run. 

To reproduce the small reproducer example:
1. Download the C file from this drive link:
https://drive.google.com/file/d/1QIVUAFuWbPcPAas8pfCz3H1-E0xxgmf8/view?usp=sharing
2. Compile using gcc and enable the pthread options 
3. Run Cachegrind on the made executable 10 times and then use cg_annotate to
get the readable version from the Cachegrind made log

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to