{"record":{"id":"2ce46ebd51b9568a","repo":"prestodb/presto","slug":"native-execution-process-launch-error-2ce46e","errorCode":"NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR","errorMessage":"Cannot start native process: %s","messagePattern":"Cannot start native process: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"critical","filePath":"presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/NativeExecutionProcessFactory.java","lineNumber":98,"sourceCode":"\n    public NativeExecutionProcess createNativeExecutionProcess(Session session,\n            Duration maxErrorDuration, Optional<TempStorageHandle> nativeTempStorageHandle)\n    {\n        try {\n            return new NativeExecutionProcess(\n                    executablePath,\n                    programArguments,\n                    session,\n                    httpClient,\n                    coreExecutor,\n                    errorRetryScheduledExecutor,\n                    serverInfoCodec,\n                    maxErrorDuration,\n                    workerProperty,\n                    nativeTempStorageHandle);\n        }\n        catch (IOException e) {\n            throw new PrestoException(NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR, format(\"Cannot start native process: %s\", e.getMessage()), e);\n        }\n    }\n\n    @PreDestroy\n    public void stop()\n    {\n        coreExecutor.shutdownNow();\n        errorRetryScheduledExecutor.shutdownNow();\n        if (process != null) {\n            process.close();\n        }\n    }\n\n    protected String getExecutablePath()\n    {\n        return executablePath;\n    }\n","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/NativeExecutionProcessFactory.java#L80-L116","documentation":"NativeExecutionProcessFactory.createNativeExecutionProcess() constructs the native execution worker process. Any IOException raised during process creation/launch is converted to PrestoException NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR with the IOException's message, e.g. cannot execute binary, missing file, or I/O error setting up the process.","triggerScenarios":"createNativeExecutionProcess (called by getNativeExecutionProcess and the factory lifecycle) throws IOException while creating the native process — invalid executable, failed file resolution, or I/O error building the process — caught at NativeExecutionProcessFactory.java:98.","commonSituations":"Native binary missing or not executable on the node, wrong binary path config, OS/arch mismatch (binary built for different platform), missing shared libraries causing exec failure, or unwritable temp/working directories.","solutions":["Read the wrapped IOException message ('Cannot start native process: %s') for the exact root cause","Verify the native binary path exists and is executable for the user running the Spark executor","Check the host matches the binary's OS/architecture and required shared libraries are installed","Ensure configured working directory and native temp storage are writable"],"exampleFix":"// before\nnative-execution.binary-path=/shared/bin/presto_native  # not present on every executor\n// after\nspark.files=/opt/presto/bin/presto_native  # distribute binary to every executor\nnative-execution.binary-path=presto_native","handlingStrategy":"validation","validationCode":"if (!Files.isExecutable(Paths.get(nativeBinaryPath))) {\n    throw new IllegalStateException(\"Native binary not executable on this host: \" + nativeBinaryPath);\n}","typeGuard":null,"tryCatchPattern":"try {\n    process = factory.createNativeExecutionProcess(...);\n} catch (PrestoException e) {\n    // 'Cannot start native process: %s' message carries the IOException cause; log it fully\n}","preventionTips":["Match native binary platform/OS to executor host images","Install required shared libraries in the executor image","Preflight-check binary existence and exec permission on every executor node"],"tags":["native-execution","process-launch","io","configuration"],"backgroundTag":"native-process-launch-failed","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}