oracle/graal · error

Error destroying event set %d: %s

Error message

Error destroying event set %d: %s

What it means

Error "Error destroying event set %d: %s " thrown in oracle/graal.

Source

Thrown at compiler/src/org.graalvm.papibridge/src/papibridge.c:110

/**
 * Cleans up and destroys the specified PAPI event set.
 *
 * @param env The JNI environment.
 * @param cls The Java class that this native method belongs to.
 * @param eventset The handle of the event set to be cleaned up and destroyed.
 *
 * @return JNI_TRUE if the operation is successful, JNI_FALSE otherwise.
 */
JNIEXPORT jboolean JNICALL Java_jdk_graal_compiler_hotspot_replaycomp_HardwarePerformanceCounters_cleanAndDestroyEventSet(JNIEnv *env, jclass cls,
                                                                                                                          jint eventset) {
    int retval = 0;
    if ((retval = PAPI_cleanup_eventset(eventset)) != PAPI_OK) {
        fprintf(stderr, "Error cleaning up event set %d: %s\n", eventset, PAPI_strerror(retval));
        return JNI_FALSE;
    }
    if ((retval = PAPI_destroy_eventset(&eventset)) != PAPI_OK) {
        fprintf(stderr, "Error destroying event set %d: %s\n", eventset, PAPI_strerror(retval));
        return JNI_FALSE;
    }
    return JNI_TRUE;
}

/**
 * Starts the measurements for the specified PAPI event set.
 *
 * @param env The JNI environment.
 * @param cls The Java class that this native method belongs to.
 * @param eventset The handle of the event set to be started.
 *
 * @return JNI_TRUE if the operation is successful, JNI_FALSE otherwise.
 */
JNIEXPORT jboolean JNICALL Java_jdk_graal_compiler_hotspot_replaycomp_HardwarePerformanceCounters_start(JNIEnv *env, jclass cls, jint eventset) {
    int retval = PAPI_start(eventset);
    if (retval != PAPI_OK) {
        fprintf(stderr, "Error starting measurements for event set %d: %s\n", eventset, PAPI_strerror(retval));

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Fix the condition reported by the error: Error destroying event set {}: {}
  2. Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call.

Example fix

Validate inputs and environment so that the failing condition does not occur: Error destroying event set {}: {}

When it happens

Trigger: Thrown at compiler/src/org.graalvm.papibridge/src/papibridge.c:110 when the library encounters an invalid state.

Common situations: Occurs when a caller violates the contract guarded by this check: Error destroying event set {}: {}


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/25beaf01ee873bbb. Report an issue: GitHub.