Closed Bug 1128049 Opened 6 years ago Closed 6 years ago

Intermittent leakcheck | default process: 8 bytes leaked (, WeakReference<MessageListener>)

Categories

(Core :: MFBT, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox38 --- fixed
firefox38.0.5 --- fixed
firefox39 --- fixed
firefox40 --- fixed
firefox-esr31 --- unaffected

People

(Reporter: RyanVM, Assigned: mccr8)

References

Details

(Keywords: intermittent-failure, memory-leak)

09:19:45 INFO - TEST-INFO | leakcheck | default process: leaked 18446744073709551615 WeakReference<MessageListener> (0 bytes)
09:19:45 WARNING - TEST-UNEXPECTED-FAIL | leakcheck | default process: 8 bytes leaked (WeakReference<MessageListener>)
Looks like we're hitting bug 1062479 on try.
Depends on: 1062479
I'm getting to the point of considering hiding test suites over this. What can we do to move bug 1062479 along?
Flags: needinfo?(continuation)
I can probably just hack in some code to ignore this particular failure.

Something weird is definitely happening.  This is the output:

10:58:34     INFO -     0 TOTAL                                          19        8 382394204        0
10:58:34     INFO -     1                                                 8        8        1        1
10:58:34     INFO -   608 WeakReference<MessageListener>                  8        0   149218 18446744073709551615

Notice that we've leaked 0 bytes of WeakReference, but then before that there's a blank line, and somehow the 8 bytes for that is being misattributed to the WeakReference.
Depends on: 1156977
Depends on: 1156982
Assignee: nobody → continuation
Flags: needinfo?(continuation)
Component: IPC → MFBT
No longer depends on: 1156982
Bug 1156982 is unrelated.

Comment 102 is the first stack with my patch from bug 1156977, which contains the following stack:

###!!! ASSERTION: BloatEntry name must be non-empty: 'strlen(aClassName) > 0', file /builds/slave/m-in-lx-d-00000000000000000000/build/src/xpcom/base/nsTraceRefcnt.cpp, line 250
#01: BloatEntry::BloatEntry(char const*, unsigned int) [xpcom/base/nsTraceRefcnt.cpp:250]
#02: GetBloatEntry [xpcom/base/nsTraceRefcnt.cpp:422]
#03: NS_LogAddRef [xpcom/base/nsTraceRefcnt.cpp:996]
#04: mozilla::detail::RefCounted<mozilla::detail::WeakReference<mozilla::ipc::MessageListener>, (mozilla::detail::RefCountAtomicity)1>::AddRef() const [mfbt/RefPtr.h:77]
#05: mozilla::WeakPtr<mozilla::ipc::MessageListener>::WeakPtr() [mfbt/RefPtr.h:241]
#06: mozilla::ipc::IProtocol::IProtocol() [ipc/glue/ProtocolUtils.h:194]
#07: mozilla::layers::PTextureParent::PTextureParent() [obj-firefox/ipc/ipdl/PTextureParent.cpp:23]

Based on that and inspecting the code, I think I know the reason for this, and I have a patch. I'll post more in bug 1062479.
Signature appears to have changed a bit from the recent patches.
Summary: Intermittent leakcheck | default process: 8 bytes leaked (WeakReference<MessageListener>) → Intermittent leakcheck | default process: 8 bytes leaked (, WeakReference<MessageListener>)
Hah, yeah that's from bug 1156982.
Bug 1116550 will change it yet again.  In hindsight, I should have just waited until bug 1062479 was ready to go.
This is what the new failure will look like:
TEST-UNEXPECTED-FAIL | leakcheck | default process: negative leaks caught!
Summary: Intermittent leakcheck | default process: 8 bytes leaked (, WeakReference<MessageListener>) → Intermittent leakcheck | default process: 8 bytes leaked (, WeakReference<MessageListener>) or default process: negative leaks caught!
I should remove the "negative leaks caught" once bug 1062479 merges around everywhere, or this bug will become a dumping ground any time it starts happening in the future.  I filed bug 1158234 for making the error message more useful.
Flags: needinfo?(continuation)
Summary: Intermittent leakcheck | default process: 8 bytes leaked (, WeakReference<MessageListener>) or default process: negative leaks caught! → Intermittent leakcheck | default process: 8 bytes leaked (, WeakReference<MessageListener>) or leakcheck | default process: negative leaks caught!
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(continuation)
Resolution: --- → FIXED
Summary: Intermittent leakcheck | default process: 8 bytes leaked (, WeakReference<MessageListener>) or leakcheck | default process: negative leaks caught! → Intermittent leakcheck | default process: 8 bytes leaked (, WeakReference<MessageListener>)
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.