Closed Bug 1410768 Opened 7 years ago Closed 6 years ago

TEST-UNEXPECTED-FAIL | leakcheck | default process: 2216 bytes leaked (BackstagePass, PrefCallback, XPCNativeInterface, XPCNativeMember, XPCNativeSet, ...)

Categories

(Core :: XPConnect, enhancement, P3)

x86_64
macOS
enhancement

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dluca, Unassigned)

Details

(Keywords: intermittent-failure, memory-leak)

I assume "ASSERTION: 1 dynamic atom(s) with non-zero refcount: [System Principal]: 'nonZeroRefcountAtomsCount == 0', file /builds/worker/workspace/build/src/xpcom/ds/nsAtomTable.cpp, line 350" prior to that is related.
Component: General → XPCOM
Product: Firefox → Core
It's sort of related, but what that says is somebody is holding onto the atom, rather than that the atom itself is the cause of the leak.  There's a lot of XPConnect stuff in that leak, so I'm going to tentatively go with that.
Component: XPCOM → XPConnect
We really need something that will print out info about a BackstagePass when it leaks. Maybe for atoms, too, though I don't know if they are still often leaking by themselves.
(In reply to Andrew McCreight [:mccr8] from comment #3)
> We really need something that will print out info about a BackstagePass when
> it leaks. Maybe for atoms, too, though I don't know if they are still often
> leaking by themselves.

Bug 1410209 wants to add names for leaking runnables in the leak logs; I suggested nsGlobalWindow as another class, and I could see describing Mutexes, nsThreads, etc. as also being useful.  Perhaps we should have something like:

NS_IMPL_ADDREF_WITH_DESCRIPTION(klassname, lambda)

where `lambda` will receive (void*, nsACString&), and can then stuff whatever it likes in the string outparam?  And then we can call the lambda where things leak?  We can store a std::function<(void*, nsACString&)> somewhere in nsTraceRefcnt, and that function can be null for the vast majority of things.  We'd have to be careful to not construct the function everytime we addref'd, of course.
Priority: -- → P3
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.