WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99226
Race condition during copying phase can lead to deadlock
https://bugs.webkit.org/show_bug.cgi?id=99226
Summary
Race condition during copying phase can lead to deadlock
Mark Hahnenberg
Reported
2012-10-12 18:02:13 PDT
The main thread calls startCopying() for each of the GCThreads at the beginning of the copy phase. It then proceeds to start copying. If copying completes before one of the GCThreads wakes up, the main thread will set m_currentPhase back to NoPhase, the GCThread will wake up, see that there's nothing to do, and then it will go back to sleep without ever calling CopyVisitor::doneCopying() to return its borrowed block to the CopiedSpace. CopiedSpace::doneCopying() will then sleep forever waiting on the block. The fix for this is to make sure we call CopiedSpace::doneCopying() on the main thread before we call GCThreadSharedData::didFinishCopying(), which sets the m_currentPhase flag to NoPhase. This way we will wait until all threads have woken up and given back their borrowed blocks before clearing the flag.
Attachments
Add attachment
proposed patch, testcase, etc.
Mark Hahnenberg
Comment 1
2012-10-12 18:11:00 PDT
Committed
r131244
: <
http://trac.webkit.org/changeset/131244
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug