Closed
Bug 875304
Opened 11 years ago
Closed 11 years ago
Non-fatal assertions and telemetry for cycle collector OOMs
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
(Whiteboard: [MemShrink:P2])
Attachments
(4 files, 1 obsolete file)
2.23 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
5.90 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
7.25 KB,
patch
|
mccr8
:
checkin-
|
Details | Diff | Splinter Review |
4.44 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Rather than warning many times. This will make it easier to track when this happens on TBPL.
Assignee | ||
Comment 1•11 years ago
|
||
We could also just MOZ_CRASH when the CC OOMs. Though maybe it would be a good idea to collect telemetry about how much this happens (using a flag, so if somebody repeatedly OOMs it will only show up once) before doing that.
Assignee | ||
Updated•11 years ago
|
Whiteboard: [MemShrink]
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Summary: Non-fatally assert once when the CC hits an OOM state → Non-fatal assertions and telemetry for cycle collector OOMs
Assignee | ||
Comment 5•11 years ago
|
||
try run was okay https://tbpl.mozilla.org/?tree=Try&rev=b059c667e817
Assignee | ||
Comment 6•11 years ago
|
||
Update for infallible-by-default nsDeque.
Attachment #753985 -
Attachment is obsolete: true
Assignee | ||
Comment 7•11 years ago
|
||
I should change part 1 to take advantage of the fact that nsTArray::AppendElement is infallible: if (pinfo->mColor == white && mWhiteNodes->AppendElement(pinfo)) { rv = pinfo->mParticipant->Root(pinfo->mPointer);
Comment 8•11 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #7) > I should change part 1 to take advantage of the fact that > nsTArray::AppendElement is infallible: > if (pinfo->mColor == white && mWhiteNodes->AppendElement(pinfo)) { > rv = pinfo->mParticipant->Root(pinfo->mPointer); We should really make the infallible AppendElement return void...
Assignee | ||
Comment 9•11 years ago
|
||
I'm not sure how that would work, given that the fallibility is based on a parameter to the class, but I'm not a C++ guru. It does sound like a good idea.
Comment 10•11 years ago
|
||
(In reply to comment #9) > I'm not sure how that would work, given that the fallibility is based on a > parameter to the class, but I'm not a C++ guru. Using black magic :D See bug 853548 where I did this for SetCapacity. > It does sound like a good idea. Hmm, actually tbsaunde correctly mentioned on IRC that the APIs returning pointers might be a good idea too, at least, if the pointer is used to do something useful (not check for fallibility...) So, I'm sort of torn on what is the best idea to be honest.
Assignee | ||
Comment 11•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #757486 -
Flags: review?(bugs)
Assignee | ||
Updated•11 years ago
|
Attachment #753982 -
Flags: review?(bugs)
Assignee | ||
Comment 12•11 years ago
|
||
I need to test parts 3 and 4 before putting them up for review. For instance, I haven't checked that they do anything when you OOM.
Updated•11 years ago
|
Attachment #753982 -
Flags: review?(bugs) → review+
Updated•11 years ago
|
Attachment #757486 -
Flags: review?(bugs) → review+
Updated•11 years ago
|
Whiteboard: [MemShrink] → [MemShrink:P2]
Assignee | ||
Updated•11 years ago
|
Attachment #753983 -
Flags: review?(bugs)
Assignee | ||
Comment 13•11 years ago
|
||
For part 3, we're actually running on Nightly with fatal OOMs in nsDeque, and nobody has complained, and they don't show up on crash stats as far as I can tell, so I'm kind of tempted to just leave it alone as is... I'll think about it some more.
Updated•11 years ago
|
Attachment #753983 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 14•11 years ago
|
||
This was the try run: https://tbpl.mozilla.org/?tree=Try&rev=a6440054ae23
Assignee | ||
Comment 15•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6f629bdc6b38 https://hg.mozilla.org/integration/mozilla-inbound/rev/92c6423211e7 https://hg.mozilla.org/integration/mozilla-inbound/rev/519f9fdd9544
Whiteboard: [MemShrink:P2] → [MemShrink:P2][leave open]
Comment 16•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6f629bdc6b38 https://hg.mozilla.org/mozilla-central/rev/92c6423211e7 https://hg.mozilla.org/mozilla-central/rev/519f9fdd9544
Assignee | ||
Comment 17•11 years ago
|
||
I'll spin off part 3 into a new bug. That's probably worth fixing, as I've seen 1 TBPL orange from hitting nsDeque OOM during shutdown.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [MemShrink:P2][leave open] → [MemShrink:P2]
Assignee | ||
Updated•11 years ago
|
Target Milestone: --- → mozilla24
Assignee | ||
Comment 18•11 years ago
|
||
Comment on attachment 755113 [details] [diff] [review] part 3: add non-fatal assertions and telemetry when nsDeque fails to push during graph scanning I filed bug 887903 for making nsDeque::Push fallible in the CC.
Attachment #755113 -
Flags: checkin-
You need to log in
before you can comment on or make changes to this bug.
Description
•