Open Bug 1819862 Opened 1 year ago Updated 5 months ago

Reduce warnings from Msg_CleanupPendingLoadState about "actor cannot send"

Categories

(Core :: DOM: Content Processes, task, P3)

task

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.

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." ?

Flags: needinfo?(aiunusov)
Severity: -- → S4
Priority: -- → P3

looking

Assignee: nobody → aiunusov
Flags: needinfo?(aiunusov)

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

Attachment #9322271 - Attachment description: Bug 1819862: Reduce warnings from Msg_CleanupPendingLoadState about "actor cannot send", r=jstutte → WIP: Bug 1819862: Reduce warnings from Msg_CleanupPendingLoadState about "actor cannot send", r=jstutte
Blocks: logspam
Duplicate of this bug: 1866132
See Also: → 1866132
No longer duplicate of this bug: 1866132
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: