You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several runtime tests use SetGCPercent(-1) to disable GC because they're about to do something that interferes with preemption (sigh, #10958). However, now that SetGCPercent no longer forces a full GC, it also doesn't force a currently running concurrent GC to terminate. This results in the following possible situation:
Concurrent GC starts. Sweep termination runs and we enter concurrent mark.
Test calls SetGCPercent(-1).
Test enters a non-preemptible loop.
Concurrent GC tries to STW to enter mark termination, but can't preempt the loop, so the test deadlocks.
This can be reproduced pretty quickly by running cd runtime; go test -c; GOGC=5 stress -p 1 ./runtime.test -test.short.
Since the point of SetGCPercent(-1) is to disabled GC, it should probably want for any concurrent GC cycle to finish.
Several runtime tests use
SetGCPercent(-1)
to disable GC because they're about to do something that interferes with preemption (sigh, #10958). However, now thatSetGCPercent
no longer forces a full GC, it also doesn't force a currently running concurrent GC to terminate. This results in the following possible situation:SetGCPercent(-1)
.This can be reproduced pretty quickly by running
cd runtime; go test -c; GOGC=5 stress -p 1 ./runtime.test -test.short
.Since the point of
SetGCPercent(-1)
is to disabled GC, it should probably want for any concurrent GC cycle to finish./cc @RLH
The text was updated successfully, but these errors were encountered: