{"record":{"id":"474c2ab5001c13aa","repo":"facebook/relay","slug":"failed-to-check-daemon-process-status","errorCode":null,"errorMessage":"Failed to check daemon process status","messagePattern":"Failed to check daemon process status","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler/crates/relay-compiler/src/server_daemon.rs","lineNumber":407,"sourceCode":"        .expect(\"Failed to clone daemon log file handle\");\n\n    let mut child = Command::new(current_exe)\n        .args(&args)\n        .stdin(Stdio::null())\n        .stdout(Stdio::from(log_file))\n        .stderr(Stdio::from(log_file_clone))\n        .spawn()\n        .expect(\"Failed to spawn daemon process\");\n\n    let socket_path = get_socket_path(config_path, projects);\n    let max_attempts = 60;\n    for i in 0..max_attempts {\n        tokio::time::sleep(std::time::Duration::from_secs(1)).await;\n\n        // Detect early daemon-process exit (e.g. invalid project name).\n        if let Some(status) = child\n            .try_wait()\n            .expect(\"Failed to check daemon process status\")\n        {\n            error!(\"Daemon process exited during startup with {status}\");\n            log_daemon_file(&log_path);\n            std::process::exit(1);\n        }\n\n        if send_request(&socket_path, DaemonRequest::Version)\n            .await\n            .is_some()\n        {\n            info!(\"Daemon is ready.\");\n            return;\n        }\n        if i % 10 == 9 {\n            info!(\"Still waiting for daemon to start ({} seconds)...\", i + 1);\n        }\n    }\n","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/facebook/relay/blob/668b1b85e06261aa3b58dabfc51f8b5524a70955/compiler/crates/relay-compiler/src/server_daemon.rs#L389-L425","documentation":"Panic in start_daemon_process's readiness poll: child.try_wait() (or equivalent status check) failed while waiting for the newly spawned daemon to bind its socket within the 60-attempt polling loop. The status check is used to detect early child exit, and its failure aborts startup monitoring.","triggerScenarios":"Thrown at compiler/crates/relay-compiler/src/server_daemon.rs:407 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the daemon log file for the child's stderr output explaining why it exited or misbehaved","Verify system resources (zombie reaping, PID limits) that can make wait-status queries fail","Restart the daemon; if it persists, run 'server start --foreground' manually to surface the failure directly"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"668b1b85e06261aa3b58dabfc51f8b5524a70955","analyzedAt":"2026-09-02T19:57:20.783Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}