-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
Milestone
Description
- go version go1.5.2 netbsd/amd64
- NetBSD 7.0 amd64
The following program crashes after less than a second.
package main
import (
"os"
"runtime/pprof"
)
func main() {
f, _ := os.Create("demo.pprof")
pprof.StartCPUProfile(f)
for {
}
}
The crash only happens in profiling mode.
When run under the eyes of ktruss -t A -R, the program does this:
thread | relative time | syscall
...
2 0.000011454 __nanosleep50 = 0
2 0.000035199 __clock_gettime50(0, 0xc820037ee8) = 0
2 0.000033803 __clock_gettime50(0, 0xc820037ed0) = 0
3 -1.979777508 stop kernel
3 0.020298198 resume kernel
3 0.000010895 compat_60__lwp_park Err#4 EINTR
3 0.000015364 SIGPROF caught handler=0x455aa0 mask=0x0 code=0x0
3 0.000084925 setcontext(0x40) Err#14 EFAULT
3 0.000009499 exit(0xffffffffffffffff)
2 -1.999839927 stop kernel
2 0.000196948 resume kernel
2 0.000006984 __nanosleep50 Err#4 EINTR
3 -1.999966198 stop kernel
3 0.000063973 resume kernel
3 0.000009777 stop kernel
3 0.000053079 resume kernel
Reactions are currently unavailable