{"record":{"id":"d65c9318181cac2a","repo":"zed-industries/zed","slug":"failed-to-start-timer","errorCode":null,"errorMessage":"Failed to start timer","messagePattern":"Failed to start timer","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_linux/src/linux/dispatcher.rs","lineNumber":81,"sourceCode":"                handle\n                    .insert_source(timer_channel, move |e, _, _| {\n                        if let channel::Event::Msg(timer) = e {\n                            let mut runnable = Some(timer.runnable);\n                            timer_handle\n                                .insert_source(\n                                    calloop::timer::Timer::from_duration(timer.duration),\n                                    move |_, _, _| {\n                                        if let Some(runnable) = runnable.take() {\n                                            let location = runnable.metadata().location;\n                                            let spawned = runnable.metadata().spawned;\n                                            profiler::update_running_task(spawned, location);\n                                            runnable.run();\n                                            profiler::save_task_timing();\n                                        }\n                                        TimeoutAction::Drop\n                                    },\n                                )\n                                .expect(\"Failed to start timer\");\n                        }\n                    })\n                    .expect(\"Failed to start timer thread\");\n\n                event_loop.run(None, &mut (), |_| {}).log_err();\n            })\n            .unwrap();\n\n        background_threads.push(timer_thread);\n\n        Self {\n            main_sender,\n            timer_sender,\n            background_sender,\n            _background_threads: background_threads,\n            main_thread_id: thread::current().id(),\n        }\n    }","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/gpui_linux/src/linux/dispatcher.rs#L63-L99","documentation":"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.","triggerScenarios":"Thrown at crates/gpui_linux/src/linux/dispatcher.rs:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}