prestodb/presto · error · PrestoException

NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR

NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR

Error message

Cannot start native process: %s

What it means

DetachedNativeExecutionProcessFactory.createNativeExecutionProcess constructs a DetachedNativeExecutionProcess, which spawns the native worker executable via ProcessBuilder-like APIs. If the OS-level launch throws IOException (executable missing, not executable, argument/redirect problems), it is converted to PrestoException with code NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR.

Source

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

    @Override
    public NativeExecutionProcess createNativeExecutionProcess(Session session,
            Duration maxErrorDuration, Optional<TempStorageHandle> nativeTempStorageHandle)
    {
        try {
            return new DetachedNativeExecutionProcess(
                    getExecutablePath(),
                    getProgramArguments(),
                    session,
                    httpClient,
                    coreExecutor,
                    errorRetryScheduledExecutor,
                    serverInfoCodec,
                    maxErrorDuration,
                    workerProperty);
        }
        catch (IOException e) {
            throw new PrestoException(NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR, format("Cannot start native process: %s", e.getMessage()), e);
        }
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Verify the native executable path configured for native execution exists on every executor node.
  2. Check permissions: chmod +x on the binary, and confirm it matches the node architecture/OS.
  3. Run ldd on the binary on an executor node to confirm all shared libraries resolve.
  4. Check node logs for the wrapped IOException cause; fix the underlying exec failure it reports.

Example fix

// before: launch fails because binary missing on executor
new ProcessBuilder("/opt/presto-native/not-installed/velox_exec")...
// after: validate before launching
Path bin = Paths.get(executablePath);
if (!Files.isExecutable(bin)) {
    throw new PrestoException(NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR,
            "Native executable missing or not executable: " + executablePath);
}
Defensive patterns

Strategy: validation

Validate before calling

import java.nio.file.*;

public static void validateNativeExecutable(String path) {
    Path bin = Paths.get(path);
    if (!Files.isRegularFile(bin)) {
        throw new IllegalStateException("Native executable not found: " + path);
    }
    if (!Files.isExecutable(bin)) {
        throw new IllegalStateException("Native executable is not executable: " + path);
    }
}

Try / catch

try {
    NativeExecutionProcess p = factory.getNativeExecutionProcess(session, tempStorageHandle);
} catch (PrestoException e) {
    if (e.getErrorCode().getName().equals("NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR")) {
        // check cause IOException: missing binary, permission, or arch mismatch
        log.error("Native launch failed: %s", e.getCause());
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling getNativeExecutionProcess/createNativeExecutionProcess when new DetachedNativeExecutionProcess(...) throws IOException during process spawn — executable not found, no execute permission, or I/O error creating the native process.

Common situations: Wrong native-execution executable path configuration; native binary not deployed to Spark executor nodes; binary lacks +x permission or wrong architecture (arm64 vs x86_64); missing shared libraries causing exec to fail; read-only container filesystem.

Related errors


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