Closed
Bug 21650
Opened 25 years ago
Closed 24 years ago
Socket Service and associated thread are leaked
Categories
(Core :: Networking, defect, P3)
Tracking
()
VERIFIED
FIXED
M18
People
(Reporter: mscott, Assigned: warrensomebody)
References
Details
(Keywords: memory-leak)
Warren, I was looking at the bloat logs today and I noticed that the socket service gets leaked along with the thread it creates. Here's why: 1) The socket service calls NS_NewThread which returns a ref counted nsIThread. 2) the socket passes itself in as an nsIRunnable instance to the thread. The thread owns this instance. This forms a circular reference between the two objects that is never broken. The thread won't call the socket's shutdown method (which releases mThread) because the thread never goes away. At least that's what I think is going on.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M15
Updated•25 years ago
|
Summary: [MLK] Socket Service and associated thread are leaked → Socket Service and associated thread are leaked
Assignee | ||
Comment 2•24 years ago
|
||
Moving non-essential, non-beta2 and performance-related bugs to M17.
Target Milestone: M15 → M17
Assignee | ||
Updated•24 years ago
|
Target Milestone: M17 → M18
Comment 3•24 years ago
|
||
I haven't proved that a circular reference exist, but by calling nsSocketTransportService::Shutdown(), the transport thread is exited and the nsSocketTransportService destructs as it should. The way I trigger the Shutdown is by clicking on the 'disconnect network' icon at the bottom of the browser before shutting down the browser. Is there some place in the browser shutdown sequence that is suppose to call the socket transport service's Shutdown() method?
Assignee | ||
Comment 4•24 years ago
|
||
Rusty: This sounds like the same bug Gordon was tracking at one point (I can't find the bug number though). CSS was holding onto a global reference to the IO service, so the socket transport thread, dns thread, etc. were all being leaked on shutdown. Gordon: What happened with that bug?
Yes, this sounds like a duplicate of bug 17390. I would mark it as a duplicate, but that bug has a target milestone of "Future", which makes it sound like no one is going to get to it.
Depends on: 17390
Comment 7•24 years ago
|
||
This is _not_ a dup of 17390. Current bloat log shows no CSS*, nsCSS* or nsHTML* objects leaking. I think mscott is on to something with this one.
Comment 8•24 years ago
|
||
fix checked in: we were re-entering the service manager while LateInit()-ing the socket transport service.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•