New issue
Advanced search Search tips

Issue 904296 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Chrome freezes 1-4min on every startup from an unclean exit

Reported by mats.ahl...@gmail.com, Nov 12

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36

Steps to reproduce the problem:
The problem is especially pronounced if one has multiple tabs open. To replicate, try force-closing Chrome with at least 20-40 tabs open.

What is the expected behavior?
Recovery should *not block or freeze* the UI thread, or alternatively is not initiated until the user initiates it by clicking on the popup. The default behavior should be to assume the user does NOT want to restore the old session, while still presenting that option to the user. (This may be relevant if for example the browser is actually crashing, or  repeatedly crashes, and the user doesn't want to lose their data.)

If the above is wontfix, then Chrome at least needs a way to disable the functionality, because waiting 4 minutes every time one starts up the computer for Chrome to load is intolerable from a performance (and sanity) perspective. The 'pro'/'for' cases for such an option would be to reduce unnecessary work or (in extreme cases) CPU/disk/memory thrashing. The 'con'/'against' cases for such an option would be option bloat and "why are we not just fixing this?".

Workaround:

On every invocation of any "launch browser" shortcuts or any scripts or programs which launch Chrome or use Chrome as a component, use sed or some other tool (or parse the JSON) of the Preferences file to trick Chrome into believing it exited cleanly. Furthermore a check must be done before invoking such a workaround script to ensure that an instance of Chrome using the same Preference file is not already running (in which case you would be overwriting a Preferences to which Chrome might already have a file handle to, possibly causing issues if Chrome wanted to write to its own Preference file!).

Such a workaround is inelegant because it is feasible it will cause an ever-increasing unbounded amount of corrupt garbage to accumulate on disk slowly over time (e.g. if Chrome happens to have a logging structure it assumes it clears on every "do you want to recover...?" cleanup, which would never occur).

What went wrong?
Chrome will take between almost 1 to 4 minutes to boot up whenever it closes abruptly, such as when the user shuts down. This started happening circa 2010 on both Windows and Linux (and presumably Mac).

relevant stackexchange:
https://superuser.com/questions/461035/disable-google-chrome-session-restore-functionality

Did this work before? Yes circa 2010? maybe it never worked

Chrome version: 66.0.3359.117  Channel: n/a
OS Version: 
Flash Version:
 
Labels: Needs-Milestone
Components: UI>Browser>Sessions
After a crash Chrome does not automatically restore your previous session (even if you have session restore enabled). Are you seeing otherwise? Are you clicking the button to restore and that is inducing the slow down? Might you have some extensions installed that are doing something weird?
Chrome indeed does not restore the previous session, but I have noticed that whenever it *would* prompt you to restore the session (but before it does so), it freezes for 1-4min (no window appears, or if a window appears it doesn't fully load) before finally showing the "Restore Session?" popup.

I am not clicking the button; the slowdown is always before the button appears, and almost never when the button would otherwise not appear.

This happens with clean default extensions, on stable/testing/unstable on multiple OSes. Sometimes the wait is a bit less (30 seconds?). The larger the previous session, the longer the wait.

(Another possibility I consider is that this might be related to having a large config folder, but I don't think that's the case because iirc I've noticed this with brand new setups, and the "the larger the previous session, the longer the wait" definitely hints that this is somehow proportional to some kind of unsolicited processing of the previous session.)

I've never tried it, but I could attempt to --trace-startup if you can't seem to replicate (but that has crashed for me in the past due to large JSON and fixed max length string sizes with V8, another bug, possibly fixed since).

But perhaps one could replicate by just loading many many heavy pages and instantly ending all Chrome processes.
I have never experienced this issue, and this is the first report I've seen of this behavior. If you could run with --trace-startup that would be helpful.

It should be possible to induce this by way of killing the browser process, or just to go chrome://inducebrowsercrashforrealz/ .
Cc: swarnasree.mukkala@chromium.org
Labels: Needs-Feedback Triaged-ET
@reporter: Could you please provide the information as per comment#5.

Thanks.!

Sign in to add a comment