zed-industries/zed · error · anyhow::Error
commit data reader task dropped response
Error message
commit data reader task dropped response
What it means
The request reached the commit data reader task, but the response oneshot receiver failed — the task dropped the response sender without answering (task dropped mid-processing or panicked on an earlier request). Distinguish from the send failure: the channel was alive, but the answer never came back.
Source
Thrown at crates/git/src/repository.rs:154
sha: Oid,
response_tx: oneshot::Sender<Result<CommitData>>,
}
pub struct CommitDataReader {
request_tx: async_channel::Sender<CommitDataRequest>,
_task: Task<()>,
}
impl CommitDataReader {
pub async fn read(&self, sha: Oid) -> Result<CommitData> {
let (response_tx, response_rx) = oneshot::channel();
self.request_tx
.send(CommitDataRequest { sha, response_tx })
.await
.map_err(|_| anyhow!("commit data reader task closed"))?;
response_rx
.await
.map_err(|_| anyhow!("commit data reader task dropped response"))?
}
#[cfg(any(test, feature = "test-support"))]
pub fn for_test(
executor: BackgroundExecutor,
resolve: impl 'static + Send + Sync + Fn(Oid) -> Result<CommitData>,
) -> Self {
let (request_tx, request_rx) = smol::channel::bounded::<CommitDataRequest>(64);
let resolve = Arc::new(resolve);
let delay_executor = executor.clone();
let task = executor.spawn(async move {
while let Ok(CommitDataRequest { sha, response_tx }) = request_rx.recv().await {
delay_executor.simulate_random_delay().await;
response_tx.send(resolve(sha)).ok();
}
});
Self {View on GitHub (pinned to 5a9b9558db)
Solutions
- Retry the read once — a transient drop during shutdown may succeed on a fresh reader
- If persistent, mark the reader task as failed and stop queueing requests to it
- Capture panics in the reader loop with catch_unwind so drops are explainable in logs
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/git/src/repository.rs:154 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20).
Data as JSON: /api/errors/a06deedcd1674597.
Report an issue: GitHub.