Closed Bug 920098 Opened 11 years ago Closed 10 years ago

Potential profiler deadlock on MacOS

Categories

(Core :: Gecko Profiler, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1054335

People

(Reporter: bugzilla, Unassigned)

Details

There's a potential deadlock that could occur under the right conditions in any profiler_lock or profiler_stop invocation.

1. SamplerThread calls SamplerRegistry::sampler->IsActive(), it returns true
2. Sampler::Stop called on another thread, active_ is changed to false.
3. Thread calling Sampler::Stop takes sRegisteredThreadsMutex
4. Thread calling Sampler::Stop then joins on the SamplerThread
5. SamplerThread tries to take sRegisteredThreadsMutex, blocks, we deadlock.

This can't happen on Linux or Win32 because step 3 doesn't happen on those platforms.
Marking as dup of bug 1054335 since that bug's description is more in line with the current state of the code.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.