{"record":{"id":"f3136372b3ce8581","repo":"oracle/graal","slug":"could-not-read-directed-inlining-rules-file-path","errorCode":null,"errorMessage":"Could not read directed inlining rules file: {path}","messagePattern":"Could not read directed inlining rules file: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/inlining/DirectedInliningRules.java","lineNumber":229,"sourceCode":"            }\n        }\n    }\n\n    private static void parseCommandFile(String commandFileOptionValue, ArrayList<Rule> inlineRules, ArrayList<Rule> dontInlineRules) {\n        if (commandFileOptionValue == null || commandFileOptionValue.trim().isEmpty()) {\n            return;\n        }\n        Path commandFile;\n        try {\n            commandFile = Path.of(commandFileOptionValue.trim());\n        } catch (InvalidPathException e) {\n            throw new IllegalArgumentException(\"Invalid directed inlining rules file path: \" + commandFileOptionValue, e);\n        }\n        List<String> lines;\n        try {\n            lines = Files.readAllLines(commandFile, StandardCharsets.UTF_8);\n        } catch (IOException e) {\n            throw new IllegalArgumentException(\"Could not read directed inlining rules file: \" + commandFile, e);\n        }\n        for (int i = 0; i < lines.size(); i++) {\n            parseCommandFileLine(commandFile, i + 1, lines.get(i), inlineRules, dontInlineRules);\n        }\n    }\n\n    private static void parseCommandFileLine(Path commandFile, int lineNumber, String line, ArrayList<Rule> inlineRules, ArrayList<Rule> dontInlineRules) {\n        String commandLine = stripComment(line).trim();\n        if (commandLine.isEmpty()) {\n            return;\n        }\n        int commandSeparator = findCommandSeparator(commandLine);\n        if (commandSeparator < 0) {\n            throw invalidCommand(commandFile, lineNumber, commandLine);\n        }\n        String command = commandLine.substring(0, commandSeparator).trim().toLowerCase(Locale.ROOT);\n        String ruleSpec = commandLine.substring(commandSeparator + 1).trim();\n        if (ruleSpec.startsWith(String.valueOf(DIRECTIVE_SEPARATOR))) {","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/inlining/DirectedInliningRules.java#L211-L247","documentation":"After resolving the rules file path, DirectedInliningRules.parseCommandFile reads it with Files.readAllLines (DirectedInliningRules.java:229). Any IOException (missing file, permission denied, directory, unreadable NFS mount) is rethrown as IllegalArgumentException naming the file.","triggerScenarios":"Setting -Dgraal.DirectedInliningCommandFile to a path that does not exist, is a directory, or is not readable by the JVM process.","commonSituations":"Running the VM from a different working directory than assumed; file permissions after a CI checkout; the path being valid for the shell but not for the daemon/service user running the JVM.","solutions":["Verify the file exists and is readable by the JVM user: ls -l <path> and test -r <path>","Use an absolute path so the JVM's working directory does not matter","Check for typos and trailing whitespace/newline in the flag value"],"exampleFix":"# before\njava -Dgraal.DirectedInliningCommandFile=inline-rules.txt App  # run from another dir\n\n# after\njava -Dgraal.DirectedInliningCommandFile=/abs/path/inline-rules.txt App","handlingStrategy":"validation","validationCode":"Path p = Path.of(rulesPath).toAbsolutePath();\nif (!Files.isRegularFile(p) || !Files.isReadable(p)) throw new IllegalArgumentException(\"rules file missing/unreadable: \" + p);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer absolute paths so JVM working directory is irrelevant","Add a startup check that the rules file exists before launching long benchmark runs"],"tags":["graal","inlining","options","filesystem","io"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}