Closed Bug 872244 Opened 6 years ago Closed 6 years ago

Collect /data/anr/traces.txt after Android test runs

Categories

(Testing :: General, defect)

x86
Android
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla24

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file, 1 obsolete file)

Sometimes logcat shows something like:

I/dalvikvm( 4345): Wrote stack traces to '/data/anr/traces.txt'

and we wonder "What is in those stack traces?"

Let's pull that file, dump it, and delete it.
Blocks: 869030
Attached patch dump /data/anr/traces.txt (obsolete) — Splinter Review
This hangs off of checkForCrashes for convenience.

After a test run, at the start of checkForCrashes, this checks for /data/anr/traces.txt. If found, the file is pulled, displayed, and then deleted from the remote device. The first time this runs on a device, we will often see a large file dumped, with traces from some time(s) in the past. The file will be deleted and then subsequent runs will typically only report ANRs reported during that test. Note that ANR entries in traces.txt have a date and time -- easy to differentiate old from new.

Try run here shows this in action on tegras and pandas: https://tbpl.mozilla.org/?tree=Try&rev=c79b3d6497a9
Attachment #749506 - Flags: review?(jmaher)
Comment on attachment 749506 [details] [diff] [review]
dump /data/anr/traces.txt

Review of attachment 749506 [details] [diff] [review]:
-----------------------------------------------------------------

I would like to delete the traces before we start the test, otherwise this looks fine.
Attachment #749506 - Flags: review?(jmaher) → review-
As before, but now the traces.txt file is deleted before starting any mochitest or reftest.
Attachment #749506 - Attachment is obsolete: true
Attachment #750609 - Flags: review?(jmaher)
Comment on attachment 750609 [details] [diff] [review]
dump /data/anr/traces.txt

Review of attachment 750609 [details] [diff] [review]:
-----------------------------------------------------------------

thanks!
Attachment #750609 - Flags: review?(jmaher) → review+
https://hg.mozilla.org/mozilla-central/rev/88c2b93e0748
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.