oracle/graal · error · IllegalStateException
No singleton found for ${registration}
Error message
No singleton found for ${registration} What it means
The singleton deserializer resolves a CompilerInterfaceDeclarations.Registration to a live singleton by asking the CompilationProxies.ProxyFactory for a proxy. If the factory returns null, no singleton instance was ever registered for that name under the current compiler interface declarations, so replay cannot bind the recorded object back to a real component.
Source
Thrown at compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/replaycomp/JsonReplayCodec.java:269
return registration.clazz();
}
@Override
public String tag() {
return clazz().getName();
}
@Override
public void serialize(Object instance, JsonBuilder.ObjectBuilder objectBuilder, RecursiveSerializer serializer) {
}
@Override
public Object deserialize(EconomicMap<String, Object> json, RecursiveDeserializer deserializer, CompilationProxies.ProxyFactory proxyFactory) {
if (singletonProxy == null) {
singletonProxy = proxyFactory.createProxy(registration);
}
if (singletonProxy == null) {
throw new IllegalStateException("No singleton found for " + registration);
}
return singletonProxy;
}
}
private static final class RegisteredInstanceSerializer implements ObjectSerializer {
private final CompilerInterfaceDeclarations.Registration registration;
private final EconomicMap<Object, Integer> instanceId;
private final EconomicMap<Integer, Object> proxyById;
private RegisteredInstanceSerializer(CompilerInterfaceDeclarations.Registration registration) {
this.registration = registration;
this.instanceId = EconomicMap.create();
this.proxyById = EconomicMap.create();
if (registration.singleton()) {
throw new IllegalArgumentException();View on GitHub (pinned to a66e9ccd1d)
Solutions
- Record and replay with the exact same GraalVM/JVMCI build so registrations match
- Inspect the registration name in the JSON file and grep CompilerInterfaceDeclarations for it to see whether it exists in your build
- If the component was renamed, patch the JSON's singleton tag or add a compatibility alias registration
- Ensure the same compiler configuration flags (e.g. GC selection, hosted vs JIT mode) are used on both sides
Defensive patterns
Strategy: validation
Validate before calling
// Verify the registration exists before deserialization
if (!CompilerInterfaceDeclarations.get(registrationName).isPresent()) {
throw new IllegalStateException("Replay file references unknown singleton: " + registrationName);
} Prevention
- Pin record and replay to the same GraalVM version and compiler configuration
- When renaming a registered singleton, keep a compatibility alias for old replay files
- Add a startup check listing all singletons referenced by a replay file against local registrations
When it happens
Trigger: Deserializing a JSON replay file whose 'singleton' tag names a registration that does not exist in the replaying JVM's CompilerInterfaceDeclarations — e.g. a backend/phase singleton that was renamed, removed, or is only registered in a different configuration (different GC, JVMCI version, or community/enterprise build).
Common situations: Replaying a file recorded on a different GraalVM version where the singleton name differs; replaying with a different compiler configuration that skips registering the component; typos or renamed registrations after refactors.
Related errors
- Unknown replay singleton kind
- Unknown class ${className} for constant${value}
- Invalid marker type.
- Invalid constant.
- Unexpected value: ${name}
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/576ffdc6acc4fee7.
Report an issue: GitHub.