{"record":{"id":"576ffdc6acc4fee7","repo":"oracle/graal","slug":"no-singleton-found-for-registration","errorCode":null,"errorMessage":"No singleton found for ${registration}","messagePattern":"No singleton found for (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/replaycomp/JsonReplayCodec.java","lineNumber":269,"sourceCode":"            return registration.clazz();\n        }\n\n        @Override\n        public String tag() {\n            return clazz().getName();\n        }\n\n        @Override\n        public void serialize(Object instance, JsonBuilder.ObjectBuilder objectBuilder, RecursiveSerializer serializer) {\n        }\n\n        @Override\n        public Object deserialize(EconomicMap<String, Object> json, RecursiveDeserializer deserializer, CompilationProxies.ProxyFactory proxyFactory) {\n            if (singletonProxy == null) {\n                singletonProxy = proxyFactory.createProxy(registration);\n            }\n            if (singletonProxy == null) {\n                throw new IllegalStateException(\"No singleton found for \" + registration);\n            }\n            return singletonProxy;\n        }\n    }\n\n    private static final class RegisteredInstanceSerializer implements ObjectSerializer {\n        private final CompilerInterfaceDeclarations.Registration registration;\n\n        private final EconomicMap<Object, Integer> instanceId;\n\n        private final EconomicMap<Integer, Object> proxyById;\n\n        private RegisteredInstanceSerializer(CompilerInterfaceDeclarations.Registration registration) {\n            this.registration = registration;\n            this.instanceId = EconomicMap.create();\n            this.proxyById = EconomicMap.create();\n            if (registration.singleton()) {\n                throw new IllegalArgumentException();","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/replaycomp/JsonReplayCodec.java#L251-L287","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Verify the registration exists before deserialization\nif (!CompilerInterfaceDeclarations.get(registrationName).isPresent()) {\n    throw new IllegalStateException(\"Replay file references unknown singleton: \" + registrationName);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["graalvm","replay","deserialization","singleton"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}