Closed Bug 1648324 Opened 4 years ago Closed 4 years ago

Add timeout around profile-gathering IPCs

Categories

(Core :: Gecko Profiler, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If a sub-process is stuck, it will never respond to SendGatherProfile(), and the parent will wait forever and never output a profile.

There should be a timeout mechanism that will give up and output the profile as-gathered-so-far, ideally with an indication that some processes are missing.

Knowing the time it takes for the parent process to gather its profile, we expect sub-processes not to take longer than twice that time (plus a bit more).
Each time we receive a profile, the timer is restarted* to allow more time for pending processes.
If the most current timer fires, we assume that pending processes may be frozen and unable to ever respond, so we use all profiles gathered so far.
(There is currently no indication to the user that processes are missing, this should be added in the future.)

  • Tech detail: We just cancel the current timer and forget about it, then start a new one and keep track of it. When a timer fires, we can compare its address to the address of the last (most current) timer, and only that one can force the end of profile-gathering.
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eb31eed62026 Add timeout when waiting for child profiles - r=canaltinova
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: