openjdk/jdk · error
*** java.lang.instrument ASSERTION FAILED ***: \"%s\" with m
Error message
*** java.lang.instrument ASSERTION FAILED ***: \"%s\" with message %s at %s line: %d\n
What it means
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.
Source
Thrown at src/java.instrument/share/native/libinstrument/JPLISAssert.c:60
const char * file,
int line) {
if ( !condition ) {
fprintf(stderr, "*** java.lang.instrument ASSERTION FAILED ***: \"%s\" at %s line: %d\n",
assertionText,
file,
line);
}
}
void
JPLISAssertConditionWithMessage( jboolean condition,
const char * assertionText,
const char * message,
const char * file,
int line) {
if ( !condition ) {
fprintf(stderr, "*** java.lang.instrument ASSERTION FAILED ***: \"%s\" with message %s at %s line: %d\n",
assertionText,
message,
file,
line);
}
}
View on GitHub (pinned to 88dfb74bbe)
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
Defensive patterns
Strategy: fallback
Prevention
- Capture the assertion message and file/line in logs and check bugs.openjdk.org
- Avoid mixing native libraries across JDK builds
When it happens
Trigger: jplis_assert_msg sites such as JVMTI GetNamedModule returning an error, startJavaAgent failures, or environment initialization invariants breaking in debug-checked builds.
Common situations: Debug builds of the JDK; partially upgraded JDK directories; rarely, JVM resource exhaustion making JVMTI calls fail inside the agent.
Related errors
- *** java.lang.instrument ASSERTION FAILED ***: \"%s\" at %s
- java.lang.instrument/-javaagent: allocation failure.\n
- AGENT_ERROR_STARTFAIL
- Unexpected error (%d) returned by AddToSystemClassLoaderSear
- Unexpected error: %d\n
AI-assisted analysis of openjdk/jdk@88dfb74bbe (2026-08-14).
Data as JSON: /api/errors/1827d5b682591449.
Report an issue: GitHub.