Closed Bug 1430176 Opened 2 years ago Closed 2 years ago
Android xpcshell logcats warn: "Activity
Manager: Invalid package Name: xpcshell"
It turns out there's a good reason for this and it is harmless, but I want to eliminate the warning as it can be distracting and even misleading.
For example, 149 instances in https://public-artifacts.taskcluster.net/X7eOCceuTA6kfBU9Cqey4g/0/public/test_info//logcat-emulator-5554.log
The history is a little complicated: devicemanager's killProcess originally killed named processes, optionally using a specified signal (to allow for kill -3 or kill -6, to trigger anr and/or crash reports). With newer Android implementations, kill is sometimes not available (security issues), while force-stop is; also, force-stop may be advisable, since it may be able to perform a cleaner shutdown, reclaim resources, etc. Therefore, killProcess was updated to try using force-stop first for general process shutdown (when no signal specified), resorting to kill only when necessary. Generally, force-stop works great for Java applications, like org.mozilla.fennec; but it doesn't work, or even apply, to native applications like xpcshell, resulting in the frequent warnings seen in this bug. The solution is simple: Allow killProcess clients to specify that the target is a native app that should be kill'ed rather than force-stop'ed. Warnings eliminated and test jobs work fine: https://treeherder.mozilla.org/#/jobs?repo=try&revision=395879708bf7b28a9c4776413db31a0622549bfa
Attachment #8942297 - Flags: review?(jmaher)
Comment on attachment 8942297 [details] [diff] [review] in devicemanager, add 'native' param to killProcess: do not try to force-stop native apps Review of attachment 8942297 [details] [diff] [review]: ----------------------------------------------------------------- thanks for the explanation
Attachment #8942297 - Flags: review?(jmaher) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4ed959e76522 Do not try to force-stop native android processes like xpcshell; r=jmaher
You need to log in before you can comment on or make changes to this bug.