Tabs getting lost on upgrade to M53 |
|||||
Issue description---------- Public facing bug for lost tabs ---------------------- Version: 53.0.2785.97, 53.0.2785.124 We have several Play Store reports that users are losing tabs after upgrading to M53, initially reported in 53.0.2785.97. We landed a fix for a bug in the document mode migration path as part of issue 646146 (https://codereview.chromium.org/2345603002). In order to hit the bug that was fixed, users had to be upgrading from a version of Chrome where document mode was enabled by default. We released 53.0.2785.124, which contained the fix, and received more user reports of lost tabs. For one user, it sounds like tabs were lost more than once after upgrading. I'm going to add a speculative patch to skip the multi-instance migration path if tab_state0 file exists in case there's something going wrong with setting the shared preference for whether the migration has been run. Next steps are to try to collect more information from users who lost tabs so that we can identify a root cause.
,
Sep 22 2016
Hi there, I was asked to leave a comment here after encountering this bug and posting a Play Store review pointing to it. How can I help? So far I can only tell you that I have lost around ~11 tabs after upgrading. I am not sure what the document mode is that you mentioned (maybe because I am using a German version and cannot find the corresponding option).
,
Sep 22 2016
Hello, Thank you for commenting! Document mode is the "merged tabs and apps" feature where each tab showed up individually in Android recents along with other apps. We removed it in Chrome version 51. A few questions that may help us narrow in on what's going wrong: 1. What type of device do you have (e.g. Samsung Galaxy) and what is the Android OS version? 2. Do you know what version of Chrome you were on prior to upgrading to version 53? 3. Did you ever use "merged tabs and apps"? 4. Is your device rooted? If so, are you familiar with executing commands in a terminal?
,
Sep 22 2016
,
Sep 22 2016
This also happened to me. I did not have merged tabs enabled. I couldn't tell you what version I was on prior to the latest, but I check for app updates every 2 or 3 days. I have a Galaxy S7 Edge and I am rooted if it helps.
,
Sep 23 2016
dragunbayne@, thank you for the response. We would like to get a look at Chrome's data directory using adb commands. Are you familiar with terminal commands? If not, please disregard the rest of this comment. If yes, and you're interested in helping, there is some information in Chrome's data directory that we're interested in. --- Turning on adb debugging ------ Become a developer by going into Settings > About phone and tapping on the build number seven times. Return to the previous screen and find "Developer options", then enable "USB debugging" in developer options. --- Setting up adb ----- adb can be downloaded from here: https://developer.android.com/studio/index.html There is s a section at the bottom for "Get just the commmand line tools", which will allow you to download ADB without the rest of Android Studio. How-To-Geek has a good article on how to install adb: http://www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/ ---- Finding Chrome information ----- I think Galaxy S7 Edge has the same data directory as Nexus phones: /data/user/0/com.android.chrome/ To list files on the device, the command is: adb shell ls -al /data/user/0/com.android.chrome/ To pull files off the device, the command is: adb pull /data/user/0/com.android.chrome/ 1. Contents of /data/user/0/com.android.chrome/shared_prefs/com.android.chrome_preferences.xml adb pull /data/user/0/com.android.chrome/shared_prefs/com.android.chrome_preferences.xml Then attach the file to a comment or paste the contents in-line. 2. Does the /data/user/0/com.android.chrome/app_ChromeDocumentActivity/ directory exist? If so, does it contain any files? adb shell ls /data/user/0/com.android.chrome/app_ChromeDocumentActivity 3. What does the /data/user/0/com.android.chrome/app_tabs/ directory contain? We expect only sub-directories with integer names, e.g. "0". adb shell ls /data/user/0/com.android.chrome/app_tabs 4. What files does the /data/user/0/com.android.chrome/app_tabs/0/ directory contain? adb shell ls /data/user/0/com.android.chrome/app_tabs/0 If you would prefer, I'm happy to do the analysis if you email me your /data/user/0/com.android.chrome/app_tabs/ directory and /data/user/0/com.android.chrome/shared_prefs/com.android.chrome_preferences.xm file. Please note that the app tab files (e.g. "tab_state0", "tab4") contain encrypted data including the URL of open tabs. --- Android Debug Bridge Reference ------- https://developer.android.com/studio/command-line/adb.html
,
Sep 23 2016
*encoded data - the tab state files are not plain text but they aren't encrypted.
,
Sep 24 2016
Issue 649729 has been merged into this issue.
,
Sep 24 2016
My issue was just merged into this. Unfortunately my device is not rooted, however I would like to add that I never used "merged tabs and apps" if that is helpful.
,
Sep 26 2016
1. What type of device do you have (e.g. Samsung Galaxy) and what is the Android OS version? LG G2 (D802) running a custom ROM (Exodus 5.1-20151110) using Android version 5.1.1_r24 2. Do you know what version of Chrome you were on prior to upgrading to version 53? Sadly not. I am using the auto-update in the Play Store so it should have been the latest version before that. 3. Did you ever use "merged tabs and apps"? Yes, wasn't it the default in the beginning? I deactivated it quickly though. 4. Is your device rooted? If so, are you familiar with executing commands in a terminal? Yes my device is rooted. I have had some issues with adb in the past though. I will try to pull the data but I cannot promise that I can get it. I will post them should I succeed.
,
Sep 26 2016
Thank you geissler.marcus@
I received a bug report in another issue reporting lost tabs There was a NPE thrown when during readSavedStateFile() that likely occurred when tabs were lost:
09-21 06:55:10.118 4356 6306 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=https://news.ycombinator.com/... flg=0x14002000 cmp=com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity (has extras)} from uid 10041 on display 0
09-21 06:55:10.389 4356 4365 I art : Background partial concurrent mark sweep GC freed 4262(265KB) AllocSpace objects, 0(0B) LOS objects, 31% free, 35MB/51MB, paused 1.558ms total 124.399ms
09-21 06:55:10.616 23078 25567 D cr_ChildProcLauncher: [ChildProcessLauncher.java:100] Allocator allocated a connection, sandbox: true, slot: 2
09-21 06:55:10.654 4356 8140 I ActivityManager: Start proc 25570:com.android.chrome:sandboxed_process2/u0i134 for service com.android.chrome/org.chromium.content.app.SandboxedProcessService2
09-21 06:55:10.739 19987 19987 W roid.apps.inbox: type=1400 audit(0.0:2110): avc: denied { read } for name="mem" dev="debugfs" ino=7081506 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0
09-21 06:55:10.739 19987 19987 W roid.apps.inbox: type=1400 audit(0.0:2111): avc: denied { read } for name="mem" dev="debugfs" ino=7081506 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0
09-21 06:55:10.760 23078 23613 I OpenGLRenderer: Initialized EGL, version 1.4
09-21 06:55:10.761 23078 23613 D OpenGLRenderer: Swap behavior 1
09-21 06:55:10.881 4356 4403 I ActivityManager: Displayed com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity: +647ms (total +1s323ms)
09-21 06:55:10.882 19987 19987 I Choreographer: Skipped 30 frames! The application may be doing too much work on its main thread.
09-21 06:55:10.997 4356 4403 I WindowManager: Destroying surface Surface(name=Starting com.android.chrome) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.destroyOrSaveSurface:2073 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.WindowStateAnimator.finishExit:565 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:491 com.android.server.wm.WindowAnimator.updateWindowsLocked:303 com.android.server.wm.WindowAnimator.animateLocked:704
09-21 06:55:11.025 25570 25570 W dboxed_process2: type=1400 audit(0.0:2112): avc: denied { getattr } for path="/data/data/com.android.chrome" dev="dm-2" ino=1488097 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
09-21 06:55:11.064 4356 25441 I ActivityManager: Process com.nytimes.android (pid 23800) has died
09-21 06:55:11.064 4356 25441 D ActivityManager: cleanUpApplicationRecord -- 23800
09-21 06:55:11.075 25570 25570 I cr_ChildProcessService: Creating new ChildProcessService pid=25570
09-21 06:55:11.105 23078 23078 D cr_tabmodel: [TabPersistentStore.java:400] loadState exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.io.DataInputStream.readInt()' on a null object reference
09-21 06:55:11.105 23078 23078 D cr_tabmodel: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.io.DataInputStream.readInt()' on a null object reference
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at org.chromium.chrome.browser.tabmodel.TabPersistentStore.readSavedStateFile(TabPersistentStore.java:872)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at org.chromium.chrome.browser.tabmodel.TabPersistentStore.loadState(TabPersistentStore.java:395)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl.loadState(TabModelSelectorImpl.java:280)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at org.chromium.chrome.browser.ChromeTabbedActivity.initializeState(ChromeTabbedActivity.java:571)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at org.chromium.chrome.browser.init.ChromeBrowserInitializer$6.initFunction(ChromeBrowserInitializer.java:295)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at org.chromium.chrome.browser.init.ChromeBrowserInitializer$1NativeInitTask.run(ChromeBrowserInitializer.java:240)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at android.os.Handler.handleCallback(Handler.java:751)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at android.os.Handler.dispatchMessage(Handler.java:95)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at android.os.Looper.loop(Looper.java:154)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at android.app.ActivityThread.main(ActivityThread.java:6077)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at java.lang.reflect.Method.invoke(Native Method)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
09-21 06:55:11.105 23078 23078 D cr_tabmodel: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
09-21 06:55:11.172 23078 23288 D cr_ChildProcLauncher: [ChildProcessLauncher.java:810] Setting up connection to process: slot=2
09-21 06:55:11.179 23078 23078 D cr_tabmodel: [TabPersistentStore.java:1008] Loaded tab lists; counts: 1,0
There aren't any errors logged related to performing the multi-instance migration.
Assuming this error was thrown after a multi-instance migration while loading the tab state, here's what I think is happening
1. Chrome starts, detects multi-instance migration is needed and starts that on the serial executor. This is kicked off from TabPersistentStore's constructor
2. startPrefetchTabListTask() is also called from TabPeristentStore's constructor. sMigrationTask should != null, so the prefetch async task gets executed on the serial executor
3. Multi-instance migration finishes, no errors logged
4. Prefetch tab list task is executed, should be reading from "tab_state0", but for some reason it returns "null" instead of a valid stream
I think any of these things could be going wrong:
A. sequencing of prefetch tab list task and multi-instance migration
B. multi-instance migration is failing to find the old metadata file -- renaming doesn't fail because it isn't attempted.
C. Something is going wrong during the prefetch tab list task. Unfortunately we don't log any of the exceptions so this could be due to the state file not existing or an IOException getting thrown when we try to create a FileInputStream
,
Sep 26 2016
,
Sep 26 2016
TabPersistentStore.java from 53 branch since it has changed substantially since then.
,
Oct 31 2016
Noting this as a postmortem follow-up issue. Where do we stand on it?
,
Oct 31 2016
No change since comment #11. Without on-demand repro steps or a new bug report with the logging Peter and I added this is unactionable.
,
Feb 7 2018
We haven't received any additional data surrounding this. Due to the age, and the lack of any new reports, I think this is obsolete. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by wnwen@chromium.org
, Sep 22 2016