{"record":{"id":"fb160b543bd3b564","repo":"oracle/graal","slug":"plugin-failed-s","errorCode":null,"errorMessage":"Plugin failed:%s","messagePattern":"Plugin failed:(.+?)","errorType":"exception","errorClass":"GraalError","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/PEGraphDecoder.java","lineNumber":1820,"sourceCode":"                ResolvedJavaType elementType = newArrayNode.type();\n                ValueNode[] dimensions = newArrayNode.dimensions().toArray(ValueNode.EMPTY_ARRAY);\n                for (NodePlugin nodePlugin : nodePlugins) {\n                    if (nodePlugin.handleNewMultiArray(graphBuilderContext, elementType, dimensions)) {\n                        replacedNode = graphBuilderContext.pushedNode;\n                        break;\n                    }\n                }\n            }\n        }\n        if (node instanceof PluginReplacementInterface) {\n            PluginReplacementInterface pluginReplacementNode = (PluginReplacementInterface) node;\n            PEPluginGraphBuilderContext graphBuilderContext = new PEPluginGraphBuilderContext(methodScope,\n                            pluginReplacementNode.asFixedNode());\n            boolean success = pluginReplacementNode.replace(graphBuilderContext, providers.getReplacements());\n            if (success) {\n                replacedNode = graphBuilderContext.pushedNode;\n            } else if (pluginReplacementMustSucceed()) {\n                throw new GraalError(\"Plugin failed:\" + node);\n            }\n        }\n\n        return super.canonicalizeFixedNode(methodScope, loopScope, replacedNode);\n    }\n\n    protected boolean pluginReplacementMustSucceed() {\n        return false;\n    }\n\n    @Override\n    protected Node handleFloatingNodeBeforeAdd(MethodScope s, LoopScope loopScope, Node n) {\n        PEMethodScope methodScope = (PEMethodScope) s;\n\n        Node node = n;\n        if (node instanceof ParameterNode) {\n            ParameterNode param = (ParameterNode) node;\n            if (methodScope.isInlinedMethod()) {","sourceCodeStart":1802,"sourceCodeEnd":1838,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/PEGraphDecoder.java#L1802-L1838","documentation":"During partial-evaluation graph decoding, PEGraphDecoder gives nodes implementing PluginReplacementInterface a chance to replace themselves via their replace() callback (PEGraphDecoder.java:1820). In decoder configurations where pluginReplacementMustSucceed() is true, a false return value is an internal invariant violation and throws GraalError naming the node.","triggerScenarios":"A PluginReplacementInterface node (e.g., a snippet/intrinsic template node) whose replace() returns false while being decoded in a context that requires replacement to succeed. Typically triggered by a custom node plugin or a compiler change, not by end-user Java code.","commonSituations":"Developing custom Graal nodes/intrinsics whose replace() bails out under specific graph shapes; version skew between a node's plugin and the decoder; bugs in snippet template caches.","solutions":["If you own the node: make replace() succeed for all inputs reached during decoding, or return true only when it fully handles replacement","Attach -Dgraal.Dump and -Dgraal.TraceInlining/-Dgraal.Log level context to identify which node and plugin are involved","If you do not own the node, report a GraalVM issue with the failing compilation's dump and the exact node toString from the message"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    snippetTemplate.snippet(...);\n} catch (GraalError e) {\n    if (e.getMessage().contains(\"Plugin failed\")) { /* capture dump, report upstream with node toString */ }\n    throw e;\n}","preventionTips":["When authoring PluginReplacementInterface nodes, test replace() across all graph shapes decoding can produce","Keep node plugins and decoder versions in lockstep; rebuild the whole compiler after plugin changes"],"tags":["graal","partial-evaluation","plugins","intrinsics","internal-invariant"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}