runtime: syscall hangs during STW #36273
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
and need to add a
empty.s
file.What did you expect to see?
continuously output
Done
What did you see instead?
and hungup.
I was able to reproduce the problem on macos and one Ubuntu, but another Ubuntu will not reproduce (I am not sure of the retake strategy, and sysmon retake will not be triggered on this machine).
I found, if do
syscall
duringSTW
, and theP
where thisgoroutine
is located is retaken bysysmon
, this phenomenon will occur.I have analyzed that this problem occurs when
exitsyscall
,exitsyscallfast
fail->exitsyscall0
->globrunqput(gp)
->stopm
But in
STW
,schedule()
has no chance to callglobrunqget
, so it will hungup.I tried to make the following modification in
func retake(now int64) uint32
ofproc.go
to avoid this problem.But this is not a perfect solution, I guess
handoffp
has problem withP
's status processing inSTW
.The text was updated successfully, but these errors were encountered: