cloudius-systems / osv

OSv, a new operating system for the cloud.
osv.io
Other
4.12k stars 605 forks source link

Status of recent OpenJDK support #1230

Closed maximdeclercq closed 11 months ago

maximdeclercq commented 1 year ago

I was wondering if there is any development towards supporting Java > 11.

Trying to build and run Java 12 or higher, I get something the following error in all cases I tried:

$ kubectl logs pods/papermc-587587b8c5-pvwwh
OSv v0.57.0-22-g73dad00a
eth0: 192.168.122.15
Booted up in 843.99 ms
Cmdline: runscript /run/default;
runscript expand fn='/run/default' line=0 '/usr/lib/jvm/java/bin/java -Djavax.net.ssl.trustStore=/etc/pki/ca-trust/extracted/java/cacerts -Xmx1024M -Xms1024M -jar /srv/paper.jar'
runscript expand fn='/run/default' line=1 ''
Rest API server running on port 8000
httpserver failed: Aborted

[backtrace]
0x0000000040217a3f <???+1075935807>
0x00000000403cfb0e <osv::handle_mmap_fault(unsigned long, int, exception_frame*)+30>
0x00000000402abc9a <mmu::vm_fault(unsigned long, exception_frame*)+298>
0x00000000402fb68f <page_fault+143>
0x00000000402fa546 <???+1076864326>

Architecture: amd64 OSv Version: https://github.com/cloudius-systems/osv/commit/8c8d477d6f6194d5f43ecf13e065afd3ac4ece36 OpenJDK Version: 12 or higher PaperMC Version: 1.10.2-918

wkozaczuk commented 1 year ago

Hi.

This line:

httpserver failed: Aborted

makes me think it is actually the OSv httpserver module crashing.

Could you please do two things to eliminate the issue?

  1. Build and run an image without httpserver and see if it works with java only.
  2. Enable verbose output so we can see any issues.

On my Fedora, I am able to run some Java apps on OpenJDK jdk-17.0.5+8 on OSv. Could you please tell me what exact version of OpenJDK you are using java --version?

wkozaczuk commented 11 months ago

Closing as I have not heard back. Please ask more questions on https://groups.google.com/g/osv-dev