After adjust display size from default to small, the phone reboot suddenly
Reported by
chengwl2...@gmail.com,
Oct 30 2017
|
|||||
Issue description
Steps to reproduce the problem:
1. change display size.
2. ActivityManager kill all background process.
3. Device reboot.
What is the expected behavior?
What went wrong?
1.WebViewLoader-arm64-v8a (pid 3672) has been killed at 23/10/2017,but when WebViewFactory which has started a WebViewLoader process, but did not notify ActivityManager to attach the process.
So, ActivityManager is also unaware that the process was gone.
2,So,when display size has changed,AMS kill all background.AMS kill WebViewLoader-arm64-v8a (pid 3672) due to “kill all background except” reason.
But Thread-126 of system_server has same tid 3672 as killed process(WebViewLoader-arm64-v8a). Therefore system_server be mis-killed and result device reset.
Did this work before? N/A
Chrome version: 61.0.3163.100 Channel: stable
OS Version: Android O80
Flash Version:
In general, the process will be attached to ActivityManager when it launched and ActivityManager will listen to the death recipient.
Therefore, ActivityManager will clear related data when process is gone.
ActivityThread.java
6887 public static void main(String[] args) {
…
6916 ActivityThread thread = new ActivityThread();
6917 thread.attach(false);
…
6731 private void attach(boolean system) {
…
6744 final IActivityManager mgr = ActivityManager.getService();
6745 try {
6746 //++[Debug]
6747 //: Log attach application
6748 if (PERF_LOG) {
6749 Log.v(PERF_TAG, "attach ApplicationThread="
6750 + Integer.toHexString(System.identityHashCode(mAppThread)));
6751 }
6752 //--[Debug]
6753 mgr.attachApplication(mAppThread);
ActivityManagerService.java
// register death recipient for the app
7019 private final boolean attachApplicationLocked(IApplicationThread thread,
7020 int pid) {
…
7065 AppDeathRecipient adr = new AppDeathRecipient(
7066 app, pid, thread);
7067 thread.asBinder().linkToDeath(adr, 0);
7068 app.deathRecipient = adr;
However, the WebViewFactory create the process by its own and did not attached the process to ActivityManager.
In that case, ActivityManager will think the process is always there.
Once the pid was reused by other process, there has possibility to mis-killed other process.
WebViewFactory.java
660 private static class RelroFileCreator {
661 // Called in an unprivileged child process to create the relro file.
662 public static void main(String[] args) {
663 boolean result = false;
Many thanks
,
Oct 31 2017
We want to add some codes what would attached to ActivityManager when WebviewLoader process exit. But we are not sure where the codes should add. So need your help or is there another solution can fix this issue.
,
Oct 31 2017
@chengwl2016 -- Thank You for the report. Could you please provide us a screen cast of the issue and also the device details, which would help us in triaging further. Thanks in Advance.
,
Nov 1 2017
Hi msrchandra,this symptom is device reboot.Device: HTC U11(OCEAN_DUGL_O80). As we never change codes of this part. Besides,Android N also has this similar issue(app crash but report crash in webviewloader,as webviewloader has died early,the app reuse webview's Pid). Thanks
,
Nov 1 2017
Thank you for providing more feedback. Adding requester "msrchandra@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 2 2017
,
Mar 9 2018
***Bulk edit*** Closing due to inactivity, please feel free to reopen if needed. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by ligim...@chromium.org
, Oct 30 2017