Closed Bug 723064 Opened 8 years ago Closed 8 years ago

Many debug xpcshell-tests show leaks of 1 each of Mutex, ReentrantMonitor, nsTArray_base, nsThread, nsTimerImpl

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla12
Tracking Status
firefox12 --- fixed
firefox13 --- fixed

People

(Reporter: standard8, Assigned: smaug)

References

Details

(Keywords: memory-leak, regression, Whiteboard: [qa-])

Attachments

(1 file)

This is a regression from one of these bugs: bug 721543, bug 721548, bug 721515.

When I look in the debug logs post landing, I see the following leak listed:

== BloatView: ALL (cumulative) LEAK STATISTICS, default process 18305

     |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->|
                                              Per-Inst   Leaked    Total      Rem      Mean       StdDev     Total      Rem      Mean       StdDev
   0 TOTAL                                          21      224     6595        5 (  321.40 +/-   429.36)    17243        2 ( 1810.46 +/-  2094.06)
  34 Mutex                                          12       12       64        1 (   32.25 +/-    18.40)        0        0 (    0.00 +/-     0.00)
  50 ReentrantMonitor                               16       16       15        1 (    6.38 +/-     3.31)        0        0 (    0.00 +/-     0.00)
 168 nsTArray_base                                   4        4      484        1 (  155.02 +/-    66.06)        0        0 (    0.00 +/-     0.00)
 169 nsThread                                      124      124        4        1 (    2.29 +/-     1.11)       66        1 (   15.30 +/-     5.79)
 171 nsTimerImpl                                    68       68        3        1 (    1.40 +/-     0.55)        9        1 (    1.94 +/-     0.75)

This occurs for the majority of the xpcshell-tests given.
Blocks: 469523
So, STR, please.
No longer blocks: 469523
Blocks: 469523
STR:

1) Build Firefox (or Thunderbird) in debug mode using latest code.
2) run

make -c <objdir> xpcshell-tests

Results:

See the bloat logs in the majority of the results.

Example logs:

https://tbpl.mozilla.org/php/getParsedLog.php?id=9001372&tree=Firefox
https://tbpl.mozilla.org/php/getParsedLog.php?id=9002509&tree=Firefox
https://tbpl.mozilla.org/php/getParsedLog.php?id=9002824&tree=Firefox
https://tbpl.mozilla.org/php/getParsedLog.php?id=9002738&tree=Firefox
https://tbpl.mozilla.org/php/getParsedLog.php?id=9003706&tree=Firefox
https://tbpl.mozilla.org/php/getParsedLog.php?id=9003238&tree=Firefox

Just running xpcshell-tests on my local build of Thunderbird reproduced this. So you shouldn't need to make a packaged test or anything.
I guess some of the little marking arrays aren't being cleaned up properly.  I wonder if this is due to some XPCshell weirdness, or because the tests are so short.  With mochitest, many tests are run, so maybe it has proper time to finish up.
XPCShell is in many ways non-normal execution environment, so it is possible that
cycle collector isn't called the same way as in browser.
Assignee: nobody → bugs
Attached patch patchSplinter Review
Don't create the timer if we're shutting down.
Attachment #593471 - Flags: review?(continuation)
Attachment #593471 - Flags: review?(continuation) → review+
https://hg.mozilla.org/mozilla-central/rev/7a33be2b6a36
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Comment on attachment 593471 [details] [diff] [review]
patch

[Approval Request Comment]
Regression caused by (bug #): bug 721543 
User impact if declined: N/A
Testing completed (on m-c, etc.): Landed m-c
Risk to taking this patch (and alternatives if risky):
Some leaks in Aurora may not be noticed because of this minor (shutdown) leak.
String changes made by this patch: N/A
Attachment #593471 - Flags: approval-mozilla-aurora?
Blocks: 721543
Flags: in-testsuite-
Keywords: mlk
Comment on attachment 593471 [details] [diff] [review]
patch

[Triage Comment]
Approve for Aurora 13 to uncover hidden leaks.
Attachment #593471 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Target Milestone: mozilla13 → mozilla12
Whiteboard: [qa-]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.