oracle/graal · error · IOException

unknown pool type

Error message

unknown pool type

What it means

BinaryReader.addPoolEntry switches on the pool-entry type tag read from the stream; the default branch means the tag byte matches no known pool type (POOL_CLASS, POOL_METHOD, POOL_ENUM, POOL_NODE_CLASS, POOL_NODE, POOL_STRING, ...). This indicates the reader is out of sync with the byte stream or the file was written by an incompatible producer; parsing fails with a generic IOException('unknown pool type').

Source

Thrown at compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graphio/parsing/BinaryReader.java:773

                    }
                    LocationStackFrame parent = readPoolObject(LocationStackFrame.class);
                    infos.trimToSize();
                    obj = LocationCache.createFrame(method, bci, infos, parent);
                }
                break;
            }
            case POOL_NODE: {
                int id = dataSource.readInt();
                NodeClass clazz = readPoolObject(NodeClass.class);
                obj = new Node(id, clazz);
                break;
            }
            case POOL_STRING: {
                obj = dataSource.readString();
                break;
            }
            default:
                throw new IOException("unknown pool type");
        }
        return constantPool.addPoolEntry(index, obj, -1);
    }

    private Object readPropertyObject(String key) throws IOException {
        int type = dataSource.readByte();
        switch (type) {
            case PROPERTY_INT:
                return dataSource.readInt();
            case PROPERTY_LONG:
                return dataSource.readLong();
            case PROPERTY_FLOAT:
                return dataSource.readFloat();
            case PROPERTY_DOUBLE:
                return dataSource.readDouble();
            case PROPERTY_TRUE:
                return Boolean.TRUE;
            case PROPERTY_FALSE:

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Confirm the file is a genuine BIGV/BGV dump and transfer it in binary mode.
  2. Use a reader built from the same graphio version (or newer) as the writer; check CURRENT_VERSION support.
  3. Regenerate the dump if corruption is suspected.
  4. For custom pool extensions, register matching read support in BinaryReader instead of only the writer side.
Defensive patterns

Strategy: try-catch

Try / catch

try { reader.parse(); } catch (IOException e) { if ("unknown pool type".equals(e.getMessage())) { rejectFileAsIncompatibleOrCorrupt(); } }

Prevention

When it happens

Trigger: Byte-level corruption or truncation anywhere before a pool entry; reading a stream whose constant-pool encoding was extended by a custom GraphProtocol writer without a matching reader; opening a non-graph file that lacks the BIGV header path.

Common situations: Viewing old or hand-edited dumps in IGV/networkx-style consumers, cross-version tooling (new writer, old reader), files corrupted by text-mode transfers (line-ending rewriting).

Related errors


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