Closed Bug 200219 Opened 22 years ago Closed 21 years ago

Ensure that pipes and socket transports don't leak if all references to them are released

Categories

(Core :: Networking, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla1.6alpha

People

(Reporter: bryner, Assigned: darin.moz)

References

Details

(Keywords: topembed-)

Spun off from bug 200094. The FTP code shows a situation where if a connection is being closed during shutdown, it's important to close the output stream prior to closing the socket or the socket transport will be leaked. Darin and I think that what might be happening is that when AsyncWait is called on the nsSocketOutputStream, it's not able to see that posting the event to the socket transport service failed (since we're in the middle of shutting down) -- so the mNotify reference is never cleaned up.
Severity: normal → major
Status: NEW → ASSIGNED
Keywords: topembed
Priority: -- → P2
Target Milestone: --- → mozilla1.4beta
Discussed in edt bug triage meeting. Minusing because we think it's an edgecase. Please renomnate if you have data suggesting otherwise.
Keywords: topembedtopembed-
i thought about this bug some more... i think the problem is that while the stream copier is AsyncWait'ing on one of the streams, the other stream might close. unless the stream being waited on notifies the stream copier that it is now ready (meaning readable/writable or closed), the stream copier will never "wake up" and therefore it will never detect that the other stream closed. seems to me that the stream copier needs to have some way of listening for closure on either stream. not sure yet how to make this happen, but this is definitely a design flaw of NS_AsyncCopy. in the meantime, this can be worked around by ensuring that both streams are somehow externally closed. i have some ideas about how to resolve this, but the changes will probably need to wait until 1.5 alpha.
Priority: P2 → P5
Target Milestone: mozilla1.4beta → mozilla1.5alpha
Depends on: 210125
Target Milestone: mozilla1.5alpha → mozilla1.5beta
Target Milestone: mozilla1.5beta → mozilla1.6alpha
i believe this is fixed as a result of the patch for bug 210125.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.