{"record":{"id":"6bbf5fb2b6368a11","repo":"vectordotdev/vector","slug":"servicesink-service-sender-dropped","errorCode":null,"errorMessage":"ServiceSink service sender dropped.","messagePattern":"ServiceSink service sender dropped\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/sinks/util/sink.rs","lineNumber":482,"sourceCode":"                        });\n                    }\n                    _ => {} // do nothing\n                }\n\n                // If the rx end is dropped we still completed\n                // the request so this is a weird case that we can\n                // ignore for now.\n                _ = tx.send(());\n            })\n            .instrument(info_span!(\"request\", %request_id).or_current())\n            .boxed()\n    }\n\n    fn poll_complete(&mut self, cx: &mut Context<'_>) -> Poll<()> {\n        while !self.in_flight.is_empty() {\n            match ready!(Pin::new(&mut self.in_flight).poll_next(cx)) {\n                Some(Ok(())) => {}\n                Some(Err(_)) => panic!(\"ServiceSink service sender dropped.\"),\n                None => break,\n            }\n        }\n\n        Poll::Ready(())\n    }\n}\n\nimpl<S, Request> fmt::Debug for ServiceSink<S, Request>\nwhere\n    S: fmt::Debug,\n{\n    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n        f.debug_struct(\"ServiceSink\")\n            .field(\"service\", &self.service)\n            .finish()\n    }\n}","sourceCodeStart":464,"sourceCodeEnd":500,"githubUrl":"https://github.com/vectordotdev/vector/blob/3708c39b12a93212ed8b8d7510b4cc7769cb5864/src/sinks/util/sink.rs#L464-L500","documentation":"ServiceSink drives sink requests through an internal service and tracks outstanding futures in self.in_flight. In poll_complete, a future resolving Err means the oneshot channel's sender - held by the internal service/driver task - was dropped, so pending responses can never arrive; the sink panics rather than silently pretending delivery succeeded.","triggerScenarios":"The internal service driver task (e.g. the connection task behind NetworkService) panics or exits while requests are in flight; the inner service is dropped early during shutdown with un-drained in-flight requests.","commonSituations":"An earlier separate failure (connection error storm, task panic, OOM kill) took down the internal task and this panic is only the visible symptom; shutdown-ordering races between sink and driver in custom embeddings; bugs fixed across Vector releases.","solutions":["Look upward in the logs: the first panic or error from the internal service task is the root cause - this panic merely reports it","Run with RUST_BACKTRACE=1 under a supervisor to capture where the internal task died","Upgrade Vector - several shutdown/driver races around ServiceSink were fixed over time","If reproducible, open an issue with the config and logs from the first error to the panic"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// You cannot pre-check this; contain it. Supervise the process so the panic is an\n// observable failure: systemd 'Restart=on-failure' + Environment=RUST_BACKTRACE=1.\n// In-process, watch the JoinError of the pipeline task:\nlet h = tokio::spawn(async move { run_topology(config).await });\nif let Err(je) = h.await {\n    if je.is_panic() { /* log backtrace, alert, restart pipeline with backoff */ }\n}","preventionTips":["Run Vector under systemd or a supervisor with Restart=on-failure and RUST_BACKTRACE=1","Always triage the first error in the log, not this panic","Keep Vector updated - this class of internal race gets fixed regularly"],"tags":["rust","vector","sink","service","internal","panic","shutdown"],"backgroundTag":"service-task-dropped","analyzedSha":"3708c39b12a93212ed8b8d7510b4cc7769cb5864","analyzedAt":"2026-08-20T07:02:18.786Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}