{"record":{"id":"9ad054d0d69a5863","repo":"oracle/graal","slug":"this-vm-does-not-support-continuations-9ad054","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/SuspendCapability.java","lineNumber":97,"sourceCode":"    static SuspendCapability create(ContinuationImpl continuation) {\n        return new SuspendCapability(continuation);\n    }\n\n    private SuspendCapability(ContinuationImpl continuation) {\n        this.continuation = continuation;\n    }\n\n    private SuspendCapability() {\n    }\n\n    @Override\n    void writeObjectExternal(ObjectOutput out) throws IOException {\n        out.writeObject(continuation);\n    }\n\n    static SuspendCapability readObjectExternal(ObjectInput in, Consumer<SuspendCapability> registerFreshObject) throws IOException, ClassNotFoundException {\n        if (!Continuation.isSupported()) {\n            throw new UnsupportedOperationException(\"This VM does not support continuations.\");\n        }\n        SuspendCapability suspend = new SuspendCapability();\n        registerFreshObject.accept(suspend);\n        Object obj = in.readObject();\n        if (obj instanceof ContinuationImpl) {\n            suspend.continuation = (ContinuationImpl) obj;\n            return suspend;\n        }\n        throw new FormatVersionException(\"Erroneous deserialization of SuspendCapability.\\n\" +\n                        \"read object was not a continuation:\" + obj);\n    }\n\n    // endregion internals\n}\n","sourceCodeStart":79,"sourceCodeEnd":112,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/espresso/src/org.graalvm.continuations/src/org/graalvm/continuations/SuspendCapability.java#L79-L112","documentation":"UnsupportedOperationException from SuspendCapability.readObjectExternal: Continuation.isSupported() is false on the current VM. SuspendCapability is the handle through which guest code suspends, and its deserialization requires the VM-level continuation machinery; the library therefore rejects the read immediately rather than constructing a capability that would explode later at first use. It is the SuspendCapability counterpart of the guard in ContinuationImpl/IdentityHashCodes.","triggerScenarios":"Deserializing a stream that contains a SuspendCapability (e.g. a suspended continuation's object graph) on a VM without continuation support; calling Continuation.deserialize on plain OpenJDK.","commonSituations":"Continuation payloads read by tooling or tests running under a vanilla JRE; deploying a continuation-based service onto a runtime image built without GraalVM continuation support.","solutions":["Run the deserializing process on a GraalVM build with continuations enabled.","Gate deserialization on Continuation.isSupported() and degrade gracefully (reject the request or rebuild state) when false.","Verify startup flags and distribution (require GraalVM, not stock JDK) in deployment scripts and container images.","Keep workloads that exchange continuation payloads pinned to continuation-capable runtimes end to end."],"exampleFix":"// before\nObject o = deserializeFromNetwork(bytes); // graph contains SuspendCapability\n\n// after\nif (!Continuation.isSupported()) {\n    throw new IllegalStateException(\"This runtime cannot resume continuations; use a GraalVM build with continuations enabled\");\n}\nObject o = deserializeFromNetwork(bytes);","handlingStrategy":"validation","validationCode":"if (!Continuation.isSupported()) {\n    throw new IllegalStateException(\"Cannot deserialize continuations on this VM; use GraalVM with continuations enabled\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check Continuation.isSupported() at startup of any process that may touch continuation payloads.","Keep deserialization of SuspendCapability-bearing graphs on continuation-capable runtimes only.","Bake the runtime requirement into container images/deployment scripts so vanilla JDKs cannot pick up the workload."],"tags":["continuations","graalvm","unsupported-vm","deserialization"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}