• Austin Clements's avatar
    runtime: force workers out before checking mark roots · c1730ae4
    Austin Clements authored
    Currently we check that all roots are marked as soon as gcMarkDone
    decides to transition from mark 1 to mark 2. However, issue #16083
    indicates that there may be a race where we try to complete mark 1
    while a worker is still scanning a stack, causing the root mark check
    to fail.
    
    We don't yet understand this race, but as a simple mitigation, move
    the root check to after gcMarkDone performs a ragged barrier, which
    will force any remaining workers to finish their current job.
    
    Updates #16083. This may "fix" it, but it would be better to
    understand and fix the underlying race.
    
    Change-Id: I1af9ce67bd87ade7bc2a067295d79c28cd11abd2
    Reviewed-on: https://go-review.googlesource.com/35353
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
    c1730ae4
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...