Reduce warnings from Msg_CleanupPendingLoadState about "actor cannot send"
Categories
(Core :: DOM: Content Processes, task, P3)
Tracking
()
People
(Reporter: jstutte, Assigned: aiunusov)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
The nsDocShellLoadState::~nsDocShellLoadState
tries to send a cleanup message to the parent. In case we find ourselves inside a client process whose actor has been already closed, this will generate a very frequent WARNING log message like:
[task 2023-03-02T08:28:33.615Z] 08:28:33 INFO - PID 1303 | [Child 1546, Main Thread] WARNING: IPC message 'PContent::Msg_CleanupPendingLoadState' discarded: actor cannot send: file /builds/worker/checkouts/gecko/ipc/glue/ProtocolUtils.cpp:504
We should find out if this is really worrisome enough to spam our logs like this (then we should fight the root cause) or just check the actor for CanSend
before sending, assuming that a closed actor already triggered all necessary cleanup on the parent's side.
Reporter | ||
Comment 1•1 year ago
•
|
||
Artur, would you mind to take a look? Can you try to confirm that "a closed actor already triggered all necessary cleanup on the parent's side." ?
Reporter | ||
Updated•1 year ago
|
Assignee | ||
Comment 3•1 year ago
|
||
It seems that the purpose of this message is only mPendingLoadStates cleanup.
mPendingLoadStates.Clear() is called by ContentParent::ActorDestroy() which is called by IProtocol::DestroySubtree which is called during Shutdown (OnChannelClose/OnChannelError)
So, we might consider using CanSend(), as the LinkStatus changes during the process, described above.
This code seems unused and can be removed: https://searchfox.org/mozilla-central/source/ipc/glue/ProtocolUtils.cpp#524
I proposed a patch
Assignee | ||
Comment 4•1 year ago
|
||
Updated•1 year ago
|
Description
•