bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

html5 worker runs forever - must kill firefox to end

RESOLVED DUPLICATE of bug 1003730

Status

()

Core
DOM: Workers
RESOLVED DUPLICATE of bug 1003730
4 years ago
4 years ago

People

(Reporter: Duane Voth, Unassigned)

Tracking

30 Branch
x86_64
Windows 8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140605174243

Steps to reproduce:

An html file loads <script src="test.js">; test.js contains a line: var worker = new Worker("thread.js");  thread.js contains:

var i = 0
while (i < 10) {
    console.log(".. " + i);
}

observe Firebug console counting many ".. 0" messages.

Change thread.js to:

var i = 0
while (i < 10) {
    console.log(".. " + i);
    i += 1
}

reload html; log messages .. 0 through .. 9 are observed, as well as previous .. 0 messages which are still being counted.


Actual results:

Once a worker has been created with an infinite loop, the only way to to kill that worker is to kill Firefox via OS commands.  Perhaps this is a feature, but it lends itself to abuse such as resource hogging with possible eventual DoS.  (can the console log be maxed?)


Expected results:

I expected workers created in the context of a web page load or javascript src file load to be cleaned up if that page or script file is reloaded.  Also, if users realize that a page they are visiting is making their browser/machine perform poorly, they need an obvious way to terminate the resource consumption of that page.  Closing the page's tab is the most obvious choice, closing the browser containing the tab should also work; neither kill the worker.  Having to use a command line or the task manager is not obvious.

Updated

4 years ago
Group: core-security
Component: Untriaged → DOM: Workers
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1003730
You need to log in before you can comment on or make changes to this bug.