Closed Bug 888898 Opened 11 years ago Closed 11 years ago

Assertion failure: isEmpty(), at mozilla/LinkedList.h:267 with setObjectMetadataCallback and Debugger

Categories

(Core :: JavaScript Engine, defect)

x86_64
All
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: decoder, Assigned: billm)

References

Details

(Keywords: assertion, regression, testcase, Whiteboard: [jsbugmon:update])

Attachments

(4 files)

The following testcase asserts on mozilla-central revision d7553251cf43 (run with --fuzzing-safe --ion-eager):


var dbg = Debugger();
setObjectMetadataCallback(function() {});
Whiteboard: [jsbugmon:update,bisect]
x = Debugger()

asserts js debug shell on m-c rev d87b950c7a6f with -D when the testcase is passed in as a CLI argument at Assertion failure: isEmpty(), at dist/include/mozilla/LinkedList.h too.

autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   http://hg.mozilla.org/mozilla-central/rev/30c5b9ee2bc5
user:        Brian Hackett
date:        Mon Jul 08 09:17:35 2013 -0600
summary:     Bug 890636 - Remove JSOPTION_PCCOUNT, r=jandem.
Brian, is bug 890636 a likely regressor?
Blocks: 890636
Flags: needinfo?(bhackett1024)
Keywords: regression
OS: Linux → All
Whiteboard: [jsbugmon:update,bisect] → [jsbugmon:update]
The assertion is that there are still debuggers around when the runtime is destroyed.  I don't know what is supposed to ensure these debuggers get destroyed, but they are being marked through the global object since they are properties there.  In any case this doesn't have anything to do with my patches.
Flags: needinfo?(bhackett1024)
Jason, any idea here? :)
Flags: needinfo?(jorendorff)
(In reply to Brian Hackett (:bhackett) from comment #4)
> The assertion is that there are still debuggers around when the runtime is
> destroyed.  I don't know what is supposed to ensure these debuggers get
> destroyed, but they are being marked through the global object since they
> are properties there.  In any case this doesn't have anything to do with my
> patches.

This is a symptom of bug 716981.

In short, we leak *everything* when a runtime is destroyed, Debuggers along with everything else. Obviously that's ... not great, and one result is this assertion.

We could treat the symptom, just clearing the list in JSRuntime::~JSRuntime.

Or fix the problem, by fixing bug 716981.
Flags: needinfo?(jorendorff)
Should we then reopen that bug? billm marked it WONTFIX, so setting needinfo for him here.
Flags: needinfo?(wmccloskey)
Attached patch profilingSplinter Review
As far as I can tell, there's nothing that will cause JSScript::hasScriptCounts to be cleared before shutdown. We unconditionally mark all scripts with this flag set. This patch just makes shutdown GCs special so that they're not preserved.
Assignee: general → wmccloskey
Status: NEW → ASSIGNED
Attachment #789254 - Flags: review?(bhackett1024)
Flags: needinfo?(wmccloskey)
Attachment #789254 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/bc5dadbcb78e
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
This is not fixed. The testcase in comment 0 still reproduces.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [jsbugmon:update] → [jsbugmon:update,reconfirm]
Target Milestone: mozilla26 → ---
Whiteboard: [jsbugmon:update,reconfirm] → [jsbugmon:update,reconfirm,ignore]
JSBugMon: This bug has been automatically confirmed to be still valid (reproduced on revision 9b4c4e56f4bb).
Whiteboard: [jsbugmon:update,reconfirm,ignore] → [jsbugmon:update]
Attached patch metadata-fixSplinter Review
Sorry, I only tested with what Gary posted in comment 2.

This patch should fix the other issue. We're adding a root that never gets removed. This patch puts the metadata callback on the global rather than in a global variable.
Attachment #792298 - Flags: review?(bhackett1024)
Attachment #792298 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/716d1f856bdf
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: