Hello Genodians
I'm tying to optimize the startup time of a java application (ARM board), as starting the JVM takes several seconds on our board.
To do this, I tried to move the classes.tar in to a separate vfs component [1]. This crashes the JVM with the following error message:
[init -> java] Error occurred during initialization of VM [init -> java] java.lang.NoClassDefFoundError: java/util/concurrent/ConcurrentHashMap [init -> java] at java.lang.WeakPairMap.<init>(java.base/WeakPairMap.java:47) [init -> java] at java.lang.Module.<clinit>(java.base/Module.java:267)
Can anyone tell me, why this happens? Is there a way to fix this?
[1] https://github.com/trimpim/genode-world/commit/3ec7d915e20576a786a3e89decb49...
Best regards, Primin
Hello Pirmin,
On 11/20/19 5:33 PM, Duss Pirmin wrote:
Hello Genodians
I'm tying to optimize the startup time of a java application (ARM board), as starting the JVM takes several seconds on our board.
To do this, I tried to move the classes.tar in to a separate vfs component [1]. This crashes the JVM with the following error message:
[init -> java] Error occurred during initialization of VM [init -> java] java.lang.NoClassDefFoundError: java/util/concurrent/ConcurrentHashMap [init -> java] at java.lang.WeakPairMap.<init>(java.base/WeakPairMap.java:47) [init -> java] at java.lang.Module.<clinit>(java.base/Module.java:267)
Can anyone tell me, why this happens? Is there a way to fix this?
[1] https://github.com/trimpim/genode-world/commit/3ec7d915e20576a786a3e89decb49...
I have tried to reproduce your issue by applying your commit and testing it on base-hw in Qemu (pbxa9). This worked so far. The 'NoClassDefFoundError' usually occurs if something goes wrong during class compilation or dependency loading, or something is corrupt. If Java could not find a class it would throw a 'ClassNotFoundException'.
Regards,
Sebastian
Hello Sebastian On 21.11.19 10:53, Sebastian Sumpf wrote:
I have tried to reproduce your issue by applying your commit and testing it on base-hw in Qemu (pbxa9). This worked so far. The 'NoClassDefFoundError' usually occurs if something goes wrong during class compilation or dependency loading, or something is corrupt. If Java could not find a class it would throw a 'ClassNotFoundException'.
Regards,
Sebastian
I'm not sure, if I interpret your response correctly. Does the modified run script succeed on your setup (base-hw on ARM)? I have tried it on PC (linux, base-hw and base-nova) and it fails on all kernels for me.
I'm using the same classes.tar. If the file is directly configured in the <vfs> node of JAVA, execution succeeds. But if the tar is included in the VFS-server and JAVA "mounts" the file system from it, the error occurs. If I set the -verbose argument for JAVA, I see, that about 140 classes are loaded successfully before the error occurs.
Regards, Pirmin
Hi Pirmin,
On 11/21/19 12:28 PM, Duss Pirmin wrote:
Hello Sebastian On 21.11.19 10:53, Sebastian Sumpf wrote:
I have tried to reproduce your issue by applying your commit and testing it on base-hw in Qemu (pbxa9). This worked so far. The 'NoClassDefFoundError' usually occurs if something goes wrong during class compilation or dependency loading, or something is corrupt. If Java could not find a class it would throw a 'ClassNotFoundException'.
Regards,
Sebastian
I'm not sure, if I interpret your response correctly. Does the modified run script succeed on your setup (base-hw on ARM)?
Yes.
I have tried it on PC (linux, base-hw and base-nova) and it fails on all kernels for me. I'm using the same classes.tar. If the file is directly configured in the <vfs> node of JAVA, execution succeeds. But if the tar is included in the VFS-server and JAVA "mounts" the file system from it, the error occurs. If I set the -verbose argument for JAVA, I see, that about 140 classes are loaded successfully before the error occurs.
I would suggest to test your scenario again with the upcoming Genode release 19.11, (or current master) since a lot has been changed in the VFS and libc implementations. If this does not help we will have to find a way to reproduce your issue.
Cheers,
Sebastian
Hi Sebastian
On 25.11.19 13:48, Sebastian Sumpf wrote:
Hi Pirmin,
I would suggest to test your scenario again with the upcoming Genode release 19.11, (or current master) since a lot has been changed in the VFS and libc implementations. If this does not help we will have to find a way to reproduce your issue.
Current master indeed fixes the issue. Thank you.
Regards, Pirmin