Exchange servers and clients can cause memory leaks by holding onto referrences on each other
Categories
(MailNews Core :: Networking: Exchange, defect)
Tracking
(Not tracked)
People
(Reporter: babolivier, Assigned: babolivier)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
As per Matrix:
EwsOutgoingServerholds a reference on itsXpComEwsClient, and theXpComEwsClientalso holds a reference to theEwsOutgoingServer(via theOperationSender). So when the outgoing server gets removed, the client is stopped but none of theEwsOutgoingServer,XpComEwsClient,OperationQueueorOperationSenderare dropped. I think it might be happening with incoming servers too.
This should only happen at shutdown or when an account/server is manually removed, and those data structures don't hold a lot of data in memory, so it shouldn't have a huge impact, but it's probably worth taking care of it now we know it's here.
| Assignee | ||
Comment 1•8 months ago
|
||
I ended up needing to pull in async-lock for its Mutex, to avoid the rare
panic if we end up shutting down at the same time we're e.g. computing
credentials.
This patch also uses the absence of a RefPtr<ServerT> in the OperationSender
as a signal that we've already shut down, which works as an "atomic" indicator,
but could be confusing. I'm happy to change it for something else if preferred.
| Assignee | ||
Updated•8 months ago
|
Pushed by jtracey@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/9f29a90d7ebd
Drop the EWS operation sender's reference on its server upon shutdown. r=edicharry
Description
•