vectordotdev/vector · error

Failed to set up SIGQUIT handler.

Error message

Failed to set up SIGQUIT handler.

What it means

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.

Source

Thrown at src/signal.rs:199

    pub fn clear(&mut self) {
        for shutdown_tx in self.shutdown_txs.drain(..) {
            // An error just means the channel was already shut down; safe to ignore.
            _ = shutdown_tx.send(());
        }
    }
}

/// Signals from OS/user.
#[cfg(unix)]
fn os_signals(runtime: &Runtime) -> impl Stream<Item = SignalTo> + use<> {
    use tokio::signal::unix::{SignalKind, signal};

    // The `signal` function must be run within the context of a Tokio runtime.
    runtime.block_on(async {
        let mut sigint = signal(SignalKind::interrupt()).expect("Failed to set up SIGINT handler.");
        let mut sigterm =
            signal(SignalKind::terminate()).expect("Failed to set up SIGTERM handler.");
        let mut sigquit = signal(SignalKind::quit()).expect("Failed to set up SIGQUIT handler.");
        let mut sighup = signal(SignalKind::hangup()).expect("Failed to set up SIGHUP handler.");

        async_stream::stream! {
            loop {
                let signal = tokio::select! {
                    _ = sigint.recv() => {
                        info!(message = "Signal received.", signal = "SIGINT");
                        SignalTo::Shutdown(None)
                    },
                    _ = sigterm.recv() => {
                        info!(message = "Signal received.", signal = "SIGTERM");
                        SignalTo::Shutdown(None)
                    } ,
                    _ = sigquit.recv() => {
                        info!(message = "Signal received.", signal = "SIGQUIT");
                        SignalTo::Quit
                    },
                    _ = sighup.recv() => {

View on GitHub (pinned to 3708c39b12)

Solutions

  1. Relax the sandbox to allow signal syscalls (rt_sigaction, signalfd2)
  2. Raise file-descriptor limits before starting Vector
  3. Avoid double-registering signal streams when embedding Vector in another async binary
  4. Test on an unrestricted host to isolate the environment
Defensive patterns

Strategy: validation

Validate before calling

ulimit -n 65536
vector validate /etc/vector/vector.toml && vector --config /etc/vector/vector.toml

Prevention

When it happens

Trigger: 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.

Common situations: Hardened container images; custom supervisors; CI sandboxes that block signal syscalls.

Related errors


AI-assisted analysis of vectordotdev/vector@3708c39b12 (2026-08-20). Data as JSON: /api/errors/ea0e3d6b352c556c. Report an issue: GitHub.