{"record":{"id":"67c9d61feba3732f","repo":"apache/flink","slug":"unrecognized-kryo-registration-serializer-definiti-67c9d6","errorCode":null,"errorMessage":"Unrecognized Kryo registration serializer definition type: {}","messagePattern":"Unrecognized Kryo registration serializer definition type: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializerSnapshotData.java","lineNumber":300,"sourceCode":"\n            switch (serializerDefinitionType) {\n                case UNSPECIFIED:\n                    {\n                        return new KryoRegistration(registeredClass);\n                    }\n                case CLASS:\n                    {\n                        return tryReadWithSerializerClass(\n                                in, userCodeClassLoader, registeredClassname, registeredClass);\n                    }\n                case INSTANCE:\n                    {\n                        return tryReadWithSerializerInstance(\n                                in, userCodeClassLoader, registeredClassname, registeredClass);\n                    }\n                default:\n                    {\n                        throw new IllegalStateException(\n                                \"Unrecognized Kryo registration serializer definition type: \"\n                                        + serializerDefinitionType);\n                    }\n            }\n        }\n\n        @SuppressWarnings(\"unchecked\")\n        private static KryoRegistration tryReadWithSerializerClass(\n                DataInputView in,\n                ClassLoader userCodeClassLoader,\n                String registeredClassname,\n                Class<?> registeredClass)\n                throws IOException {\n            String serializerClassname = in.readUTF();\n            Class serializerClass;\n            try {\n                serializerClass = Class.forName(serializerClassname, true, userCodeClassLoader);\n                return new KryoRegistration(registeredClass, serializerClass);","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializerSnapshotData.java#L282-L318","documentation":"The read-side counterpart of the Kryo registration serializer-definition switch in KryoSerializerSnapshotData.tryReadKryoRegistration: after reading the tag byte it dispatches on CLASS or INSTANCE; any other value means the snapshot data is invalid (corrupt checkpoint or a format this Flink version cannot parse) and an IllegalStateException is thrown naming the unrecognized type.","triggerScenarios":"Restoring a checkpoint/savepoint whose Kryo registration section is corrupted; restoring a snapshot produced by an incompatible Flink version with a changed registration format; truncated checkpoint files (interrupted upload, HDFS corruption) so the tag byte reads garbage.","commonSituations":"Savepoint restore after partial/corrupted upload to object storage; mixing Flink versions between the job that wrote and the job that restores; bit rot or wrong file being passed with -s to 'flink run -s'.","solutions":["Verify the checkpoint/savepoint file integrity (size, checksum, completeness) and re-upload or pick an intact one.","Restore with the same Flink version that wrote the checkpoint before attempting any upgrade.","Follow the documented savepoint compatibility path (same version restore -> upgrade -> new version) rather than jumping versions.","If the state is expendable, restart without restore; otherwise use the state processor API to inspect what is readable."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before restoring, verify the savepoint metadata is complete/readable.\ntry (DataInputStream in = new DataInputStream(new FileInputStream(metaFile))) {\n    in.readByte(); // any early read failure => truncated file\n} catch (IOException e) {\n    throw new IllegalStateException(\"Checkpoint metadata unreadable: \" + metaFile, e);\n}","typeGuard":null,"tryCatchPattern":"try {\n    env.restoreStateFromSavepoint(savepointPath);\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"Unrecognized Kryo registration\")) {\n        // corrupt or incompatible checkpoint: pick intact savepoint / same Flink version\n    }\n    throw e;\n}","preventionTips":["Restore with the same Flink version that wrote the checkpoint; upgrade in one step at a time.","Keep 2+ checkpoints retained so a corrupt one is never the only recovery point.","Verify savepoint upload completeness (size/hash) in object storage before relying on it."],"tags":["kryo","checkpoint-restore","corruption","flink-core"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}