The logcat file is sometimes not read correctly for a crash. In particular, LogcatExtractionCallable::getLogcatInternal() calls extractLogcatFromReader() in a loop, and on each iteration overwrites the read logcat data. Relatively often, I observed this resulting in a failure to read the logcat contents, because the first call to extractLogcatFromReader() returned nonempty contents, and the second call returned empty contents.
I'm not sure of the best way to fix this. Some ideas:
(1) Treat the logcat file read as chunked, and append results from calls to extractLogcatFromReader()
(2) Don't call extractLogcatFromReader() until the "logcat -d" command completes. I'm not sure whether the output of the command is consistently available after the command completes.
(3) Something completely different and much more clever (or much more simple).
Comment 1 by bugdroid1@chromium.org
, Sep 27 2016