New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 779485 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

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
 
Labels: Needs-triage-Mobile
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.
Cc: msrchandra@chromium.org
Labels: Needs-Feedback
@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.
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
Project Member

Comment 5 by sheriffbot@chromium.org, Nov 1 2017

Labels: -Needs-Feedback
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
Labels: TE-NeedsTriageHelp
Status: WontFix (was: Unconfirmed)
***Bulk edit***

Closing due to inactivity, please feel free to reopen if needed.

Sign in to add a comment