Potential profiler deadlock on MacOS

RESOLVED DUPLICATE of bug 1054335

Status

()

Core
Gecko Profiler
RESOLVED DUPLICATE of bug 1054335
5 years ago
4 years ago

People

(Reporter: aklotz, Unassigned)

Tracking

Trunk
x86_64
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
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.
(Reporter)

Comment 1

4 years ago
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
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1054335
You need to log in before you can comment on or make changes to this bug.