nsProfiler can fail to gather profiles for content processes that have just started to shut down

NEW
Unassigned

Status

()

P3
normal
a year ago
7 months ago

People

(Reporter: mconley, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
Points:
---

Firefox Tracking Flags

(firefox57 fix-optional)

Details

(Reporter)

Description

a year ago
I noticed this while working on bug 1374333. The tps Talos test opens a new window, loads a bunch of tabs in it, switches between those tabs, records timing results and then exits.

Talos attempts to gather profiles after timing is recorded, but the tps test was closing the tabs and window before the profile was done being gathered.

I suspect there is a race where the ProfilerParent::SendGatherProfile Promise can fail if the shutdown message has been sent by ContentParent. This means that exit profiles are on their way, but the gatherer is going to hear about the rejected
Promises first and decrement the mPendingProfiles counter (with empty profiles) before the exit profiles can arrive.

I worked around this for tps by adding some Talos goop to wait for the profile to finish being collected before cleaning up the window, but I can see this (rare) case probably biting us in the wild and wanted to get it on file.

Updated

11 months ago
status-firefox57: --- → fix-optional
Priority: -- → P3
Blocks: 1431175
You need to log in before you can comment on or make changes to this bug.