Skip to content
This repository was archived by the owner on Jun 5, 2026. It is now read-only.
This repository was archived by the owner on Jun 5, 2026. It is now read-only.

CI: sigprof_race regression test crashes on macOS even with SIG_IGN fix applied #28

Description

Summary

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

  1. 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)
  2. 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
  3. Timer behaviorsetitimer(ITIMER_PROF) may behave differently on macOS, possibly delivering signals after the timer is stopped
  4. The test itself may be too aggressive for macOS — the 8000 iterations + 4 threads + 999 Hz combination may need platform-specific tuning

CI run

https://github.com/grafana/pprof-rs/actions/runs/22701001347

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions