Closed Bug 677333 Opened 13 years ago Closed 6 years ago

Assert on exit after starting a worker and immediately exiting.

Categories

(Tamarin Graveyard :: Workers, defect, P3)

x86
All
defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Q2 12 - Cyril

People

(Reporter: cpeyer, Assigned: kpalacz)

References

Details

Attachments

(2 files)

Run attached testcase.

Results in:

ReferenceError: Error #1065: Variable not_defined is not defined.
Assertion failed: "((incChannel->gc() != __null))" ("../core/WorkerGlue.cpp":317)
Trace/BPT trap

The ReferenceError is expected, but code should not assert on exit.
Flags: in-testsuite+
Flags: flashplayer-injection-
Flags: flashplayer-bug-
ReferenceError is actually not relevant to the assert.  Testcase has been updated to simplest testcase.
Summary: Assert on exit when attempting to resolve undefined function. → Assert on exit after starting a worker and immediately exiting.
Attached file testcase
Assignee: nobody → kpalacz
Flags: flashplayer-qrb+
Priority: -- → P3
Target Milestone: --- → Q2 12 - Cyril
I did not reproduce the bug with the current workers code.  If I use the code:
import flash.system.*
var w:Worker = WorkerDomain.current.createWorkerFromPrimordial();
print(w);
var p:Promise = w.start();
w.exit();

after 32 workers on my macbook I reach the worker limit and on _d builds I get an assertion.   
Error: Worker limit reached
Assertion failed: "((!m_roots))" ("../MMgc/GC.cpp":420)
Trace/BPT trap: 5

On release builds after the Worker limit is reached the shell exits with exit code 0.

If I exit immediately after start I do not see any problems, the test works as expected.
import flash.system.*

var w:Worker = WorkerDomain.current.createWorkerFromPrimordial();
if (Worker.current.isPrimordial()) {
   var p:Promise = w.start();
   w.exit();
}
Depends on: 695061
The reason for the assertion firing was that the worker was being asked to shutdown before it was fully initialized. The assertion has been augmented with a check for shutdown request.
Assignee: kpalacz → awelc
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
in debug builds I still see the assertion:
Error: Worker limit reached
Assertion failed: "((!m_roots))" ("../MMgc/GC.cpp":420)
Trace/BPT trap: 5

I'm using the code:

var w:Worker = WorkerDomain.current.createWorkerFromPrimordial();
var promise:Promise = w.start();
var result;
try {
    result = not_defined.local::receive();
} catch (e) {
    result = e.toString();
}
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I am reassigning this bug to Krzysztof as it seems to have something to do with the worker's lifecycle. I believe that the assertion is triggered because after the exception is thrown by the background worker, worker cleanup is not performed correctly resulting in some GC roots still remaining at the point of GC destruction. I tried explicitly cleaning up worker's channels but it does not seem to be enough.
Assignee: awelc → kpalacz
After recent changes to the worker lifecycle the assert is not triggered any more
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Blocks: 695061
No longer depends on: 695061
windows 64 exits with exit code 1 intermittently...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
changeset: 7397:f09b425761b5
user:      Dan Schaffer <Dan.Schaffer@adobe.com>
summary:   bug 677333: regression test in failing intermittently on win64

http://hg.mozilla.org/tamarin-redux/rev/f09b425761b5
changeset: 7411:0415347eefb5
user:      Brent Baker <brbaker@adobe.com>
summary:   bug 677333: previous change (CL@1064610) to skip test had the path incorrect, this will correctly skip the testcase on all x64-win runs (p=brbaker)

http://hg.mozilla.org/tamarin-redux/rev/0415347eefb5
Tamarin is a dead project now. Mass WONTFIX.
Status: REOPENED → RESOLVED
Closed: 13 years ago6 years ago
Resolution: --- → WONTFIX
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: