zed-industries/zed · error
Failed to start timer
Error message
Failed to start timer
What it means
LinuxDispatcher::new inserts a calloop timer source to run delayed runnables; insert_source returned an error (event loop registration failure) and the code panics. Without this source, scheduled timers would never fire, so startup fails.
Source
Thrown at crates/gpui_linux/src/linux/dispatcher.rs:81
handle
.insert_source(timer_channel, move |e, _, _| {
if let channel::Event::Msg(timer) = e {
let mut runnable = Some(timer.runnable);
timer_handle
.insert_source(
calloop::timer::Timer::from_duration(timer.duration),
move |_, _, _| {
if let Some(runnable) = runnable.take() {
let location = runnable.metadata().location;
let spawned = runnable.metadata().spawned;
profiler::update_running_task(spawned, location);
runnable.run();
profiler::save_task_timing();
}
TimeoutAction::Drop
},
)
.expect("Failed to start timer");
}
})
.expect("Failed to start timer thread");
event_loop.run(None, &mut (), |_| {}).log_err();
})
.unwrap();
background_threads.push(timer_thread);
Self {
main_sender,
timer_sender,
background_sender,
_background_threads: background_threads,
main_thread_id: thread::current().id(),
}
}View on GitHub (pinned to f4178619ac)
Solutions
- Check the calloop event loop is still valid when insert_source is called
- Inspect the calloop Error (fd exhaustion, EBADF) for the root cause
- Check file descriptor limits (ulimit -n)
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/gpui_linux/src/linux/dispatcher.rs:81 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/d65c9318181cac2a.
Report an issue: GitHub.