Skip to content

Shutdown signal handler calls std.log (not async-signal-safe) #83

Description

@lukashes

handleShutdownSignal calls std.log.info (src/main.zig:166-169). The log path takes the stderr mutex; if SIGINT/SIGTERM lands while another thread holds it (the flush worker logs regularly), the handler deadlocks and shutdown hangs until the supervisor sends SIGKILL. No data is at risk (the slot is preserved), but graceful shutdown becomes unreliable.

Ask: keep only the atomic store in the handler and log the "shutdown requested" message from the main loop when it observes the flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions