Closed Bug 1710607 Opened 3 years ago Closed 3 years ago

If not profiling, avoid async ShutdownProfilerChild and forced thread shutdown

Categories

(Core :: Gecko Profiler, task, P1)

task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

References

Details

Crash Data

Attachments

(1 file)

As seen in reports from bug 1613798, most (all?) crashes happen waiting for the ProfilerChild thread to shutdown when the user is not even profiling.
Since profiling is not active, there wouldn't be long operations (to serialize the profile), so it would be safe to run that task synchronously, meaning that we wouldn't need to wait for the thread to shut down.
This should reduce the crash rate significantly.

When not profiling, ShutdownProfilerChild should be quick, so it's safe to run synchronously.
In this case, we don't need to manually shutdown the thread (to wait for the previously-async task).
This removes the risky thread-shutdown with its inner event-handling loop, where all crashes in bug 1613798 happen.

Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/02ea24efbd7c
If not profiling, make ShutdownProfilerChild dispatch SYNC - r=canaltinova
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

Adding the same signatures as bug 1613798 here, to better follow the effects of this patch.
Starting with build 20210512174859, after a few days it already looks promising with zero crashes so far. 🤞

Crash Signature: [@ IPCError-browser | ShutDownKill | nsThread::Shutdown | mozilla::ChildProfilerController::ShutdownAndMaybeGrabShutdownProfileFirst] [@ IPCError-browser | ShutDownKill | nsThread::Shutdown | mozilla::ChildProfilerController::GrabShutdownProfileAndShutdo…
See Also: → 1622110
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: