oracle/graal · error · GraalError

Error running command: %s%n%s

Error message

Error running command: %s%n%s

What it means

Error "Error running command: %s%n%s" thrown in oracle/graal.

Source

Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetCompilerConfig.java:154

            command.add("-esa");
            command.add("-ea");
        }

        command.add(CompilerConfig.class.getName());
        String base = GetCompilerConfig.class.getSimpleName() + "_" + ProcessHandle.current().pid();
        Path encodedConfigPath = Path.of(base + ".bin").toAbsolutePath();
        Path debugPath = Path.of(base + ".txt").toAbsolutePath();
        command.add(encodedConfigPath.toString());
        command.add(debugPath.toString());

        String quotedCommand = command.stream().map(e -> e.indexOf(' ') == -1 ? e : '\'' + e + '\'').collect(Collectors.joining(" "));
        ProcessBuilder pb = new ProcessBuilder(command);
        pb.inheritIO();
        Process p;
        try {
            p = pb.start();
        } catch (IOException ex) {
            throw new GraalError("Error running command: %s%n%s", quotedCommand, ex);
        }

        try {
            int exitValue = p.waitFor();
            if (exitValue != 0) {
                throw new GraalError("Command finished with exit value %d (look for stdout and stderr above): %s", exitValue, quotedCommand);
            }
        } catch (InterruptedException e) {
            throw new GraalError("Interrupted waiting for command: %s", quotedCommand);
        }
        try {
            byte[] encodedConfig = Files.readAllBytes(encodedConfigPath);
            if (DEBUG) {
                System.out.printf("[%d] Executed: %s%n", p.pid(), quotedCommand);
                System.out.printf("[%d] Compiler config output saved in '%s'%n", p.pid(), encodedConfigPath);
                System.out.printf("[%d] Compiler config debug output saved in '%s'%n", p.pid(), debugPath);
            } else {
                Files.deleteIfExists(encodedConfigPath);

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Fix the condition reported by the error: Error running command: {} {}
  2. Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call.

Example fix

Validate inputs and environment so that the failing condition does not occur: Error running command: {} {}

When it happens

Trigger: Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetCompilerConfig.java:154 when the library encounters an invalid state.

Common situations: Occurs when a caller violates the contract guarded by this check: Error running command: {} {}


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/71c834972e8f4c9a. Report an issue: GitHub.