Skip to content
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

Detected non-deterministic results when --jobs is not set to 1 #1819

Open
4 tasks
AnnabellaM opened this issue Mar 20, 2024 · 2 comments
Open
4 tasks

Detected non-deterministic results when --jobs is not set to 1 #1819

AnnabellaM opened this issue Mar 20, 2024 · 2 comments

Comments

@AnnabellaM
Copy link

Hi, I have recently been using Infer for an empirical study to detect non-deterministic behaviors in static analyzers. The experiments resulted in discovering some nondeterministic analysis results across multiple runs under various configurations of Infer.

  • The version of Infer I used is v1.1.0.
  • The operating system is ubuntu:20.04and I am using Docker.
  • I ran Infer on 20 sampling configurations. The base command I used is infer --compilation-database compile_commands.json with following checkers on --annotation-reachability --bufferoverrun --cost --loop-hoisting --pulse, as well as these options used--dump-duplicate-symbols --headers --max-nesting --jobs --reactive --scheduler.
  • I ran Infer on each program-configuration combination 5 times and compared the results across 5 runs for detecting non-deterministic behaviors. The program I used is openssl. And the nondeterministic results are found under the configurations shown below. As observed, these nondeterminism all happen when the --jobs option is not set to 1.
image

For example, here are some different results from the running Infer under the same configuration --headers --max-nesting 1 --jobs 5 --reactive --scheduler callgraph .
result 1:
image
result 2:
image
result 3:
image

Could you please offer some insights into this issue and suggest ways to mitigate the non-deterministic behavior when running Infer with multiple jobs? Thank you.

@AnnabellaM
Copy link
Author

Hello Infer team, I'm following up on this issue and would greatly appreciate any insights you could provide. Thank you!

@ngorogiannis
Copy link
Member

Hi, it is indeed a known issue. Several fixes have landed on master since the 1.1 release (we ought to do one soon), so I would suggest:

  • trying master
  • disabling biabduction (if not already)
  • using the restart scheduler
  • code with recursive functions may still exhibit non-determinism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants