{"record":{"id":"ea0e3d6b352c556c","repo":"vectordotdev/vector","slug":"failed-to-set-up-sigquit-handler","errorCode":null,"errorMessage":"Failed to set up SIGQUIT handler.","messagePattern":"Failed to set up SIGQUIT handler\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/signal.rs","lineNumber":199,"sourceCode":"    pub fn clear(&mut self) {\n        for shutdown_tx in self.shutdown_txs.drain(..) {\n            // An error just means the channel was already shut down; safe to ignore.\n            _ = shutdown_tx.send(());\n        }\n    }\n}\n\n/// Signals from OS/user.\n#[cfg(unix)]\nfn os_signals(runtime: &Runtime) -> impl Stream<Item = SignalTo> + use<> {\n    use tokio::signal::unix::{SignalKind, signal};\n\n    // The `signal` function must be run within the context of a Tokio runtime.\n    runtime.block_on(async {\n        let mut sigint = signal(SignalKind::interrupt()).expect(\"Failed to set up SIGINT handler.\");\n        let mut sigterm =\n            signal(SignalKind::terminate()).expect(\"Failed to set up SIGTERM handler.\");\n        let mut sigquit = signal(SignalKind::quit()).expect(\"Failed to set up SIGQUIT handler.\");\n        let mut sighup = signal(SignalKind::hangup()).expect(\"Failed to set up SIGHUP handler.\");\n\n        async_stream::stream! {\n            loop {\n                let signal = tokio::select! {\n                    _ = sigint.recv() => {\n                        info!(message = \"Signal received.\", signal = \"SIGINT\");\n                        SignalTo::Shutdown(None)\n                    },\n                    _ = sigterm.recv() => {\n                        info!(message = \"Signal received.\", signal = \"SIGTERM\");\n                        SignalTo::Shutdown(None)\n                    } ,\n                    _ = sigquit.recv() => {\n                        info!(message = \"Signal received.\", signal = \"SIGQUIT\");\n                        SignalTo::Quit\n                    },\n                    _ = sighup.recv() => {","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/vectordotdev/vector/blob/3708c39b12a93212ed8b8d7510b4cc7769cb5864/src/signal.rs#L181-L217","documentation":"Vector registers a SIGQUIT handler (used for immediate exit diagnostics) via tokio::signal::unix::signal(SignalKind::quit()) and unwraps with expect. If the OS refuses the registration (sandbox blocks signal syscalls, resource limits, duplicate registrations beyond what the runtime allows), Vector panics at startup.","triggerScenarios":"Starting Vector where SIGQUIT handler registration fails: restrictive seccomp/apparmor profiles, fd or handler limits exhausted, or multiple signal streams registered in a constrained test binary.","commonSituations":"Hardened container images; custom supervisors; CI sandboxes that block signal syscalls.","solutions":["Relax the sandbox to allow signal syscalls (rt_sigaction, signalfd2)","Raise file-descriptor limits before starting Vector","Avoid double-registering signal streams when embedding Vector in another async binary","Test on an unrestricted host to isolate the environment"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"ulimit -n 65536\nvector validate /etc/vector/vector.toml && vector --config /etc/vector/vector.toml","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Allow signal-related syscalls in hardened profiles (rt_sigaction, signalfd2)","Monitor fd usage (lsof -p $(pidof vector)) in dense deployments","Exercise SIGQUIT/SIGINT/SIGTERM/SIGHUP paths during staging rollout"],"tags":["rust","vector","tokio","signals","unix","sigquit","panic"],"backgroundTag":"signal-handler-registration-failed","analyzedSha":"3708c39b12a93212ed8b8d7510b4cc7769cb5864","analyzedAt":"2026-08-20T07:02:18.786Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T20:17:18.057Z"}