graal-bugreport's People
graal-bugreport's Issues
Verbose output
CGDogan@mac bugreport % native-image --native-image-info --verbose org.Test
Apply file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/jni-config.json
Apply file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/reflect-config.json
Apply file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/resource-config.json
Apply file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/proxy-config.json
Apply file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/serialization-config.json
Apply file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/predefined-classes-config.json
Apply jar:file:///Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/thirdparty/native-image.properties
Apply jar:file:///Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/polyglot/native-image.properties
Executing [
HOME=/Users/CGDogan \
LANG=en_GB.UTF-8 \
PATH=/Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/bin:/Library/Java/JavaVirtualMachines/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/bin:/Users/CGDogan/.rd/bin:/opt/homebrew/opt/jpeg/bin:/Users/CGDogan/.opam/default/bin:/opt/local/bin:/opt/local/sbin:/opt/homebrew/opt/llvm/bin/:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin \
PWD=/Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport \
USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM=true \
/Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/bin/java \
-XX:+UseParallelGC \
-XX:+UnlockExperimentalVMOptions \
-XX:+EnableJVMCI \
-Dtruffle.TrustAllTruffleRuntimeProviders=true \
-Dtruffle.TruffleRuntime=com.oracle.truffle.api.impl.DefaultTruffleRuntime \
-Dgraalvm.ForcePolyglotInvalid=true \
-Dgraalvm.locatorDisabled=true \
-Dsubstratevm.IgnoreGraalVersionCheck=true \
--add-exports=java.base/com.sun.crypto.provider=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.access=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.event=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.loader=org.graalvm.nativeimage.builder,org.graalvm.truffle \
--add-exports=java.base/jdk.internal.logger=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.misc=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto \
--add-exports=java.base/jdk.internal.module=org.graalvm.nativeimage.base,org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.org.objectweb.asm=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.perf=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.ref=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=java.base/jdk.internal.reflect=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.util=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.vm.annotation=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.vm=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.invoke.util=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.net.www=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.net=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.nio.ch=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=java.base/sun.reflect.annotation=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.factory=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.repository=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.scope=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.tree=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.jca=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.provider=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.ssl=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.util=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.x509=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.text.spi=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.calendar=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.cldr=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.locale.provider=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.locale=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.resources=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util=org.graalvm.nativeimage.builder \
--add-exports=java.management.rmi/com.sun.jmx.remote.internal.rmi=org.graalvm.nativeimage.builder \
--add-exports=java.management.rmi/com.sun.jmx.remote.protocol.rmi=org.graalvm.nativeimage.builder \
--add-exports=java.management/com.sun.jmx.mbeanserver=org.graalvm.nativeimage.builder \
--add-exports=java.management/sun.management=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=java.rmi/sun.rmi.server=org.graalvm.nativeimage.builder \
--add-exports=java.xml.crypto/org.jcp.xml.dsig.internal.dom=org.graalvm.nativeimage.builder \
--add-exports=jdk.httpserver/sun.net.httpserver.simpleserver=org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.common=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler,org.graalvm.nativeimage.base,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.services=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.events=org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.internal.jfc=org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.internal=org.graalvm.nativeimage.builder \
--add-exports=jdk.management.agent/jdk.internal.agent=org.graalvm.nativeimage.builder \
--add-exports=jdk.management/com.sun.management.internal=org.graalvm.nativeimage.builder \
-XX:+UseJVMCINativeLibrary \
-Xss10m \
-XX:MaxRAMPercentage=41.21723175048828 \
-XX:GCTimeRatio=19 \
-XX:+ExitOnOutOfMemoryError \
-Djava.awt.headless=true \
'-Dorg.graalvm.vendor=GraalVM Community' \
-Dorg.graalvm.vendorurl=https://www.graalvm.org/ \
'-Dorg.graalvm.vendorversion=GraalVM CE 20.0.1-dev+9.1' \
-Dorg.graalvm.version=23.1.0-dev \
-Dcom.oracle.graalvm.isaot=true \
-Djava.system.class.loader=com.oracle.svm.hosted.NativeImageSystemClassLoader \
-Xshare:off \
-Djdk.internal.lambda.disableEagerInitialization=true \
-Djdk.internal.lambda.eagerlyInitialize=false \
-Djava.lang.invoke.InnerClassLambdaMetafactory.initializeLambdas=false \
--add-modules=ALL-DEFAULT \
--module-path \
/Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/truffle/truffle-api.jar:/Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/svm/builder/svm.jar:/Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/svm/builder/native-image-base.jar:/Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/svm/builder/objectfile.jar:/Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/svm/builder/pointsto.jar \
--module \
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner \
-imagecp \
/Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport \
-imagemp \
/Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/svm/library-support.jar \
-H:CLibraryPath=/Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/svm/clibraries/darwin-aarch64 \
-H:Path=/Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport \
-H:+DumpTargetInfo \
-H:JNIConfigurationResources@file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/jni-config.json=META-INF/native-image/jni-config.json \
-H:ReflectionConfigurationResources@file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/reflect-config.json=META-INF/native-image/reflect-config.json \
-H:ResourceConfigurationResources@file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/resource-config.json=META-INF/native-image/resource-config.json \
-H:DynamicProxyConfigurationResources@file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/proxy-config.json=META-INF/native-image/proxy-config.json \
-H:SerializationConfigurationResources@file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/serialization-config.json=META-INF/native-image/serialization-config.json \
-H:PredefinedClassesConfigurationResources@file:///Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/META-INF/native-image/predefined-classes-config.json=META-INF/native-image/predefined-classes-config.json \
'-H:Class@explicit main-class=org.Test' \
'-H:Name@main-class lower case as image name=org.test' \
'-H:Features@jar:file:///Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/thirdparty/native-image.properties=com.oracle.svm.thirdparty.gson.GsonFeature' \
'-H:Features@jar:file:///Users/CGDogan/Downloads/graalvm-community-openjdk-20.0.1+9.1/Contents/Home/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/polyglot/native-image.properties=com.oracle.svm.polyglot.groovy.GroovyIndyInterfaceFeature,com.oracle.svm.polyglot.scala.ScalaFeature' \
-H:+BuildOutputColorful \
-H:+BuildOutputLinks
]
================================================================================
GraalVM Native Image: Generating 'org.test' (executable)...
================================================================================
[1/8] Initializing... (2.9s @ 0.13GB)
Java version: 20.0.1+9, vendor version: GraalVM CE 20.0.1-dev+9.1
Graal compiler: optimization level: 2, target machine: armv8-a
C compiler: cc (apple, arm64, 14.0.3)
Garbage collector: Serial GC (max heap size: 80% of RAM)
# Printing compilation-target information to: /Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/reports/target_info_20230706_110826.txt
# Printing native-library information to: /Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/reports/native_library_info_20230706_110832.txt
[2/8] Performing analysis... [****] (5.7s @ 0.27GB)
3,165 (72.56%) of 4,362 types reachable
3,813 (50.94%) of 7,485 fields reachable
15,185 (45.35%) of 33,481 methods reachable
956 types, 81 fields, and 478 methods registered for reflection
59 types, 56 fields, and 58 methods registered for JNI access
4 native libraries: -framework Foundation, dl, pthread, z
[3/8] Building universe... (1.0s @ 0.32GB)
[4/8] Parsing methods... [*] (0.7s @ 0.48GB)
[5/8] Inlining methods... [***] (0.5s @ 0.49GB)
[6/8] Compiling methods... [***] (7.2s @ 0.41GB)
[7/8] Layouting methods... [*] (0.9s @ 0.55GB)
[8/8] Creating image... [*] (1.4s @ 0.45GB)
4.97MB (39.27%) for code area: 8,650 compilation units
7.28MB (57.56%) for image heap: 94,873 objects and 5 resources
409.86kB ( 3.16%) for other data
12.65MB in total
--------------------------------------------------------------------------------
Top 10 origins of code area: Top 10 object types in image heap:
3.77MB java.base 1.38MB byte[] for code metadata
861.27kB svm.jar (Native Image) 958.34kB java.lang.String
106.37kB java.logging 859.31kB byte[] for general heap data
56.91kB org.graalvm.nativeimage.base 734.43kB java.lang.Class
43.64kB jdk.proxy1 715.27kB byte[] for java.lang.String
32.86kB jdk.proxy3 271.99kB c.o.s.c.h.DynamicHubCompanion
23.80kB org.graalvm.sdk 248.63kB java.util.HashMap$Node
19.52kB jdk.internal.vm.ci 210.80kB java.lang.Object[]
12.82kB java.desktop 182.23kB java.lang.String[]
10.46kB jdk.proxy2 154.26kB byte[] for embedded resources
9.76kB for 3 more packages 1.37MB for 888 more object types
--------------------------------------------------------------------------------
Recommendations:
HEAP: Set max heap for improved and more predictable memory usage.
CPU: Enable more CPU features with '-march=native' for improved performance.
--------------------------------------------------------------------------------
1.2s (5.8% of total time) in 74 GCs | Peak RSS: 1.14GB | CPU load: 5.46
--------------------------------------------------------------------------------
Produced artifacts:
/Users/CGDogan/Downloads/Github-repos/CGDogan/openslide/bugreport/org.test (executable)
================================================================================
Finished generating 'org.test' in 20.7s.
draft for oracle/graal repository
AWT dynamic shared libraries loading seems broken. According to graalvm/mandrel#487, 20.0.2 so midjuly graalvm/mandrel#487
TODO? Wait until 20.0.2 JDK and Graal built on it.
Describe the issue
This is highly related to oracle/graal#6244: "AWT dynamic shared libraries loading seems broken" and graalvm/mandrel#487 " Mandrel cannot dynamically load awt shared libraries from OpenJDK distro"
I run with the native-image of the latest GraalVM CE dev build:
package org;
import javax.imageio.stream.ImageInputStream;
import javax.imageio.stream.MemoryCacheImageInputStream;
import java.io.FileInputStream;
import java.io.BufferedInputStream;
public class Test {
public static void main(String[] args) throws Exception {
System.out.println("Start");
ImageInputStream stream = new MemoryCacheImageInputStream(new BufferedInputStream(new FileInputStream(
"test.png"), 81920));
System.out.println(stream.readBit());
System.out.println("End");
}
}
Despite that I ran the tracer first with java -agentlib:native-image-agent=config-output-dir=META-INF/native-image org.Test
and without --no-fallback
, I get, when I run the executable created by native-image
:
Start
Exception in thread "main" java.lang.UnsatisfiedLinkError: No awt in java.library.path
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibrarySupport.loadLibraryRelative(NativeLibrarySupport.java:136)
at [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:104)
at [email protected]/java.lang.Runtime.loadLibrary0(Runtime.java:880)
at [email protected]/java.lang.System.loadLibrary(System.java:2051)
at [email protected]/sun.java2d.Disposer$1.run(Disposer.java:68)
at [email protected]/sun.java2d.Disposer$1.run(Disposer.java:66)
at [email protected]/java.security.AccessController.executePrivileged(AccessController.java:129)
at [email protected]/java.security.AccessController.doPrivileged(AccessController.java:319)
at [email protected]/sun.java2d.Disposer.<clinit>(Disposer.java:65)
at [email protected]/javax.imageio.stream.MemoryCacheImageInputStream.<init>(MemoryCacheImageInputStream.java:76)
at org.Test.main(Test.java:12)
This is unexpected because I had run the tracer. Here are the files produced by the tracer:
jni-config.json (Summary: nothing related to AWT):
[
{
"name":"java.lang.String",
"methods":[{"name":"lastIndexOf","parameterTypes":["int"] }, {"name":"substring","parameterTypes":["int"] }]
},
{
"name":"java.lang.System",
"methods":[{"name":"getProperty","parameterTypes":["java.lang.String"] }, {"name":"load","parameterTypes":["java.lang.String"] }, {"name":"setProperty","parameterTypes":["java.lang.String","java.lang.String"] }]
},
{
"name":"org.Test",
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }]
},
{
"name":"sun.java2d.Disposer",
"methods":[{"name":"addRecord","parameterTypes":["java.lang.Object","long","long"] }]
}
]
and the other four files predefined-classes-config.json
, proxy-config.json
, reflect-config.json
, resource-config.json
, serialization-config.json
are empty templates.
Steps to reproduce the issue
Please include both build steps as well as run steps
git clone --depth 1 https://github.com/CGDogan/graal-bugreport
- You may run
run.sh
to automatically compile with javac, run with java and see that it works, run native-image, run the executable.
Or you may do it manually:
javac org/Test.java
java org.Test
java -agentlib:native-image-agent=config-output-dir=META-INF/native-image org.Test
native-image org.Test
./org.test
Describe GraalVM and your environment:
- GraalVM version: 16 June 2023 CE Development build (https://github.com/graalvm/graalvm-ce-dev-builds/releases/tag/23.1.0-dev-20230616_1155)
- JDK major version:
openjdk 20.0.1 2023-04-18
- OS: macOS 13
- Architecture: ARM64
More details
Consider adding the --native-image-info
and --verbose
flags when building your native image and paste output below.
OK, I did build it with these verbose flags but there didn't seem to be anything helpful so I pasted it here #1
Add any other information about the problem here. Especially important are stack traces or log output. Feel free to link to gists or to screenshots if necessary.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.