Bug 99641

Summary: Race condition between GCThread and main thread during copying phase
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, levin+threading, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Mark Hahnenberg
Reported 2012-10-17 14:50:33 PDT
When a GCThread returns from copyFromShared(), it then calls doneCopying(), which returns its borrowed CopiedBlock to the CopiedSpace. This final block allows the CopiedSpace to continue and finish the cleanup of the copying phase. However, the GCThread can loop back around, see that m_currentPhase is still "Copy", and try to go through the copying phase again. This can cause all sorts of issues. To fix this, we should add a cyclic barrier to GCThread::waitForNextPhase().
Attachments
Patch (10.24 KB, patch)
2012-10-18 11:24 PDT, Mark Hahnenberg
no flags
Mark Hahnenberg
Comment 1 2012-10-18 11:24:58 PDT
WebKit Review Bot
Comment 2 2012-10-18 12:44:32 PDT
Comment on attachment 169441 [details] Patch Clearing flags on attachment: 169441 Committed r131791: <http://trac.webkit.org/changeset/131791>
WebKit Review Bot
Comment 3 2012-10-18 12:44:35 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.