Open Bug 1659880 Opened 4 years ago Updated 4 years ago

Review functions that could be interrupted by the profiler sampler

Categories

(Core :: Gecko Profiler, task, P2)

task

Tracking

()

People

(Reporter: mozbugz, Unassigned)

References

Details

Bug 1658847 showed that some posix functions can be interrupted by the profiler sampler's SIG_PROF on Linux (used to suspend threads to sample them).

In that bug, posix_fallocate was especially susceptible, because it required a significantly longer time to complete than the typical profiler sampler frequency, effectively preventing the operation from completing!
The solution there was to use AUTO_PROFILER_THREAD_SLEEP to stop the sampler from continuously interrupting posix_fallocate; it also makes sense anyway, because sampling during that kind of long function would not produce different stacks.

It would be good to review these functions, to ensure that we don't interrupt them during profiling, or that that interruption is acceptable.

To start with:

  • There are a few other posix_fallocate calls.
  • There are lots (>600) of "EINTR", some the actual EINTR value; others macros including that name that either discard the error (is that bad?) or try again (could that lock as well).
  • Finally we may need to make a list of functions that could be interrupted by signals, and examine them...
Priority: P3 → P2
You need to log in before you can comment on or make changes to this bug.