zed-industries/zed · error
Failed to initialize timer loop!
Error message
Failed to initialize timer loop!
What it means
LinuxDispatcher::new spawns background worker threads and unwraps thread::Builder::spawn; failure means the OS could not create a thread (RLIMIT_NPROC, cgroup pids.max, memory pressure), so the dispatcher cannot start.
Source
Thrown at crates/gpui_linux/src/linux/dispatcher.rs:59
.spawn(move || {
for runnable in receiver.iter() {
let location = runnable.metadata().location;
let spawned = runnable.metadata().spawned;
profiler::update_running_task(spawned, location);
runnable.run();
profiler::save_task_timing();
}
})
.unwrap()
})
.collect::<Vec<_>>();
let (timer_sender, timer_channel) = calloop::channel::channel::<TimerAfter>();
let timer_thread = std::thread::Builder::new()
.name("Timer".to_owned())
.spawn(move || {
let mut event_loop: EventLoop<()> =
EventLoop::try_new().expect("Failed to initialize timer loop!");
let handle = event_loop.handle();
let timer_handle = event_loop.handle();
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();
}View on GitHub (pinned to f4178619ac)
Solutions
- Raise ulimit -u or the systemd TasksMax/pids limit
- Check for thread leaks exhausting the process thread budget
- Reduce requested worker thread count as a degraded startup mode
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/gpui_linux/src/linux/dispatcher.rs:59 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/4da233376e4a4583.
Report an issue: GitHub.