Skip to content

v2.19.0: Crash-proof log capture

Choose a tag to compare

@jdx jdx released this 25 Jul 22:16
· 103 commits to main since this release
Immutable release. Only release title and notes can be modified.
da5c119

A small release focused on making logging and orphan handling more robust across supervisor crashes. Daemon output is now captured by a dedicated sibling process so a supervisor crash no longer takes daemons or their logs down with it, and orphan identity checks are tightened to avoid ever acting on a recycled PID.

Added

  • Out-of-process log capture (#661) — @jdx. Daemon stdout/stderr capture moves out of the supervisor into a dedicated sibling process (pitchfork log-sink), following the runit runsv/log-service model. Previously the supervisor held the read end of every daemon's output pipe, so killing the supervisor left the pipe with no reader and the daemon's next write took SIGPIPE and usually died with it — undermining the orphan re-adoption added in 2.18.0. Now a supervisor crash is invisible to logging: the daemon keeps writing, the sink keeps recording, and nothing is dropped. A sink that dies while its daemon is still monitored is automatically replaced. Daemons using ready_output, an on_output hook, or pty = true continue to use the in-process path since the supervisor itself must read those streams.

Fixed

  • Orphan identity now requires a verified process start time (#665) — @jdx. Orphan cleanup previously fell back to comparing process names when a record had no recorded kernel start time, which meant a recycled PID running a common program (node, nginx, postgres) could be mistaken for a legacy record of a different daemon — and then adopted, or killed under orphan_policy = "kill". Records without a start time on either side are now treated as unverifiable: pitchfork retains their running state and logs a warning rather than acting on the process. The same protection applies to user-initiated stop and resource-violation kills, which are skipped only when start times provably contradict each other.

Full Changelog: v2.18.0...v2.19.0

💚 Sponsor pitchfork

pitchfork is maintained by @jdx, an open source developer for entire.io, the title sponsor of the jdx.dev open source tools including mise, aube, hk, and more. Development is sustained by sponsorships.

If pitchfork has a place in your dev workflow, please consider sponsoring at jdx.dev. Individual and company sponsorships are what keep the project healthy and moving forward.