praj-foss / swing-graalvm-demo

Swing demo app compiled with GraalVM native-image
https://www.praj.in/posts/2021/compiling-swing-apps-ahead-of-time/
The Unlicense
20 stars 4 forks source link

Fatal error reported via JNI: Could not allocate library name #4

Open ctoabidmaqbool opened 2 months ago

ctoabidmaqbool commented 2 months ago

In linux running demo after building, the errors are generated:

maqboolstudiopc@MSC-30:/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo$ ./demo
Fatal error reported via JNI: Could not allocate library name

Printing instructions (ip=0x00007f1ce8e773b8):
  0x00007f1ce8e772b8: 0x24 0x10 0xeb 0x88 0x48 0x89 0x6c 0x24 0x40 0x48 0x89 0x54 0x24 0x38 0x48 0x89
  0x00007f1ce8e772c8: 0x4c 0x24 0x30 0x4c 0x89 0x6c 0x24 0x28 0x4c 0x89 0x64 0x24 0x20 0x48 0x89 0x5c
  0x00007f1ce8e772d8: 0x24 0x18 0x48 0xc7 0xc0 0x00 0x00 0x00 0x00 0x4c 0x8b 0x74 0x24 0x30 0x4c 0x8b
  0x00007f1ce8e772e8: 0x7c 0x24 0x38 0x48 0x83 0xc4 0x48 0xc3 0x48 0x8b 0x6c 0x24 0x40 0x48 0x8b 0x54
  0x00007f1ce8e772f8: 0x24 0x38 0x48 0x8b 0x4c 0x24 0x30 0x4c 0x8b 0x6c 0x24 0x28 0x4c 0x8b 0x64 0x24
  0x00007f1ce8e77308: 0x20 0x48 0x8b 0x5c 0x24 0x18 0x49 0x2b 0xc6 0x49 0x89 0x47 0x78 0x41 0xc7 0x47
  0x00007f1ce8e77318: 0x14 0x03 0x00 0x00 0x00 0xf0 0x83 0x04 0x24 0x00 0x48 0xc7 0xc0 0x00 0x00 0x00
  0x00007f1ce8e77328: 0x00 0x4c 0x8b 0xf1 0x4c 0x8b 0xfa 0x48 0x83 0xc4 0x48 0xc3 0xcc 0xcc 0xcc 0xcc
  0x00007f1ce8e77338: 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0x48 0x83 0xec 0x48 0x48 0x89 0x5c 0x24
  0x00007f1ce8e77348: 0x40 0x4c 0x89 0x64 0x24 0x38 0x4c 0x89 0x6c 0x24 0x30 0x49 0x8b 0xce 0x48 0x89
  0x00007f1ce8e77358: 0x4c 0x24 0x28 0x49 0x8b 0xd7 0x48 0x89 0x54 0x24 0x20 0x48 0x89 0x6c 0x24 0x18
  0x00007f1ce8e77368: 0x48 0x89 0x7c 0x24 0x10 0x48 0x89 0x74 0x24 0x08 0x48 0x85 0xff 0x0f 0x84 0xc1
  0x00007f1ce8e77378: 0x00 0x00 0x00 0x4c 0x8b 0xff 0x48 0x8b 0x87 0xb8 0x00 0x00 0x00 0x4c 0x8b 0xf0
  0x00007f1ce8e77388: 0x41 0x83 0xbf 0xf8 0x00 0x00 0x00 0x00 0x0f 0x85 0x53 0x00 0x00 0x00 0xb8 0x03
  0x00007f1ce8e77398: 0x00 0x00 0x00 0x41 0xb8 0x01 0x00 0x00 0x00 0xf0 0x45 0x0f 0xb1 0x47 0x14 0x0f
  0x00007f1ce8e773a8: 0x85 0x3c 0x00 0x00 0x00 0x48 0x8b 0xc7 0x4c 0x8b 0xc6 0xe8 0x88 0x10 0x07 0x00
> 0x00007f1ce8e773b8: 0x90 0x41 0xc7 0x47 0x14 0x03 0x00 0x00 0x00 0xf0 0x83 0x04 0x24 0x00 0x48 0x8b
  0x00007f1ce8e773c8: 0x5c 0x24 0x40 0x48 0x8b 0x6c 0x24 0x18 0x4c 0x8b 0x64 0x24 0x38 0x4c 0x8b 0x6c
  0x00007f1ce8e773d8: 0x24 0x30 0x4c 0x8b 0x74 0x24 0x28 0x4c 0x8b 0x7c 0x24 0x20 0x48 0x83 0xc4 0x48
  0x00007f1ce8e773e8: 0xc3 0xbf 0x01 0x00 0x00 0x00 0xbe 0x00 0x00 0x00 0x00 0xe8 0x78 0x7b 0x0d 0x00
  0x00007f1ce8e773f8: 0x90 0x48 0x8b 0x74 0x24 0x08 0x48 0x8b 0x7c 0x24 0x10 0xeb 0xa8 0x49 0x2b 0xc6
  0x00007f1ce8e77408: 0x49 0x89 0x47 0x78 0x41 0xc7 0x47 0x14 0x03 0x00 0x00 0x00 0xf0 0x83 0x04 0x24
  0x00007f1ce8e77418: 0x00 0x48 0x8b 0x5c 0x24 0x40 0x48 0x8b 0x6c 0x24 0x18 0x4c 0x8b 0x64 0x24 0x38
  0x00007f1ce8e77428: 0x4c 0x8b 0x6c 0x24 0x30 0x4c 0x8b 0x74 0x24 0x28 0x4c 0x8b 0x7c 0x24 0x20 0x48
  0x00007f1ce8e77438: 0x83 0xc4 0x48 0xc3 0x48 0x8d 0x05 0xb5 0x3a 0xa8 0x03 0xbf 0x02 0x00 0x00 0x00
  0x00007f1ce8e77448: 0x48 0x8b 0xf0 0xe8 0x90 0x79 0x03 0x00 0x90 0x48 0x8b 0x5c 0x24 0x40 0x48 0x8b
  0x00007f1ce8e77458: 0x6c 0x24 0x18 0x4c 0x8b 0x64 0x24 0x38 0x4c 0x8b 0x6c 0x24 0x30 0x4c 0x8b 0x74
  0x00007f1ce8e77468: 0x24 0x28 0x4c 0x8b 0x7c 0x24 0x20 0xcc 0x48 0x83 0xec 0x48 0x49 0x8b 0xce 0x49
  0x00007f1ce8e77478: 0x8b 0xd7 0x48 0x85 0xff 0x0f 0x84 0xe2 0x00 0x00 0x00 0x4c 0x8b 0xff 0x48 0x8b
  0x00007f1ce8e77488: 0x87 0xb8 0x00 0x00 0x00 0x4c 0x8b 0xf0 0x41 0x83 0xbf 0xf8 0x00 0x00 0x00 0x00
  0x00007f1ce8e77498: 0x0f 0x85 0x7c 0x00 0x00 0x00 0xb8 0x03 0x00 0x00 0x00 0x41 0xb8 0x01 0x00 0x00
  0x00007f1ce8e774a8: 0x00 0xf0 0x45 0x0f 0xb1 0x47 0x14 0x90 0x0f 0x85 0x64 0x00 0x00 0x00 0x48 0x89

Top of stack (sp=0x00007ffd109faed0):
  0x00007ffd109faeb0: 0x0000000000000000 0x00007f1ce8e773b8 0x00007ffd109faed0 0x00007f1ce8e773b8
> 0x00007ffd109faed0: 0x0000000000000000 0x00007f1ce7dc2658 0x0000555555fef2c0 0x00007ffd109fbf70
  0x00007ffd109faef0: 0x0000555555fef2c0 0x000000000000003e 0x0000000000000003 0x00007ffd109faf40
  0x00007ffd109faf10: 0x0000555555fef2c0 0x00007f1ce7dba14c 0x0000555555ff0650 0x00007f1ce7d0e000
  0x00007ffd109faf30: 0x0000000000000000 0x0000000000000000 0x4e2f642f746e6d2f 0x50736e6165427465
  0x00007ffd109faf50: 0x2f737463656a6f72 0x707041646c697542 0x2d676e6977732f73 0x2d6d766c61617267
  0x00007ffd109faf70: 0x62696c2f6f6d6564 0x646165685f747761 0x006f732e7373656c 0x0000000000000000
  0x00007ffd109faf90: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x00007ffd109fafb0: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x00007ffd109fafd0: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x00007ffd109faff0: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x00007ffd109fb010: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x00007ffd109fb030: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x00007ffd109fb050: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x00007ffd109fb070: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x00007ffd109fb090: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x00007ffd109fb0b0: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000

VM thread locals for the failing thread 0x0000555555fef2c0:
  0: JNIThreadLocalEnvironment.jniFunctions = (bytes) 0x00007f1ce5f88010
  8: StackOverflowCheckImpl.stackBoundaryTL = (Word) 0x0000000000000001 (1)
  16: Safepoint.safepointRequested = (int) 0x7fff3327 (2147431207)
  20: StatusSupport.statusTL = (int) 0x00000001 (1)
  24: ThreadLocalAllocation.regularTLAB = (bytes)
    0x0000555555fef2d8: 0x00007f1ce8700000 0x00007f1ce8780000
    0x0000555555fef2e8: 0x00007f1ce8755290 0x0000000000000000
  56: PlatformThreads.currentThread = (Object) 0x00007f1ce6447620
    is an object of type java.lang.Thread
  64: JavaFrameAnchors.lastAnchor = (Word) 0x00007ffd109fbf90 (140724882358160)
  72: JavaThreads.currentVThreadId = (long) 0x0000000000000001 (1)
  80: ExceptionUnwind.currentException = (Object) 0x0000000000000000
  88: IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) 0x0000000000000000
  96: IsolatedCompileClient.currentClient = (Object) 0x0000000000000000
  104: IsolatedCompileContext.currentContext = (Object) 0x0000000000000000
  112: JNIObjectHandles.handles = (Object) 0x00007f1ce87009c8
    is an object of type com.oracle.svm.core.handles.ThreadLocalHandles
  120: JNIThreadLocalPendingException.pendingException = (Object) 0x0000000000000000
  128: JNIThreadLocalReferencedObjects.referencedObjectsListHead = (Object) 0x0000000000000000
  136: JNIThreadOwnedMonitors.ownedMonitors = (Object) 0x0000000000000000
  144: NoAllocationVerifier.openVerifiers = (Object) 0x0000000000000000
  152: RecurringCallbackTimer.exception = (Object) 0x0000000000000000
  160: ThreadingSupportImpl.activeTimer = (Object) 0x0000000000000000
  168: SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes) 0x0000000000000000
  176: ThreadLocalAllocation.allocatedBytes = (Word) 0x0000000000000000 (0)
  184: VMThreads.IsolateTL = (Word) 0x00007f1ce5700000 (139762085134336)
  192: VMThreads.OSThreadHandleTL = (Word) 0x00007f1ce8783b80 (139762136005504)
  200: VMThreads.OSThreadIdTL = (Word) 0x00000000000010b0 (4272)
  208: VMThreads.StackBase = (Word) 0x00007ffd109fd000 (140724882362368)
  216: VMThreads.StackEnd = (Word) 0x00007ffd101fe000 (140724873977856)
  224: VMThreads.StartedByCurrentIsolate = (bytes) 0x0000000000000000
  232: VMThreads.nextTL = (Word) 0x0000000000000000 (0)
  240: VMThreads.unalignedIsolateThreadMemoryTL = (Word) 0x0000555555fef2a0 (93825003352736)
  248: ActionOnTransitionToJavaSupport.actionTL = (int) 0x00000000 (0)
  252: ImplicitExceptions.implicitExceptionsAreFatal = (int) 0x00000000 (0)
  256: StackOverflowCheckImpl.yellowZoneStateTL = (int) 0x7efefefe (2130640638)
  260: StatusSupport.safepointBehaviorTL = (int) 0x00000001 (1)
  264: ThreadingSupportImpl.currentPauseDepth = (int) 0x00000000 (0)

Java frame anchors for the failing thread 0x0000555555fef2c0:
  Anchor 0x00007ffd109fbf90 LastJavaSP 0x00007ffd109fbf80 LastJavaIP 0x00007f1ce8edf654

Stacktrace for the failing thread 0x0000555555fef2c0 (A=AOT compiled, J=JIT compiled, D=deoptimized, i=inlined):
  A  SP 0x00007ffd109faed0 IP 0x00007f1ce8e773b8 size=80    com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_FatalError_2d6e7de51007501356372d87ae0cc671dc9d1a91(IsolateEnterStub.java:0)
  i  SP 0x00007ffd109fbf80 IP 0x00007f1ce8edf654 size=64    com.oracle.svm.core.jni.JNIOnLoadFunctionPointer.invoke(JNILibraryInitializer.java)
  A  SP 0x00007ffd109fbf80 IP 0x00007f1ce8edf654 size=64    com.oracle.svm.core.jni.JNILibraryInitializer.callOnLoadFunction(JNILibraryInitializer.java:70)
  A  SP 0x00007ffd109fbfc0 IP 0x00007f1ce8ee01cc size=32    com.oracle.svm.core.jni.JNILibraryInitializer.initialize(JNILibraryInitializer.java:131)
  A  SP 0x00007ffd109fbfe0 IP 0x00007f1ce8ebca05 size=128   com.oracle.svm.core.jdk.NativeLibrarySupport.addLibrary(NativeLibrarySupport.java:128)
  i  SP 0x00007ffd109fc060 IP 0x00007f1ce8ebb4f3 size=32    com.oracle.svm.core.jdk.NativeLibrarySupport.addLibrary(NativeLibrarySupport.java:84)
  A  SP 0x00007ffd109fc060 IP 0x00007f1ce8ebb4f3 size=32    com.oracle.svm.core.jdk.NativeLibraries.loadLibrary0(NativeLibraries.java:147)
  A  SP 0x00007ffd109fc080 IP 0x00007f1ce8ebb93f size=80    com.oracle.svm.core.jdk.NativeLibraries.loadLibraryRelative(NativeLibraries.java:128)
  i  SP 0x00007ffd109fc0d0 IP 0x00007f1ce976745f size=16    java.lang.ClassLoader.loadLibrary(ClassLoader.java:106)
  i  SP 0x00007ffd109fc0d0 IP 0x00007f1ce976745f size=16    java.lang.Runtime.loadLibrary0(Runtime.java:916)
  i  SP 0x00007ffd109fc0d0 IP 0x00007f1ce976745f size=16    java.lang.System.loadLibrary(System.java:2068)
  i  SP 0x00007ffd109fc0d0 IP 0x00007f1ce976745f size=16    java.awt.Toolkit$2.run(Toolkit.java:1384)
  A  SP 0x00007ffd109fc0d0 IP 0x00007f1ce976745f size=16    java.awt.Toolkit$2.run(Toolkit.java:1382)
  A  SP 0x00007ffd109fc0e0 IP 0x00007f1ce9ac539a size=48    java.security.AccessController.executePrivileged(AccessController.java:128)
  i  SP 0x00007ffd109fc110 IP 0x00007f1ce976d4a7 size=16    java.security.AccessController.doPrivileged(AccessController.java:319)
  A  SP 0x00007ffd109fc110 IP 0x00007f1ce976d4a7 size=16    java.awt.Toolkit.loadLibraries(Toolkit.java:1381)
  A  SP 0x00007ffd109fc120 IP 0x00007f1ce976c8bd size=32    java.awt.Toolkit.initStatic(Toolkit.java:1419)
  A  SP 0x00007ffd109fc140 IP 0x00007f1ce97694a8 size=16    java.awt.Toolkit.<clinit>(Toolkit.java:1393)
  A  SP 0x00007ffd109fc150 IP 0x00007f1ce8e4e00b size=16    com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:408)
  A  SP 0x00007ffd109fc160 IP 0x00007f1ce8e4ca05 size=64    com.oracle.svm.core.classinitialization.ClassInitializationInfo.doInitialize(ClassInitializationInfo.java:324)
  A  SP 0x00007ffd109fc1a0 IP 0x00007f1ce8e4cf87 size=704   com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:273)
  A  SP 0x00007ffd109fc460 IP 0x00007f1ce9716190 size=48    java.awt.EventQueue.invokeLater(EventQueue.java:1316)
  i  SP 0x00007ffd109fc490 IP 0x00007f1ce8d04f95 size=48    javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1421)
  A  SP 0x00007ffd109fc490 IP 0x00007f1ce8d04f95 size=48    com.formdev.flatlaf.demo.FlatLafDemo.main(FlatLafDemo.java:43)
  i  SP 0x00007ffd109fc4c0 IP 0x00007f1ce8e3c100 size=16    java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
  i  SP 0x00007ffd109fc4c0 IP 0x00007f1ce8e3c100 size=16    com.oracle.svm.core.JavaMainWrapper.invokeMain(JavaMainWrapper.java:182)
  A  SP 0x00007ffd109fc4c0 IP 0x00007f1ce8e3c100 size=16    com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:233)
  i  SP 0x00007ffd109fc4d0 IP 0x00007f1ce8e3bea0 size=48    com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:202)
  A  SP 0x00007ffd109fc4d0 IP 0x00007f1ce8e3bea0 size=48    com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:301)
  i  SP 0x00007ffd109fc500 IP 0x00007f1ce8e7d13b size=96    com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:286)
  A  SP 0x00007ffd109fc500 IP 0x00007f1ce8e7d13b size=96    com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(IsolateEnterStub.java:0)

Threads:
  0x00007f1ce0000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Reference Handler" - 0x00007f1ce64477b0, daemon, stack(0x00007f1ce7f01000,0x00007f1ce8700000)
  0x0000555555fef2c0 STATUS_IN_JAVA (PREVENT_VM_FROM_REACHING_SAFEPOINT) "main" - 0x00007f1ce6447620, stack(0x00007ffd101fe000,0x00007ffd109fd000)

No VMOperation in progress

The 30 most recent VM operation status changes:

VM mutexes:
  mutex "RealLog.backTracePrinterMutex" is unlocked.
  mutex "mainVMOperationControlWorkQueue" is unlocked.
  mutex "referencePendingList" is unlocked.
  mutex "thread" is unlocked.

Build time information:
  Version: 22.0.2+9, serial gc
  Platform: linux/amd64
  Page size: 4096
  Container support: true
  CPU features used for AOT compiled code: CX8, CMOV, FXSR, MMX, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, POPCNT, LZCNT, AVX, AVX2, BMI1, BMI2, FMA, F16C

Runtime information:
  CPU cores (container): unknown
  CPU cores (OS): 4
  Memory: 7898M
  Page size: 4096
  VM uptime: 0.060s
  Current timestamp: 1723977298013
  AOT compiled code: 0x00007f1ce8c9b000 - 0x00007f1cead59d3f

OS information:
  Max threads: 63138
  Max memory mappings: 65530
  Max PID: 4194304

Command line:

Heap settings and statistics:
  Supports isolates: true
  Heap base: 0x00007f1ce5700000
  Object reference size: 8
  Reserved object header bits: 0b111
  Aligned chunk size: 524288
  Large array threshold: 131072
  Incremental collections: 0
  Complete collections: 0

Heap usage:
  Eden: 1.00M (0.00M in 0 aligned chunks, 0.00M in 0 unaligned chunks)
  Old: 0.00M (0.00M in 0 aligned chunks, 0.00M in 0 unaligned chunks)

Native image heap boundaries:
  ReadOnly Primitives: 0x00007f1ce5780830 - 0x00007f1ce5bd4aa0
  ReadOnly References: 0x00007f1ce5bd4aa0 - 0x00007f1ce5f87cb0
  ReadOnly Relocatables: 0x00007f1ce5f88000 - 0x00007f1ce6209cd8
  Writable Primitives: 0x00007f1ce620a000 - 0x00007f1ce632a758
  Writable References: 0x00007f1ce632a758 - 0x00007f1ce67cc118
  Writable Huge: 0x00007f1ce6800038 - 0x00007f1ce68991c8
  ReadOnly Huge: 0x00007f1ce689a038 - 0x00007f1ce73015b8

Heap chunks: E=eden, S=survivor, O=old, F=free; A=aligned chunk, U=unaligned chunk; T=to space
ctoabidmaqbool commented 2 months ago

after converting build.sh to linux compatable and then running ./build.sh:

maqboolstudiopc@MSC-30:/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo$ dos2unix build.sh
dos2unix: converting file build.sh to Unix format...
maqboolstudiopc@MSC-30:/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo$ ./build.sh
Creating native image ...
Apply jar:file:///mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/thirdparty/native-image.properties
Apply jar:file:///mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/polyglot/native-image.properties
Executing [
HOME=/home/maqboolstudiopc \
LANG=C.UTF-8 \
'PATH=/mnt/d/Programs/gradle-7.3.3-bin/bin:/mnt/d/Programs/apache-maven-3.8.8-bin/bin:/mnt/d/AndroidSDKLinux/platform-tools:/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/bin:/mnt/d/Programs/gradle-7.3.3-bin/bin:/mnt/d/Programs/apache-maven-3.8.8-bin/bin:/mnt/d/AndroidSDKLinux/platform-tools:/mnt/d/Programs/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_2.2.4.0_x64__8wekyb3d8bbwe:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Program Files/TortoiseSVN/bin:/mnt/c/Program Files/TortoiseGit/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/:/mnt/c/Program Files/dotnet/:/mnt/d/Programs/ideaIC-2023.3.3.win/bin:/mnt/d/xampp1/php:/mnt/c/ProgramData/ComposerSetup/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Users/MSC-30/AppData/Local/Microsoft/WindowsApps:/mnt/d/Programs/zulu17.48.15-ca-jdk17.0.10-win_x64/bin:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/d/Programs/gradle-7.3.3-bin/bin:/mnt/d/AndroidSDK/platform-tools:/mnt/c/Users/MSC-30/AppData/Roaming/npm:/mnt/c/Users/MSC-30/.dotnet/tools:/mnt/c/Program Files (x86)/WiX Toolset v3.14/bin:/mnt/c/Program Files (x86)/Nmap:/mnt/d/Programs/ideaIC-2023.3.3.win/bin:/mnt/c/Users/MSC-30/AppData/Roaming/Composer/vendor/bin:/snap/bin' \
PWD=/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo \
USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM=true \
/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/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.HostLibC=glibc \
--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 \
--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.platform=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/com.sun.jmx.mbeanserver=org.graalvm.nativeimage.builder \
--add-exports=java.management/sun.management=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.graal.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.graal.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.graal.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.graal.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=jdk.graal.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto,org.graalvm.truffle.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.common=jdk.graal.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.graal.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.graal.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.riscv64=jdk.graal.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.graal.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.graal.compiler,org.graalvm.nativeimage.base,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto,org.graalvm.truffle.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.riscv64=jdk.graal.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.graal.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.services=jdk.graal.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.events=org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.internal.event=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/com.sun.management.internal=org.graalvm.nativeimage.builder \
-XX:+UseJVMCINativeLibrary \
-Xss10m \
-XX:MaxRAMPercentage=85.0 \
-XX:GCTimeRatio=9 \
-XX:+ExitOnOutOfMemoryError \
-Djava.awt.headless=true \
'-Dorg.graalvm.vendor=GraalVM Community' \
-Dorg.graalvm.vendorurl=https://www.graalvm.org/ \
'-Dorg.graalvm.vendorversion=GraalVM CE 22.0.2+9.1' \
-Dorg.graalvm.version=24.0.2 \
-Dcom.oracle.graalvm.isaot=true \
-Djava.system.class.loader=com.oracle.svm.hosted.NativeImageSystemClassLoader \
-Xshare:off \
-Djdk.reflect.useOldSerializableConstructor=true \
-Djdk.internal.lambda.disableEagerInitialization=true \
-Djdk.internal.lambda.eagerlyInitialize=false \
-Djava.lang.invoke.InnerClassLambdaMetafactory.initializeLambdas=false \
-Djava.lang.invoke.MethodHandle.DONT_INLINE_THRESHOLD=-1 \
-Djava.lang.invoke.MethodHandle.PROFILE_GWT=false \
-Djava.awt.headless=false \
-Xmx7G \
--add-modules=ALL-DEFAULT \
--module-path \
/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/builder/native-image-base.jar:/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/builder/objectfile.jar:/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/builder/pointsto.jar:/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/builder/svm-foreign.jar:/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/builder/svm.jar \
--module \
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner \
-keepalive \
/proc/3890/comm \
-imagecp \
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/flatlaf-demo.jar \
-imagemp \
/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/library-support.jar \
-H:CLibraryPath=/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/clibraries/linux-amd64 \
-H:Path@driver=/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo \
-H:FallbackThreshold@user+api=0 \
-H:ConfigurationFileDirectories@user=/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/config \
'-H:Name@manifest from file:///mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/flatlaf-demo.jar=flatlaf-demo' \
'-H:Class@manifest from file:///mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/flatlaf-demo.jar=com.formdev.flatlaf.demo.FlatLafDemo' \
'-H:Name@explicit image name=demo' \
-H:ImageBuildID@driver=2c151a08-9a93-2267-ed2b-40c783d91f35 \
'-H:Features@jar:file:///mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/thirdparty/native-image.properties+api=com.oracle.svm.thirdparty.gson.GsonFeature' \
'-H:Features@jar:file:///mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/polyglot/native-image.properties+api=com.oracle.svm.polyglot.groovy.GroovyIndyInterfaceFeature,com.oracle.svm.polyglot.scala.ScalaFeature' \
-H:Color@driver=always \
-H:+BuildOutputProgress@driver \
-H:+BuildOutputLinks@driver
]
========================================================================================================================
GraalVM Native Image: Generating 'demo' (executable)...
========================================================================================================================
[1/8] Initializing...                                                                                   (24.1s @ 0.07GB)
 Java version: 22.0.2+9, vendor version: GraalVM CE 22.0.2+9.1
 Graal compiler: optimization level: 2, target machine: x86-64-v3
 C compiler: gcc (linux, x86_64, 9.4.0)
 Garbage collector: Serial GC (max heap size: 80% of RAM)
 1 user-specific feature(s):
 - com.oracle.svm.thirdparty.gson.GsonFeature
------------------------------------------------------------------------------------------------------------------------
Build resources:
 - 6.22GB of memory (80.7% of 7.71GB system memory, set via '-Xmx7G')
 - 4 thread(s) (100.0% of 4 available processor(s), determined at start)
[2/8] Performing analysis...  [****]                                                                   (213.0s @ 3.05GB)
   10,588 reachable types   (84.5% of   12,523 total)
   22,881 reachable fields  (62.2% of   36,814 total)
   62,639 reachable methods (63.1% of   99,196 total)
    3,406 types,   138 fields, and 1,692 methods registered for reflection
      154 types,   249 fields, and   124 methods registered for JNI access
        4 native libraries: dl, pthread, rt, z
[3/8] Building universe...                                                                              (27.7s @ 1.20GB)
[4/8] Parsing methods...      [****]                                                                    (16.6s @ 1.36GB)
[5/8] Inlining methods...     [****]                                                                    (16.2s @ 1.51GB)
[6/8] Compiling methods...    [[6/8] Compiling methods...    [***************]                                                        (228.3s @ 1.23GB)
[7/8] Laying out methods...   [***]                                                                     (10.3s @ 1.64GB)
[8/8] Creating image...       [[8/8] Creating image...       [******]                                                                  (35.3s @ 1.86GB)
  32.75MB (51.69%) for code area:    40,484 compilation units
  27.51MB (43.42%) for image heap:  283,538 objects and 199 resources
   3.10MB ( 4.89%) for other data
  63.35MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 origins of code area:                                Top 10 object types in image heap:
  18.16MB java.desktop                                         9.83MB byte[] for code metadata
   6.90MB java.base                                            3.87MB byte[] for java.lang.String
   3.70MB java.xml                                             3.00MB java.lang.Class
   1.97MB flatlaf-demo.jar                                     2.99MB java.lang.String
   1.15MB svm.jar (Native Image)                             909.91kB com.oracle.svm.core.hub.DynamicHubCompanion
 122.93kB java.datatransfer                                  645.27kB java.lang.String[]
 118.58kB java.logging                                       612.39kB byte[] for reflection metadata
  97.37kB java.prefs                                         513.21kB int[][]
  70.52kB jdk.proxy1                                         502.06kB byte[] for embedded resources
  64.68kB org.graalvm.nativeimage.base                       499.08kB java.util.HashMap$Node
 118.71kB for 7 more packages                                  4.22MB for 1700 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.
------------------------------------------------------------------------------------------------------------------------
                       47.7s (8.1% of total time) in 1993 GCs | Peak RSS: 3.70GB | CPU load: 3.48
------------------------------------------------------------------------------------------------------------------------
Build artifacts:
 /mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/demo (executable)
 /mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libawt.so (jdk_library)
 /mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libawt_headless.so (jdk_library)
 /mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libawt_xawt.so (jdk_library)
 /mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libfontmanager.so (jdk_library)
 /mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libjava.so (jdk_library_shim)
 /mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libjavajpeg.so (jdk_library)
 /mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libjsound.so (jdk_library)
 /mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libjvm.so (jdk_library_shim)
 /mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/liblcms.so (jdk_library)
========================================================================================================================
Finished generating 'demo' in 9m 40s.
Compressing executable ...
./build.sh: 13: upx: not found