Add timeout around profile-gathering IPCs
Categories
(Core :: Gecko Profiler, task, P1)
Tracking
()
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.
Assignee | ||
Comment 1•4 years ago
|
||
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.
Comment 3•4 years ago
|
||
bugherder |
Description
•