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
The sigprof_race regression test (added in PR #26) crashes on macOS CI even with the SIG_IGN fix applied. Both macOS test jobs fail:
Test (macos-latest, stable, x86_64-apple-darwin) — signal crash
Test (macos-latest, nightly, x86_64-apple-darwin) — signal crash
Linux CI and local Linux runs pass consistently (42 runs, 0 failures).
Context
PR #26 adds a regression test for the SIGPROF race condition fixed in 978d3aa. The test rapidly cycles ProfilerGuard (start/stop profiler) 8000 times at 999 Hz with background CPU-burning threads. Without the fix, a pending SIGPROF delivered after SIG_DFL is restored crashes the process.
The fix uses SIG_IGN instead of restoring SIG_DFL, which should safely ignore any pending signals. This works on Linux but apparently not on macOS.
Possible causes to investigate
macOS signal delivery semantics differ from Linux — macOS may deliver SIGPROF differently (e.g., to specific threads, or with different timing relative to sigaction() calls)
SIG_IGN may not take effect atomically on macOS — there could be a window where the old handler is gone but SIG_IGN isn't yet installed
Timer behavior — setitimer(ITIMER_PROF) may behave differently on macOS, possibly delivering signals after the timer is stopped
The test itself may be too aggressive for macOS — the 8000 iterations + 4 threads + 999 Hz combination may need platform-specific tuning
Summary
The
sigprof_raceregression test (added in PR #26) crashes on macOS CI even with theSIG_IGNfix applied. Both macOS test jobs fail:Test (macos-latest, stable, x86_64-apple-darwin)— signal crashTest (macos-latest, nightly, x86_64-apple-darwin)— signal crashLinux CI and local Linux runs pass consistently (42 runs, 0 failures).
Context
PR #26 adds a regression test for the SIGPROF race condition fixed in 978d3aa. The test rapidly cycles
ProfilerGuard(start/stop profiler) 8000 times at 999 Hz with background CPU-burning threads. Without the fix, a pendingSIGPROFdelivered afterSIG_DFLis restored crashes the process.The fix uses
SIG_IGNinstead of restoringSIG_DFL, which should safely ignore any pending signals. This works on Linux but apparently not on macOS.Possible causes to investigate
sigaction()calls)SIG_IGNmay not take effect atomically on macOS — there could be a window where the old handler is gone butSIG_IGNisn't yet installedsetitimer(ITIMER_PROF)may behave differently on macOS, possibly delivering signals after the timer is stoppedCI run
https://github.com/grafana/pprof-rs/actions/runs/22701001347
Related