Java and VFS on different kernels

Sebastian Sumpf Sebastian.Sumpf at genode-labs.com
Mon Aug 12 14:24:06 CEST 2019


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:
> 
> 
> 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.

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.

> 
> 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?

I am not sure what happens here.

Sebastian




-- 
Sebastian Sumpf
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth






More information about the users mailing list