Description
We have a program, built with Go 1.24.2, where we sometimes see very long stop-the-world pauses. The program has GOGC=off
and a GOMEMLIMIT
of ~12GiB. We see the pauses when the program has exceeded its memory limit.
For example, this execution trace shows a 400ms stop-the-world pause. The goroutine in proc 1 is trying to stop the world for sweep termination, and a CPU profile sample shows that it is trying to preempt goroutines. Meanwhile, the goroutine on proc 4 is running for 400ms, and all the CPU profile samples during that time show it calling runtime.sysUnused
during runtime.(*pageAlloc).scavenge
, where it can't be preempted. The third screenshot shows that GC is happening almost constantly during the trace.



In our case, we can increase our memory limit if needed. I'm mainly filing this issue to document this worst-case behavior, in case there are things we could do to improve it.
cc @mknyszek
Metadata
Metadata
Assignees
Labels
Type
Projects
Status