{"record":{"id":"1827d5b682591449","repo":"openjdk/jdk","slug":"java-lang-instrument-assertion-failed-1827d5","errorCode":null,"errorMessage":"*** java.lang.instrument ASSERTION FAILED ***: \\\"%s\\\" with message %s at %s line: %d\\n","messagePattern":"\\*\\*\\* java\\.lang\\.instrument ASSERTION FAILED \\*\\*\\*: \\\\\"(.+?)\\\\\" with message (.+?) at (.+?) line: (.+?)\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/java.instrument/share/native/libinstrument/JPLISAssert.c","lineNumber":60,"sourceCode":"                        const char *    file,\n                        int             line) {\n    if ( !condition ) {\n        fprintf(stderr, \"*** java.lang.instrument ASSERTION FAILED ***: \\\"%s\\\" at %s line: %d\\n\",\n                                            assertionText,\n                                            file,\n                                            line);\n    }\n}\n\n\nvoid\nJPLISAssertConditionWithMessage(    jboolean        condition,\n                                    const char *    assertionText,\n                                    const char *    message,\n                                    const char *    file,\n                                    int             line) {\n    if ( !condition ) {\n        fprintf(stderr, \"*** java.lang.instrument ASSERTION FAILED ***: \\\"%s\\\" with message %s at %s line: %d\\n\",\n                                            assertionText,\n                                            message,\n                                            file,\n                                            line);\n    }\n}\n","sourceCodeStart":42,"sourceCodeEnd":67,"githubUrl":"https://github.com/openjdk/jdk/blob/88dfb74bbeefcf2b0aa11835183bcd949998fc8f/src/java.instrument/share/native/libinstrument/JPLISAssert.c#L42-L67","documentation":"Same as the plain assertion failure but carries an explanatory message from the assertion site (e.g. 'error in the JVMTI GetNamedModule'). It means an internal libinstrument invariant was violated and the accompanying text names the failing operation. Indicates a JDK-level bug or inconsistent native environment rather than user error.","triggerScenarios":"jplis_assert_msg sites such as JVMTI GetNamedModule returning an error, startJavaAgent failures, or environment initialization invariants breaking in debug-checked builds.","commonSituations":"Debug builds of the JDK; partially upgraded JDK directories; rarely, JVM resource exhaustion making JVMTI calls fail inside the agent.","solutions":["Use the embedded message to identify the failing JVMTI/agent step, then check the JDK bug tracker for known issues","Verify a clean, single JDK installation (reinstall if libraries were copied around)","Upgrade to the latest patch of the JDK release","If reproducible, file an OpenJDK issue with the full assertion line, message, and JDK version"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Capture the assertion message and file/line in logs and check bugs.openjdk.org","Avoid mixing native libraries across JDK builds"],"tags":["java-instrument","assertion","jdk-bug","diagnostics","c"],"backgroundTag":null,"analyzedSha":"88dfb74bbeefcf2b0aa11835183bcd949998fc8f","analyzedAt":"2026-08-14T11:45:09.665Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}