facebook / infer

A static analyzer for Java, C, C++, and Objective-C
http://fbinfer.com/
MIT License
14.79k stars 2k forks source link

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

Open AnnabellaM opened 3 months ago

AnnabellaM commented 3 months ago

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.

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 commented 3 months ago

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

ngorogiannis commented 3 months ago

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: