-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed as not planned
Closed as not planned
Copy link
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Linuxcompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Description
Does this issue reproduce with the latest release?
Yes, go1.24.5 is the latest release.
What did you do?
package main
import (
"fmt"
"io"
"runtime/pprof"
"time"
)
func main() {
fmt.Println("Starting CPU profile...")
pprof.StartCPUProfile(io.Discard)
time.Sleep(3 * time.Second)
fmt.Println("Stopping profile...")
pprof.StopCPUProfile()
fmt.Println("Done")
}Run multiple times - fails intermittently:
$ go build -o test && for i in {1..5}; do ./test; echo "exit: $?"; done
What did you expect to see?
Starting CPU profile...
Stopping profile...
Done
exit: 0
What did you see instead?
Intermittently, the process is killed with SIGKILL (exit 137) during StopCPUProfile():
Starting CPU profile...
Stopping profile...
Killed
exit: 137
Strace shows timer_delete() succeeds, then SIGKILL arrives from outside the process:
[pid 967876] timer_delete(1) = 0
[pid 967876] setitimer(ITIMER_PROF, {0, 0}, NULL) = 0
[pid 967877] +++ killed by SIGKILL +++
[pid 967876] +++ killed by SIGKILL +++
+++ killed by SIGKILL +++
Additional notes:
- Issue appeared after upgrading NixOS 25.05 → 25.11 (including kernel from
6.6 to 6.12wrong info sorry, actually: 6.12.41 → 6.12.59) - Kernel has CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
- Possibly related to misc/cgo/testcarchive: TestSIGPROF flakes with "signal: profiling timer expired" #19320, misc/cgo/testcarchive: TestSIGPROF failures with "signal: profiling timer expired" #43828
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Linuxcompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.