Closed Bug 1430176 Opened 2 years ago Closed 2 years ago

Android xpcshell logcats warn: "ActivityManager: Invalid packageName: xpcshell"


(Firefox for Android :: Testing, enhancement, P1)




Firefox 59
Tracking Status
firefox59 --- fixed


(Reporter: gbrown, Assigned: gbrown)




(1 file)

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.
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:
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
Do not try to force-stop native android processes like xpcshell; r=jmaher
Priority: -- → P1
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
You need to log in before you can comment on or make changes to this bug.