oracle/graal · error · GraalError

compilationRequestResult.getFailureMessage()

Error message

compilationRequestResult.getFailureMessage()

What it means

Error "compilationRequestResult.getFailureMessage()" thrown in oracle/graal.

Source

Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/LibGraalEntryPoints.java:202

            HotSpotResolvedJavaMethod method = runtime.unhand(HotSpotResolvedJavaMethod.class, methodHandle);
            HotSpotCompilationRequest request = new HotSpotCompilationRequest(method, entryBCI, 0L);
            try (CompilationContext ignored = HotSpotGraalServices.openLocalCompilationContext(request)) {
                CompilationTask task = new CompilationTask(runtime, compiler, request, useProfilingInfo, false, false, eagerResolving, installAsDefault);
                long allocatedBytesBefore = 0;
                long timeBefore = 0;
                if (timeAndMemBufferAddress != 0) {
                    allocatedBytesBefore = isThreadAllocatedMemorySupported() ? getCurrentThreadAllocatedBytes() : -1;
                    timeBefore = System.nanoTime();
                }
                OptionValues options = decodeOptions(optionsAddress, optionsSize, optionsHash);
                if (profilePathBufferAddress > 0) {
                    String profileLoadPath = CTypeConversion.toJavaString(Word.pointer(profilePathBufferAddress));
                    options = new OptionValues(options, ProfileReplaySupport.Options.LoadProfiles, profileLoadPath);
                }
                HotSpotCompilationRequestResult compilationRequestResult = task.runCompilation(options);
                if (compilationRequestResult.getFailure() != null) {
                    retry = compilationRequestResult.getRetry();
                    throw new GraalError(compilationRequestResult.getFailureMessage());
                }
                if (timeAndMemBufferAddress != 0) {
                    long allocatedBytesAfter = allocatedBytesBefore == -1 ? -1 : getCurrentThreadAllocatedBytes();
                    long bytesAllocated = allocatedBytesAfter - allocatedBytesBefore;
                    long timeAfter = System.nanoTime();
                    long timeSpent = timeAfter - timeBefore;
                    Unsafe.getUnsafe().putLong(timeAndMemBufferAddress, bytesAllocated);
                    Unsafe.getUnsafe().putLong(timeAndMemBufferAddress + 8, timeSpent);
                }
                HotSpotInstalledCode installedCode = task.getInstalledCode();
                if (printMetrics) {
                    GlobalMetrics metricValues = ((HotSpotGraalRuntime) compiler.getGraalRuntime()).getMetricValues();
                    metricValues.print(options);
                    metricValues.clear();
                }
                return runtime.translate(installedCode);
            }
        } catch (Throwable t) {

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Fix the condition reported by the error: compilationRequestResult.getFailureMessage()
  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: compilationRequestResult.getFailureMessage()

When it happens

Trigger: Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/LibGraalEntryPoints.java:202 when the library encounters an invalid state.

Common situations: Occurs when a caller violates the contract guarded by this check: compilationRequestResult.getFailureMessage()


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