[Webkit-unassigned] [Bug 194014] Fix deadlock on Linux/x64 between SamplingProfiler and VMTraps

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 30 08:12:21 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=194014

--- Comment #4 from Dominik Inführ <dinfuehr at igalia.com> ---
There was a deadlock in the following situation:

Thread 1 (Sampling): In SamplingProfiler.cpp:takeSample it takes all locks and then tries to suspend the main thread.

Thread 2 (Watchdog/VMTraps): Before the Sampling-Thread suspends the main thread a signal is caught and signal handler is invoked (VMTraps.cpp:SignalSender). SignalSender tries to lock codeBlockSet, but this is already locked by the SamplingProfiler. The SamplingProfiler can only give up the lock when it suspends the thread. However since the VMTraps signal handler is active, all other signals blocked, therefore the SamplingProfiler also waits until its signal handler is invoked.

The patch fixes this by only blocking all signals except for SIGUSR1, which is used for suspending/resuming threads.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190130/bfd27656/attachment-0001.html>


More information about the webkit-unassigned mailing list