WebKit Bugzilla
Attachment 360565 Details for
Bug 194014
: Fix deadlock on Linux/x64 between SamplingProfiler and VMTraps
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194014-20190130121128.patch (text/plain), 3.27 KB, created by
Dominik Inführ
on 2019-01-30 03:11:30 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dominik Inführ
Created:
2019-01-30 03:11:30 PST
Size:
3.27 KB
patch
obsolete
>Subversion Revision: 240707 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 3b5b10177de51d608497aca0f3fa08b318976d66..a973e7de60f3cf3305349ed1d959ceb0f974b09c 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,18 @@ >+2019-01-30 Dominik Infuehr <dinfuehr@igalia.com> >+ >+ Fix deadlock on Linux/x64 between SamplingProfiler and VMTraps >+ https://bugs.webkit.org/show_bug.cgi?id=194014 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Do not block SIGUSR1 when installing signal handlers, since this signal >+ is used to suspend/resume machine threads on Linux. >+ >+ * wtf/Threading.h: >+ * wtf/posix/ThreadingPOSIX.cpp: >+ * wtf/threads/Signals.cpp: >+ (WTF::installSignalHandler): >+ > 2019-01-29 Chris Dumez <cdumez@apple.com> > > Make sure WTF::generateObjectIdentifier() internal counter does not get duplicated >diff --git a/Source/WTF/wtf/Threading.h b/Source/WTF/wtf/Threading.h >index 3a8a4a55d339a0fe49fcca6cfe939becccd11f84..d0c0e58a6df86419779923ab91d95ce9700caa02 100644 >--- a/Source/WTF/wtf/Threading.h >+++ b/Source/WTF/wtf/Threading.h >@@ -64,6 +64,13 @@ class PrintStream; > // This function can be called from any threads. > WTF_EXPORT_PRIVATE void initializeThreading(); > >+#if !OS(DARWIN) >+ >+// We use SIGUSR1 to suspend and resume machine threads in JavaScriptCore. >+constexpr const int SigThreadSuspendResume = SIGUSR1; >+ >+#endif >+ > // FIXME: The following functions remain because they are used from WebKit Windows support library, > // WebKitQuartzCoreAdditions.dll. When updating the support library, we should use new API instead > // and the following workaound should be removed. And new code should not use the following APIs. >diff --git a/Source/WTF/wtf/posix/ThreadingPOSIX.cpp b/Source/WTF/wtf/posix/ThreadingPOSIX.cpp >index e48dd9b57edd4cf55f25331645823f3109da4221..64cd1f718d55f6ea5ba9d6c346d073885b32f567 100644 >--- a/Source/WTF/wtf/posix/ThreadingPOSIX.cpp >+++ b/Source/WTF/wtf/posix/ThreadingPOSIX.cpp >@@ -105,8 +105,6 @@ private: > }; > static LazyNeverDestroyed<Semaphore> globalSemaphoreForSuspendResume; > >-// We use SIGUSR1 to suspend and resume machine threads in JavaScriptCore. >-static constexpr const int SigThreadSuspendResume = SIGUSR1; > static std::atomic<Thread*> targetThread { nullptr }; > > void Thread::signalHandlerSuspendResume(int, siginfo_t*, void* ucontext) >diff --git a/Source/WTF/wtf/threads/Signals.cpp b/Source/WTF/wtf/threads/Signals.cpp >index 5e7eb6acc3b870f97f078415610943a870839791..fcd0f1d68faece8340c79b4e6c5db071b0a11234 100644 >--- a/Source/WTF/wtf/threads/Signals.cpp >+++ b/Source/WTF/wtf/threads/Signals.cpp >@@ -258,6 +258,9 @@ void installSignalHandler(Signal signal, SignalHandler&& handler) > action.sa_sigaction = jscSignalHandler; > auto result = sigfillset(&action.sa_mask); > RELEASE_ASSERT(!result); >+ // Do not block this signal since it is used on non-Darwin systems to suspend and resume threads. >+ result = sigdelset(&action.sa_mask, SigThreadSuspendResume); >+ RELEASE_ASSERT(!result); > action.sa_flags = SA_SIGINFO; > auto systemSignals = toSystemSignal(signal); > result = sigaction(std::get<0>(systemSignals), &action, &oldActions[offsetForSystemSignal(std::get<0>(systemSignals))]);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194014
:
360565
|
360566
|
360568
|
362007