Detect anr traces directory

RESOLVED FIXED in Firefox 63

Status

enhancement
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: bc, Assigned: bc)

Tracking

Trunk
mozilla63
Points:
---

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(2 attachments)

Beginning in Android 8.1 /data/anr/traces.txt no longer contains
a single file traces.txt but instead will contain individual files
for each stack.

See https://github.com/aosp-mirror/platform_build/commit/fbba7fe06312241c7eb8c592ec2ac630e4316d55

We should handle both the earlier situation and the new one.
Attachment #8999603 - Flags: review?(gbrown)
I'll submit a try job shortly to test this in production. I've been running local tests, but haven't exercised this code yet I don't think. You can wait to review until afterwards if you want.
Attachment #8999604 - Flags: review?(gbrown)
Attachment #8999603 - Flags: review?(gbrown) → review+
Comment on attachment 8999604 [details] [diff] [review]
remote-automation-anr-traces.patch

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

::: build/mobile/remoteautomation.py
@@ +112,2 @@
>          try:
> +            for trace_file in self._device.ls(self._device.stack_trace_dir, root=True):

Did you try a simple device.rm(recursive=True)?
Attachment #8999604 - Flags: review?(gbrown) → review+
To remove the /data/anr directory completely? No. I didn't want to change the ownership of the /data/anr directory from system to root, but we could do the full rm and try to change the ownership or just leave it as owned by root. Just removing the files seemed less intrusive to me.
Good point. I agree it is better the way you have it.
Pushed by bclary@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/974c72e27e7e
Detect anr traces directory, r=gbrown.
https://hg.mozilla.org/integration/mozilla-inbound/rev/4956d2326228
Handle Android 8.1 change for anr stack directory to contain individual files for traces, r=gbrown.
https://hg.mozilla.org/mozilla-central/rev/974c72e27e7e
https://hg.mozilla.org/mozilla-central/rev/4956d2326228
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.