Bug 99641 - Race condition between GCThread and main thread during copying phase
Summary: Race condition between GCThread and main thread during copying phase
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-17 14:50 PDT by Mark Hahnenberg
Modified: 2012-10-18 12:44 PDT (History)
3 users (show)

See Also:


Attachments
Patch (10.24 KB, patch)
2012-10-18 11:24 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 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().
Comment 1 Mark Hahnenberg 2012-10-18 11:24:58 PDT
Created attachment 169441 [details]
Patch
Comment 2 WebKit Review Bot 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>
Comment 3 WebKit Review Bot 2012-10-18 12:44:35 PDT
All reviewed patches have been landed.  Closing bug.