I'm experimenting with the cool feature of running Java applications introduced in Genode 19.02. I created a run script (= "copied java.run and made some minor changes") that builds and integrates a trivial Java example (check prime) [1].
It works as expected for BOARD=linux and KERNEL=linux.
But for BOARD=pc and KERNEL=[hw|nova] it doesn't. Actually, I have two issues I don't understand:
1. Java cannot load the jar file:
[init -> java] Error: Invalid or corrupt jarfile app.jar
A workaround is to pack it into a tar file and mount it accordingly into the VFS.
2. Reading the numbers from stdin leads to:
no RM attachment (READ pf_addr=0x5617b8 pf_ip=0x49a10 from pager_object: pd='init -> java' thread='pthread') Warning: page fault, pager_object: pd='init -> java' thread='pthread' ip=0x49a10 fault-addr=0x5617b8 type=no-page no RM attachment (READ pf_addr=0x4e6838 pf_ip=0x276e23f from pager_object: pd='init -> java' thread='pthread') Warning: page fault, pager_object: pd='init -> java' thread='pthread' ip=0x276e23f fault-addr=0x4e6838 type=no-page no RM attachment (WRITE pf_addr=0x49d300 pf_ip=0x82a79 from pager_object: pd='init -> java' thread='alarm-timer') Warning: page fault, pager_object: pd='init -> java' thread='alarm-timer' ip=0x82a79 fault-addr=0x49d300 type=write-fault
I would have expected the run script to be platform independent. Can someone explain why it isn't?
Thanks, Roman
[1] https://github.com/rite/genode-world/commit/84e72ed8433114b9c0624ed1f55aeff5...
Hi Roman,
On 8/12/19 1:55 PM, Roman Iten wrote:
I'm experimenting with the cool feature of running Java applications introduced in Genode 19.02. I created a run script (= "copied java.run and made some minor changes") that builds and integrates a trivial Java example (check prime) [1].
It works as expected for BOARD=linux and KERNEL=linux.
But for BOARD=pc and KERNEL=[hw|nova] it doesn't. Actually, I have two issues I don't understand:
- Java cannot load the jar file:
[init -> java] Error: Invalid or corrupt jarfile app.jar
A workaround is to pack it into a tar file and mount it accordingly into the VFS.
We cannot determine the correct size of ROM's since they are a multiple of page size on hardware. This leads to reporting the wrong size of the .jar file to Java. The workaround with the tar file is the best way and is done so in the original run script.
- Reading the numbers from stdin leads to:
no RM attachment (READ pf_addr=0x5617b8 pf_ip=0x49a10 from pager_object: pd='init -> java' thread='pthread') Warning: page fault, pager_object: pd='init -> java' thread='pthread' ip=0x49a10 fault-addr=0x5617b8 type=no-page no RM attachment (READ pf_addr=0x4e6838 pf_ip=0x276e23f from pager_object: pd='init -> java' thread='pthread') Warning: page fault, pager_object: pd='init -> java' thread='pthread' ip=0x276e23f fault-addr=0x4e6838 type=no-page no RM attachment (WRITE pf_addr=0x49d300 pf_ip=0x82a79 from pager_object: pd='init -> java' thread='alarm-timer') Warning: page fault, pager_object: pd='init -> java' thread='alarm-timer' ip=0x82a79 fault-addr=0x49d300 type=write-fault
I would have expected the run script to be platform independent. Can someone explain why it isn't?
I am not sure what happens here.
Sebastian