oracle/graal · error · IOException
Unknown replay assumption kind
Error message
Unknown replay assumption kind
What it means
Thrown when decoding an ASSUMPTION_TAG payload: the nested assumption-kind int matches none of the known assumption kinds (leaf type, concrete subtype, concrete method, call site target, delayed-deserialization variants, ...). The codec cannot reconstruct the Assumptions.Assumption and throws IOException 'Unknown replay assumption kind'. Like other 'unknown replay kind' errors it points to version skew or corruption.
Solutions
- Regenerate the replay file with the same build that will replay it
- If you added a new Assumptions.Assumption subtype, add both the writer kind constant and the reader case, and bump VERSION
- Validate the file version header before parsing to fail fast
Example fix
// before
case ASSUMPTION_TAG -> switch (in.readPackedUnsignedInt()) {
...
default -> throw new IOException("Unknown replay assumption kind");
};
// after
// add the new kind symmetrically on write and read sides
case ASSUMPTION_MY_KIND -> new Assumptions.MyKind(...); Defensive patterns
Strategy: try-catch
Try / catch
try {
result = codec.readReplay(in);
} catch (IOException e) {
if ("Unknown replay assumption kind".equals(e.getMessage())) {
// reader older than writer: re-record or upgrade the reader build
} else throw e;
} Prevention
- Pin record and replay to identical GraalVM builds
- When adding Assumptions.Assumption subtypes, update the codec symmetrically and bump VERSION
When it happens
Trigger: Replaying a file written by a build with new assumption kinds (the writer emitted a kind constant this reader does not define); corrupted stream misaligning the packed assumption-kind int.
Common situations: Cross-version replay between GraalVM builds whose Assumptions subclasses differ; extending the assumptions model without updating the binary codec.
Related errors
- Unknown enum constant for
- Unknown replay architecture kind
- Unknown replay marker kind
- Unknown replay singleton kind
- Unknown replay tag
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/df47e3fddc597e28.
Report an issue: GitHub.
Appendix: source
Thrown at compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/replaycomp/BinaryReplayCodec.java:935
case ASSUMPTION_TAG -> switch (in.readPackedUnsignedInt()) {
case ASSUMPTION_NO_FINALIZABLE_SUBCLASS ->
new Assumptions.NoFinalizableSubclass((ResolvedJavaType) readValue(in, state));
case ASSUMPTION_CONCRETE_SUBTYPE -> {
ResolvedJavaType subtype = (ResolvedJavaType) readValue(in, state);
ResolvedJavaType context = (ResolvedJavaType) readValue(in, state);
yield new DelayedDeserializationObject.ConcreteSubtypeWithDelayedDeserialization(context, subtype);
}
case ASSUMPTION_LEAF_TYPE ->
new DelayedDeserializationObject.LeafTypeWithDelayedDeserialization((ResolvedJavaType) readValue(in, state));
case ASSUMPTION_CONCRETE_METHOD -> {
ResolvedJavaType context = (ResolvedJavaType) readValue(in, state);
ResolvedJavaMethod method = (ResolvedJavaMethod) readValue(in, state);
ResolvedJavaMethod impl = (ResolvedJavaMethod) readValue(in, state);
yield new Assumptions.ConcreteMethod(method, context, impl);
}
case ASSUMPTION_CALL_SITE_TARGET_VALUE ->
new Assumptions.CallSiteTargetValue((JavaConstant) readValue(in, state), (JavaConstant) readValue(in, state));
default -> throw new IOException("Unknown replay assumption kind");
};
case UNRESOLVED_JAVA_TYPE_TAG ->
UnresolvedJavaType.create(requireNonNullString(readStringReference(in, state), "unresolved type name"));
case UNRESOLVED_JAVA_METHOD_TAG ->
new UnresolvedJavaMethod(requireNonNullString(readStringReference(in, state), "unresolved method name"),
(Signature) readValue(in, state), (JavaType) readValue(in, state));
case UNRESOLVED_JAVA_FIELD_TAG -> {
String name = requireNonNullString(readStringReference(in, state), "unresolved field name");
JavaType type = (JavaType) readValue(in, state);
JavaType holder = (JavaType) readValue(in, state);
yield new UnresolvedJavaField(holder, name, type);
}
case PRIMITIVE_CONSTANT_TAG -> {
long raw = in.readPackedSignedLong();
JavaKind kind = (JavaKind) readValue(in, state);
yield JavaConstant.forPrimitive(kind, raw);
}
case FOREIGN_CALL_DESCRIPTOR_TAG ->View on GitHub (pinned to a66e9ccd1d)