facebook / infer

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

Uncaught exception: Yojson.Json_error(...Junk after end of JSON value...) #691

Closed ratatosk closed 7 years ago

ratatosk commented 7 years ago

Rebuilt the image earlier today and now I'm hitting this:

Capturing in javac mode...
Uncaught exception:

  Yojson.Json_error("Line 22, bytes 0-25:\nJunk after end of JSON value: '_bucket_length\": 0\n  }\n}'")

Raised at file "common.ml", line 5, characters 19-39
Called from file "read.mll", line 1111, characters 6-21
Called from file "read.mll", line 1128, characters 6-26
Called from file "read.mll", line 1135, characters 14-47
Re-raised at file "read.mll", line 1140, characters 6-13
Called from file "backend/StatsAggregator.re" (inlined), line 113, characters 29-56
Called from file "backend/StatsAggregator.re", line 115, characters 49-70
Called from file "src/core_list0.ml", line 482, characters 13-17
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "src/core_list0.ml", line 489, characters 13-38
Called from file "backend/StatsAggregator.re", line 116, characters 23-39
Called from file "backend/StatsAggregator.re", line 143, characters 24-72
Called from file "backend/StatsAggregator.re", line 201, characters 10-36
Called from file "backend/infer.ml", line 514, characters 4-37
Called from file "backend/infer.ml", line 566, characters 32-45

The setup is the same as here: https://github.com/facebook/infer/pull/688 (I added -g to my wrapper) LMK if i can provide more info.

sblackshear commented 7 years ago

Is it possible that there were old stats files from your previous Infer build/run lying around? This looks like it could be the result of processing an old-format stats file with a new build.

ratatosk commented 7 years ago

I have just realized that Dockerfile fetches the same release version every time, so no, it should have been the same version. And I think I removed the infer-out directory. Strangely enough I haven't seen this error previously with the same version. Probably my fault setting up environment. I'll retry with master and close this if it doesn't reproduce.

jvillard commented 7 years ago

There used to be a race condition in the aggregation of stats files like the one you posted, it should be fixed in master.

sblackshear commented 7 years ago

@ratatosk, do you still see the error with the latest version of Infer?

sblackshear commented 7 years ago

Closing, but feel free to re-open if you see the issue with the latest version.