]> Cypherpunks repositories - gostls13.git/commit
runtime: check more work flushing races
authorAustin Clements <austin@google.com>
Mon, 26 Nov 2018 19:41:23 +0000 (14:41 -0500)
committerAustin Clements <austin@google.com>
Thu, 29 Nov 2018 22:08:05 +0000 (22:08 +0000)
commit438b9544a079576c539cdc040cbf337966a0b25d
tree365562f351786e31c84b74dffe869abc8c37b44a
parentfbdaa965634be842647195ee2d610dc363c760d2
runtime: check more work flushing races

This adds several new checks to help debug #27993. It adds a mechanism
for freezing write barriers and gcWork puts during the mark completion
algorithm. This way, if we do detect mark completion, we can catch any
puts that happened during the completion algorithm. Based on build
dashboard failures, this seems to be the window of time when these are
happening.

This also double-checks that all work buffers are empty immediately
upon entering mark termination (much earlier than the current check).
This is unlikely to trigger based on the current failures, but is a
good safety net.

Change-Id: I03f56c48c4322069e28c50fbc3c15b2fee2130c2
Reviewed-on: https://go-review.googlesource.com/c/151797
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/mgc.go
src/runtime/mgcwork.go
src/runtime/mwbbuf.go