{"record":{"id":"c1853797ca44c813","repo":"oracle/graal","slug":"failed-to-open-s-to-dump-igv-graphs","errorCode":null,"errorMessage":"Failed to open %s to dump IGV graphs","messagePattern":"Failed to open (.+?) to dump IGV graphs","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/debug/IgvDumpChannel.java","lineNumber":174,"sourceCode":"            // Ignore races - an extra announcement is ok\n            lastTargetAnnouncement = targetAnnouncement;\n            TTY.println(targetAnnouncement);\n        }\n    }\n\n    private static WritableByteChannel createFileChannel(Supplier<String> pathProvider, String networkFailure) throws IOException {\n        String path = pathProvider.get();\n        try {\n            WritableByteChannel channel = PathUtilities.openFileChannel(path, StandardOpenOption.WRITE, StandardOpenOption.CREATE);\n            String dir = isDirectory(path, false) ? path : getParent(path);\n            if (networkFailure == null) {\n                maybeAnnounceTarget(\"Dumping IGV graphs in \" + dir);\n            } else {\n                maybeAnnounceTarget(networkFailure + \". Dumping IGV graphs in \" + dir);\n            }\n            return channel;\n        } catch (IOException e) {\n            throw new IOException(String.format(\"Failed to open %s to dump IGV graphs\", path), e);\n        }\n    }\n\n}\n","sourceCodeStart":156,"sourceCodeEnd":179,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/debug/IgvDumpChannel.java#L156-L179","documentation":"After an IGV network failure (error 34), or when file-based dumping is selected directly, IgvDumpChannel.createFileChannel opens a writable channel at a path supplied by a pathProvider (based on -Dgraal.DumpPath and the file name counter). If PathUtilities.openFileChannel fails — bad path, permission denied, directory missing — the IOException('Failed to open %s to dump IGV graphs') is thrown, chaining the cause.","triggerScenarios":"Configuring -Dgraal.DumpPath to a non-existent or read-only directory, a path with illegal characters for the filesystem, the max-file-count/name-collision logic producing an invalid name, or the filesystem being full. Triggered exactly when a dump is attempted (first graph dump of the run).","commonSituations":"CI sandboxes with read-only output mounts, dump paths relative to a working directory that was never created, long-running daemons whose DumpPath directory was deleted underneath them, or disk exhaustion during heavy dumping.","solutions":["Ensure the -Dgraal.DumpPath directory exists and is writable by the JVM process (mkdir -p + chmod).","Use an absolute dump path to avoid working-directory surprises.","Free disk space if the volume is full; dumping large graphs can consume significant space.","If dumping to IGV over the network was intended, fix the connection (see error 34) so the file fallback is not used."],"exampleFix":"# before\n-Dgraal.DumpPath=/read-only-mount/dumps\n\n# after\nmkdir -p /tmp/graal-dumps\n-Dgraal.DumpPath=/tmp/graal-dumps","handlingStrategy":"validation","validationCode":"Path dir = Path.of(dumpPath);\nFiles.createDirectories(dir);\nif (!Files.isWritable(dir)) {\n    throw new IOException(\"Dump path not writable: \" + dir.toAbsolutePath());\n}\n// safe to start the JVM with -Dgraal.Dump and this DumpPath","typeGuard":null,"tryCatchPattern":"try {\n    dumpGraphs(graph);\n} catch (IOException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Failed to open\")) {\n        // switch DumpPath to a temp dir and retry once, or drop dumping for this run\n    } else {\n        throw e;\n    }\n}","preventionTips":["Pre-create the dump directory and assert writability at JVM startup when dumping is enabled.","Monitor free space on the dump volume during long dumping sessions."],"tags":["igv","graph-dumping","file-io","permissions","debugging"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}