{"record":{"id":"fb45138cc30dd4fa","repo":"oracle/graal","slug":"this-vm-does-not-support-continuations-fb4513","errorCode":null,"errorMessage":"This VM does not support continuations.","messagePattern":"This VM does not support continuations\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"espresso/src/org.graalvm.continuations/src/org/graalvm/continuations/ContinuationImpl.java","lineNumber":639,"sourceCode":"            unlock(currentState);\n        }\n    }\n\n    /**\n     * Deserialize a continuation from the provided {@link ObjectInput}.\n     *\n     * <p>\n     * This method is provided to cooperate with non-jdk serialization frameworks.\n     *\n     * <p>\n     * {@code registerFreshObject} will be called once a fresh continuation has been created, but\n     * before it has been fully deserialized. It is intended to be a callback to the serialization\n     * framework, so it can register the in-construction continuation so the framework may handle\n     * object graph cycles.\n     */\n    static Continuation readObjectExternal(ObjectInput in, ClassLoader loader, Consumer<Continuation> registerFreshObject) throws IOException, ClassNotFoundException {\n        if (!isSupported()) {\n            throw new UnsupportedOperationException(\"This VM does not support continuations.\");\n        }\n        ContinuationImpl continuation = new ContinuationImpl();\n        registerFreshObject.accept(continuation);\n        continuation.readObjectExternalImpl(in, loader);\n        return continuation;\n    }\n\n    synchronized void readObjectExternalImpl(ObjectInput in, ClassLoader loader) throws IOException, ClassNotFoundException {\n        State currentState = lock();\n        if (currentState == State.RUNNING) {\n            throw new IllegalContinuationStateException(\"You cannot serialize a continuation whilst it's running, as this would have unclear semantics. Please suspend first.\");\n        }\n        try {\n            // At this point, nothing is initialized\n            int header = in.readByte();\n            int version = (header >> FORMAT_SHIFT) & FORMAT_MASK;\n            if (version != FORMAT_VERSION) {\n                throw new FormatVersionException(version, FORMAT_VERSION);","sourceCodeStart":621,"sourceCodeEnd":657,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/espresso/src/org.graalvm.continuations/src/org/graalvm/continuations/ContinuationImpl.java#L621-L657","documentation":"UnsupportedOperationException from the static Continuation.readObjectExternal deserialization entry point when the VM does not support continuations. Just like create/resume, reading a serialized continuation requires Java on Truffle with java.Continuum enabled; on other JVMs the native support the frames depend on is absent.","triggerScenarios":"Deserializing a continuation payload (via the external serialization hook) on a stock JVM or Truffle JVM without java.Continuum; nodes in a cluster with mixed runtimes pulling continuation messages off a queue.","commonSituations":"Continuation payloads routed through a message broker consumed by heterogeneous workers; dev machines testing deserialization logic on plain JDKs.","solutions":["Run all deserializing nodes on Java on Truffle with java.Continuum=true.","Check Continuation.isSupported() before attempting to deserialize continuation payloads.","Tag messages with a continuation marker so non-Truffle consumers can reject them early.","Provide an alternative (data-only) serialization format for non-Truffle consumers."],"exampleFix":"// before\nContinuation c = Continuation.readObjectExternal(in, loader, reg);\n\n// after\nif (!Continuation.isSupported()) {\n    throw new UnsupportedOperationException(\"Deserializing continuations requires Java on Truffle with java.Continuum=true\");\n}\nContinuation c = Continuation.readObjectExternal(in, loader, reg);","handlingStrategy":"validation","validationCode":"if (!Continuation.isSupported()) {\n    throw new UnsupportedOperationException(\"deserializing continuations requires Java on Truffle with java.Continuum=true\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate deserialization on isSupported() before reading payloads.","Tag continuation messages so non-Truffle consumers reject them early.","Keep all consuming nodes on the same Truffle configuration."],"tags":["continuations","unsupported-operation","serialization","graalvm","truffle","vm-config"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}