facebook/flow · error

failed to read executable at {} for flow build id: {}

Error message

failed to read executable at {} for flow build id: {}

What it means

The flow build id is an xxhash of the running executable's own bytes, computed once per process via BUILD_ID. current_exe() succeeded but std::fs::read of the executable failed, so the binary's bytes are no longer readable: the file was deleted or replaced after start (inode gone), read permission was lost, or the underlying storage returned an I/O error.

Source

Thrown at rust_port/crates/flow_common_build_id/src/lib.rs:20

 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

use std::sync::OnceLock;

use flow_common_xx as xx;

static BUILD_ID: OnceLock<String> = OnceLock::new();

pub fn get_build_id() -> String {
    BUILD_ID
        .get_or_init(|| {
            let mut state = xx::State::new(0);
            let executable = std::env::current_exe().expect("failed to get executable path");
            let contents = std::fs::read(&executable).unwrap_or_else(|err| {
                panic!(
                    "failed to read executable at {} for flow build id: {}",
                    executable.display(),
                    err
                )
            });
            state.update(&contents);
            let hash = format!("{:016x}", state.digest());
            hash
        })
        .clone()
}

View on GitHub (pinned to f88ac94bcf)

Solutions

  1. Restart flow processes (flow stop, rerun command) so build id is computed from the current binary
  2. Reinstall the flow package if the executable was deleted
  3. Stop deleting/replacing the binary underneath running flow processes; upgrade then restart
  4. Check AV/EDR exclusions if the binary keeps becoming unreadable
Defensive patterns

Strategy: retry

Validate before calling

# sanity: the running binary is still readable
cat "$(readlink -f /proc/self/exe)" > /dev/null || echo "self binary unreadable"

Prevention

When it happens

Trigger: Package manager reinstalls/upgrades flow while a daemon or long-running command started from the old binary is alive; the executable is removed by cleanup scripts or antivirus quarantine; disk/media I/O errors when reading the binary.

Common situations: Continuous-deploy or CI flows that 'rm -rf node_modules && npm install' with a running flow server; antivirus/EDR quarantining the binary on Windows; NFS homes with transient read failures.

Related errors


AI-assisted analysis of facebook/flow@f88ac94bcf (2026-08-20). Data as JSON: /api/errors/08e0ec321d434554. Report an issue: GitHub.