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
We’re encountering a flaky runtime panic on macOS systems when calling cpu.Times() from github.com/shirou/gopsutil/[email protected]. The panic looks like this:
panic: runtime error: unsafe.Slice: ptr is nil and len is not zero
goroutine 1 [running]:
github.com/shirou/gopsutil/v4/cpu.perCPUTimes(0x14000a37660)
github.com/shirou/gopsutil/[email protected]/cpu/cpu_darwin.go:158 +0x4ec
github.com/shirou/gopsutil/v4/cpu.TimesWithContext({0x104548ae0?, 0x1400002d110?}, 0x1)
github.com/shirou/gopsutil/[email protected]/cpu/cpu_darwin.go:70 +0x70
github.com/shirou/gopsutil/v4/cpu.Times(...)
github.com/shirou/gopsutil/[email protected]/cpu/cpu_darwin.go:59
github.com/shirou/gopsutil/v4/cpu.init.0()
This seems related to changes introduced in v4.24.9, which updated the macOS CPU code to use unsafe.Slice.
Hi 👋
We’re encountering a flaky runtime panic on macOS systems when calling cpu.Times() from github.com/shirou/gopsutil/[email protected]. The panic looks like this:
This seems related to changes introduced in v4.24.9, which updated the macOS CPU code to use unsafe.Slice.
Reproducibility
This happens intermittently — we’ve seen it in CI or test environments on macOS. Runner details https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md
The text was updated successfully, but these errors were encountered: