oracle/graal · error · IllegalArgumentException

Could not determine CPU from vm_info in %s:%n%s

Error message

Could not determine CPU from vm_info in %s:%n%s

What it means

While heuristically probing an hs_err or .jtr input for the CPU type, MachCode found a line starting with "vm_info:" but could not match either the amd64 or aarch64 patterns in it, so it cannot decide which Disassembler to build. The message includes the input name and the whole input, making the offending vm_info line visible. It means the log's VM metadata does not identify a supported CPU.

Source

Thrown at compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/disassembler/MachCode.java:148

        String bestGuess = null;
        String bestGuessLine = null;
        for (String line : input.split("\n")) {
            Matcher matcher = osArch.matcher(line);
            if (matcher.find()) {
                return fromArch(matcher.group(1), line);
            }
            String guess = null;
            if (amd64.matcher(line).find()) {
                guess = "amd64";
            }
            if (aarch64.matcher(line).find()) {
                guess = "aarch64";
            }
            if (line.startsWith("vm_info:")) {
                if (guess != null) {
                    return fromArch(guess, String.format("Selected from input line \"%s\" in %s", line, inputName));
                }
                throw new IllegalArgumentException(String.format("Could not determine CPU from vm_info in %s:%n%s", inputName, input));
            }
            if (line.contains(" built on ")) {
                // Xinternalversion line from the normal HotSpot log
                if (guess != null) {
                    return fromArch(guess, String.format("Selected from input line \"%s\" in %s", line, inputName));
                }
            }
            if (bestGuess == null) {
                if (guess != null) {
                    bestGuess = guess;
                    bestGuessLine = line;
                }
            } else {
                if (!bestGuess.equals(guess)) {
                    bestGuess = "unknown";
                }
            }
        }

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Pass the architecture explicitly (userArch, e.g. "amd64") so probing is skipped.
  2. Set the machcode.arch / os.arch fallback property to the correct ISA.
  3. If the log is from an unsupported ISA, disassemble it with a native tool (objdump) instead of this library.
  4. For truncated logs, restore or fix the vm_info line so the pattern match succeeds.

Example fix

# before
java DisassemblerTool crash_riscv.hs_err
# after (only if content is really amd64-decodable, or on an amd64 host)
java -Dmachcode.arch=amd64 DisassemblerTool crash.hs_err
Defensive patterns

Strategy: validation

Validate before calling

// supply the arch explicitly so heuristic probing never runs
Disassembler d = MachCode.initDisassembler(inputName, input, log, System.getProperty("machcode.arch", "amd64"));

Try / catch

try { MachCode.initDisassembler(f, input, log, null); } catch (IllegalArgumentException e) { if (e.getMessage().contains("vm_info")) { /* ask user for --arch or reject file */ } else throw e; }

Prevention

When it happens

Trigger: MachCode.initDisassembler with userArch == null and no machcode.arch property, run on an input whose "vm_info:" line mentions a different ISA (e.g. riscv64, ppc) or omits CPU identification entirely. The vm_info branch requires a non-null guess and throws otherwise.

Common situations: Disassembling crash logs from non-x86/arm systems (RISC-V, POWER), truncated/edited hs_err files where vm_info was mangled, or logs from exotic JVM builds with nonstandard vm_info wording.

Related errors


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