Closed Bug 1142139 Opened 9 years ago Closed 2 years ago

Browser DoS with RAM usage growing to some point, possibly crash: slow script with busy onbeforeunload

Categories

(Core :: JavaScript Engine, defect)

36 Branch
x86_64
Linux
defect
Not set
critical

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: kb, Unassigned)

Details

(Keywords: perf)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150306140254

Steps to reproduce:

1. Make a website with infinite loop with console logging on onbeforeunload
2. Make user to close the page or reload it
3. Browser crashes

Example on my website:

http://www.karelbilek.com/reload_death.html

If I also have a dev console open, it crashes even more harshly - in one case it actually filled all my CPU and memory and I had to hard-reboot the PC


Actual results:

See "what did you do"

also

http://www.karelbilek.com/reload/



Expected results:

Firefox should gracefully kill the tab instead of crashing
Also it seems to vary wildly browser-to-browser, depending on OS, depending on amount of currently free memory and CPU
You are describing a hang, but it is worse than what I am getting.

2015-03-13-03-02-31-mozilla-central-firefox-39.0a1.ru.linux-x86_64 with e10s disabled, or firefox-36.0.1.ru.linux64: I get a slow script warning, and another one while trying to close the tab (when I expect it to have closed).

2015-03-13-03-02-31-mozilla-central-firefox-39.0a1.ru.linux-x86_64 with e10s: I am not sure what exactly happened, because of a problem related to bug 1074971, although that bug may have just been fixed.
Component: Untriaged → JavaScript Engine
Keywords: perf
Product: Firefox → Core
Summary: Crashing broser with busy onbeforeunload → Browser DoS ("Crashing browser"): slow script with busy onbeforeunload
Well, I guess you do mean a crash, but in my case nothing like that happened without e10s, and with e10s, maybe only tabs crashed.
Please try a Nightly build: https://nightly.mozilla.org/

* If Firefox crashes, please try https://developer.mozilla.org/en-US/docs/How_to_get_a_stacktrace_for_a_bug_report
* If it hangs (I don't think it did in my case) and you still can do this, https://developer.mozilla.org/en-US/docs/How_to_Report_a_Hung_Firefox
* RAM usage does grow here, although it stops soon (that Firefox occupies 1.5-2 GB then).
Severity: normal → critical
Summary: Browser DoS ("Crashing browser"): slow script with busy onbeforeunload → Browser DoS with RAM usage growing to some point, possibly crash: slow script with busy onbeforeunload
(In reply to [:Aleksej] from comment #2)
> e10s: I am not sure what exactly happened, because of a problem related to
> bug 1074971, although that bug may have just been fixed.

That bug is not what I was thinking of, and there is probably no problem.  All tabs run in the same process with e10s.
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.