Closed Karm closed 1 month ago
Thanks for raising this! We actually noticed this as well, fixes are already in the making (https://github.com/oracle/graal/pull/9292 and https://github.com/oracle/graal/pull/9305).
The fixes have been merged. Can you please verify if it fixes the issue with the next dev build?
@vjovanov I can confirm that it works with the HEAD https://github.com/oracle/graal/commit/71e6492, Mandrel dev build mandrel-java24-linux-amd64-24.2.0-dev71e64925a07.tar.gz.
Great, thanks for checking!
Native agent used to work for determining necessary JNI access configuration, e.g. when it comes to loading headless AWT for transforming images.
Here is a small program that does that:
:green_circle: GraalVM CE 22.0.1+8.1
Works, images get generated:
Note that the fake JAVA_HOME is an empty directory structure to satisfy code paths that are trying to look for fonts in what it thinks is a JDK folder...
Let's backup the config the old agent created:
Now off to the latest dev build:
:red_circle: GraalVM CE 24-dev+5.1
That fails. The error here is a weird, unrelated message (I'm gonna patch that reporting in JDK's awt_LoadLibrary.c). The real reason is that no expected C->Java JNI invocations work. EDIT: Patched upstream: https://github.com/openjdk/jdk/pull/20169
The
reachability-metadata.json
's JNI section is wrong. I will try to debug exactly why.If I ditch it and use the old one:
And run the build again:
It works and images get generated:
All in all I'd say something changed in the way the native agent works or how it should be used. I will paste more details and debug further.