prestodb/presto · critical · PrestoException

NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR

NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR

Error message

Cannot start %s

What it means

AbstractNativeProcess.start() launches the native worker executable (e.g. presto_server) via ProcessBuilder. If the OS-level process spawn fails with an IOException (binary not found, not executable, missing libraries, bad working directory), it logs the OS error message and throws PrestoException with code NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR and message 'Cannot start <command>'.

Source

Thrown at presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/AbstractNativeProcess.java:232

    {
        if (process != null) {
            return;
        }

        ProcessBuilder processBuilder = new ProcessBuilder(getLaunchCommand());
        processBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT);
        customizeProcessBuilder(processBuilder);
        try {
            process = processBuilder.start();
            processOutputPipe = new ProcessOutputPipe(
                    getPid(process),
                    process.getErrorStream(),
                    EXECUTOR_STDERR);
            processOutputPipe.start();
        }
        catch (IOException e) {
            log.error(format("Cannot start %s, error message: %s", processBuilder.command(), e.getMessage()));
            throw new PrestoException(NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR, format("Cannot start %s", processBuilder.command()), e);
        }

        if (subprocessSelectsPort) {
            try {
                awaitPortDiscovery();
            }
            catch (PrestoException e) {
                close();
                throw e;
            }
        }

        try {
            getServerInfoWithRetry().get();
        }
        catch (Throwable t) {
            close();
            throw propagateStartFailure(t);

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Read the log line 'Cannot start <command>, error message: <os message>' — it names the exact OS failure.
  2. Verify the configured native worker binary path exists and is executable (ls -l / chmod +x).
  3. Run the command from the SOURCE log manually on the host to expose missing-library or arch errors (ldd).
  4. Check the working directory and any noexec mount on the binary's filesystem.
  5. Redeploy the correct native binary artifact matching the node's OS/architecture.

Example fix

// before (misconfig)
presto.native-execution-process=/opt/wrong-path/presto_server
// after
presto.native-execution-process=/opt/presto-server/bin/presto_server  # exists, chmod +x, ldd-clean
Defensive patterns

Strategy: validation

Validate before calling

// verify the native binary before starting the process
Path binary = Paths.get(nativeExecutablePath);
if (!Files.isRegularFile(binary) || !Files.isExecutable(binary)) {
    throw new PrestoException(NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR,
        "Native binary missing or not executable: " + binary);
}

Try / catch

try {
    nativeProcess.start();
} catch (PrestoException e) {
    if (e.getErrorCode().equals(NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR)) {
        // check OS error in logs (path, permissions, libs) and redeploy correct binary
    }
    throw e;
}

Prevention

When it happens

Trigger: processBuilder.start() throws IOException — the configured native executable path does not exist, lacks the execute bit, has incompatible dynamic libraries, or the working directory is unwritable/missing.

Common situations: presto.native-execution-process-installer / binary path misconfigured; deploying to a node without the native binary artifact; wrong architecture build (e.g. aarch64 binary on x86); missing shared libraries (glibc/openssl mismatch); noexec-mounted filesystem holding the binary.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/5a14a82c26f4a65f. Report an issue: GitHub.