Skip to content

Docs: clarify why macOS thread stack traces are unavailable even with sudo #97

Description

@rezdm

Background

`MacosProcessDataProvider::get_thread_stack()` (src/platform/macos/macos_process_details.cpp) is a hard-coded stub returning an empty string, with the comment "Per-thread kernel stacks require task_for_pid (SIP-restricted); unavailable." A tester confirmed this holds true with or without sudo, which is expected given the implementation — not a regression.

Why this needs a doc pass, not a code fix

The full story is more precise than "SIP-restricted": Apple's hardened runtime / AMFI blocks `task_for_pid` on another process for any unentitled binary, even running as root — it isn't only about SIP protecting Apple-signed targets. Getting this working for arbitrary processes would require code-signing pex with a debugger entitlement (`com.apple.security.cs.debugger` / `get-task-allow`), which needs either an Apple Developer ID or local ad-hoc self-signing — infrastructure this project doesn't currently have.

Action

Update PRIVILEGES.md / README's macOS section to state this precisely (AMFI/hardened runtime, not just SIP; root does not help; would need codesigning entitlements to ever support), so users don't file this as a bug or assume sudo should fix it. No code change unless/until we decide to invest in local codesigning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationmacosmacOS platform backend

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions