Closed Bug 900406 Opened 8 years ago Closed 6 years ago

Thunderbird Mozmill tests, Permanent orange: Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down) at jsapi.cpp

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: standard8, Unassigned)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Following bug 896124 landing, Thunderbird Mozmill Debug tests are failing with:

Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at ../../../../mozilla/js/src/jsapi.cpp:710
TEST-PASS | /builds/slave/talos-slave/test/build/mozmill/account/test-retest-config.js | test-retest-config.js::test_re_test_config
TEST-START | /builds/slave/talos-slave/test/build/mozmill/account/test-retest-config.js | teardownModule
TEST-PASS | /builds/slave/talos-slave/test/build/mozmill/account/test-retest-config.js | test-retest-config.js::teardownModule
INFO Passed: 41
INFO Failed: 0
INFO Skipped: 0
Traceback (most recent call last):
  File "runtest.py", line 515, in <module>
    checkCrashesAtExit()
  File "runtest.py", line 505, in checkCrashesAtExit
    TEST_NAME):
  File "/builds/slave/talos-slave/test/build/mozbase/mozcrash/mozcrash/mozcrash.py", line 94, in check_for_crashes
    stderr=subprocess.PIPE)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
The mozmill tests have always leaked a lot on shutdown, I suspect the best way to start looking at this is debugging as to which JSRuntimes are still running on shutdown.
Is this proved to be specific to TB, or is it a problem in the xpcshell infrastructure itself? Or even JS engine forgetting about specifics needed for tests?
This is a core change, that is showing we're not shutting down things that we should do. I've had this show up just running a normal build already, so this isn't specific to the infra.
(In reply to Mark Banner (:standard8) from comment #1)
> The mozmill tests have always leaked a lot on shutdown, I suspect the best
> way to start looking at this is debugging as to which JSRuntimes are still
> running on shutdown.

Agreed.
Running "make mozmill" of DEBUG BUILD of thunderbird, I get a lot of the errors in the log session caused by this.

Also, I noticed that this is very thread-timing related. On one PC with 16GB of memory, I saw no errors related to this in one run, and saw a few in another run. But on a PC with 8GB of memory, I saw many of them. See quote below. I am using a veritual environment (VMPlayer on 16GB PC, and VirtualBox on 8GB PC, and paging/swapping due to the shortage of main memory changes timing very much.)

TB (and presumably FF) has so many shutdown-related issues and this is one of them., I think. (I notice the improper ordering of shutting down modules with dependency: Events can no longer be posted because the event infrastructure is shutdown already, etc.]

An excerpt from a memo I was preparing when I noticed this existing bug entry.

I. Assertion triggered by not-properly-shutdown Java runtime.
   This is good in the sense that the check code catches errors.
   But I am not sure how to go about fixing the found problem of
   the non-shutdown of Java runtime instances.
   Note: this issue crops up in a thread-unsafe manner.
   It is highly timing-dependent. On the same PC with 16GB memory, I
   didn't see it in one run at all. But I see a few in another run.
   On a 8 GB PC, I saw this plenty of times. Output from a scan of gdb
   line is quoted from this 8BG PC run below.
   
Only one gdb message is unrelated to Java runtime.
That one is related to the intended crash of plugin-container.

Output of egrep "(hasLiveRuntimes|gdb )"  ...logfile_of_mozmill_session...

Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 17186' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 17473' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 17776' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 18129' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 18435' to attach your debugger to this thread.
*** Next line is unrelated.
Type 'gdb /new-hd1/extra/ishikawa/TB-3HG/objdir-tb3/mozilla/dist/bin/plugin-container 18710' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 18774' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 18968' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 19156' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 19479' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 19656' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 19845' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 20036' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 20229' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 20416' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 20607' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 20796' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 21016' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 21206' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 21396' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 21578' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 21761' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 21946' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 22126' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 22371' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 22560' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 22750' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 22943' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 23127' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 23322' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 23520' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 23697' to attach your debugger to this thread.
Assertion failure: !JSRuntime::hasLiveRuntimes() (forgot to destroy a runtime before shutting down), at /new-hd1/extra/ishikawa/TB-3HG/NEW-COMMSRC/mozilla/js/src/jsapi.cpp:710
Type 'gdb ../../.././mozilla/dist/bin/thunderbird 23891' to attach your debugger to this thread.

Maybe a hook to record what high-level module requested the start of Javascript Runtime is a good start. (Not the immediate caller of the initialization routine since it may not tell us much. )

TIA
Duplicate of this bug: 901008
After this change(*1) landed, output message has been changed.

 WARNING: YOU ARE LEAKING THE WORLD (at least one JSRuntime and everything alive inside it, that is) AT JS_ShutDown TIME.  FIX THIS!

*1 https://hg.mozilla.org/mozilla-central/rev/1b9a459cea77
Attached patch First stepSplinter Review
I had investigated this a little bit.

Another leaking object I found is 'mc' in mail/test/mozmill/shared-modules/test-folder-display-helpers.js. But fixing this 'mc' it not straightforward.
Inactive; closing (see bug 1180138).
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.