facebook/relay · error
Failed to get current exe path
Error message
Failed to get current exe path
What it means
Startup panic in start_daemon_process: the compiler server could not determine the path of its own executable via std::env::current_exe(). The daemon is relaunched by re-invoking the current binary, so without the exe path the watchdog cannot spawn the background server process and aborts immediately.
Source
Thrown at compiler/crates/relay-compiler/src/server_daemon.rs:370
/// to come up. The child is invoked as
/// `<current_exe> server <extra_args> --project <p>... start --foreground <start_extra_args>`,
/// with stdout/stderr redirected to the daemon log file derived from
/// `config_path` and `projects`.
///
/// Polls the daemon socket once per second for up to 60 seconds. Exits the
/// caller process with code 1 if the child exits during startup or fails
/// to bind the socket within the timeout. `extra_args` is inserted before
/// the project flags so callers can pass `Server`-subcommand-level options
/// (e.g. the OSS relay-bin passes `--config <path>`). `start_extra_args`
/// is appended after `--foreground` so callers can pass `Start`-subcommand-
/// level options (e.g. `--initial-import-state <path>`).
pub async fn start_daemon_process(
config_path: &Path,
projects: &[String],
extra_args: &[String],
start_extra_args: &[String],
) {
let current_exe = std::env::current_exe().expect("Failed to get current exe path");
let mut args = vec!["server".to_string()];
args.extend(extra_args.iter().cloned());
for project in projects {
args.push("--project".to_string());
args.push(project.clone());
}
args.push("start".to_string());
args.push("--foreground".to_string());
args.extend(start_extra_args.iter().cloned());
let log_path = get_log_file_path(config_path, projects);
let log_file = File::options()
.create(true)
.append(true)
.open(&log_path)
.expect("Failed to open daemon log file");
let log_file_clone = log_file
.try_clone()View on GitHub (pinned to 668b1b85e0)
Solutions
- On Linux, check that /proc is mounted and the exe entry is readable
- Ensure the binary wasn't deleted or replaced while running (re-exec requires the original path to exist)
- Run the compiler from a stable installed location rather than a temporary build artifact that gets cleaned up
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at compiler/crates/relay-compiler/src/server_daemon.rs:370 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of facebook/relay@668b1b85e0 (2026-09-02).
Data as JSON: /api/errors/036bd79e9a1d56eb.
Report an issue: GitHub.