Java hard lockup on AMD Ryzen 5 PRO 2400GE

Need support for GhostBSD. Ask here if your question does not fit elsewhere.
Post Reply
teekay
Posts: 3
Joined: Mon Nov 25, 2024 9:35 am

Java hard lockup on AMD Ryzen 5 PRO 2400GE

Post by teekay »

I searched but can't seem to find any information on this issue. I have GhostBSD installed (24.10.1) on a system with the AMD Ryzen 5 PRO 2400GE CPU. If I install Java (openjdk version 8 or 17), some operations on some projects cause my computer to hard lock up (mouse also freezes, I have to hold the power button for 5 seconds to shut down). This is very repeatable, for example, if I generate a project from https://start.vertx.io/ and then run "./mvnw exec:run", it starts downloading jar files and then hard locks up. On a different project, if I invoke the coffeescript compiler, it will hard lock up. However other projects do compile and run, so I am not sure exactly where the problem is. If I switch to linux and run the same project and operation, it works fine.

I should also mention that this CPU had an issue with both Linux and GhostBSD that was causing random hard lockups until I set the "idle=nomwait" on Linux and "machdep.idle_mwait=0" on GhostBSD. In both cases this fixed the issue completely, but initially I thought the java lockup in GhostBSD was related to this, but this only seems to affect Java in certain circumstances.

Things I have tried:
- copy project to different hard drive and try there
- run the mvnw command in a thin jail
- try different java version
- try more "cpu fixes" for the AMD CPU, e.g. "machdep.idle=hlt", "cpucontrol -m '0xc0011029|=0x2000' /dev/cpuctlXXX"

I was still getting the hard lockups, making debugging really difficult since the dmesg is reset when I reboot. Anyone else experience something similar? Any ideas on what I can try?
User avatar
ericbsd
Developer
Posts: 2123
Joined: Mon Nov 19, 2012 7:54 pm

Re: Java hard lockup on AMD Ryzen 5 PRO 2400GE

Post by ericbsd »

@teekay, did you install all the missing dev packages?

If not, install them.

Code: Select all

sudo pkg install -g 'GhostBSD*-dev'
teekay
Posts: 3
Joined: Mon Nov 25, 2024 9:35 am

Re: Java hard lockup on AMD Ryzen 5 PRO 2400GE

Post by teekay »

@ericbsd Yes those packages were installed (for unrelated reasons, I was compiling a kernel). I'm not running a custom kernel though.
teekay
Posts: 3
Joined: Mon Nov 25, 2024 9:35 am

Re: Java hard lockup on AMD Ryzen 5 PRO 2400GE

Post by teekay »

I've done some more testing to narrow the issue down:

On a clean install of FreeBSD 14.1:
- apply machdep.idle_mwait=0 CPU fix
- install openjdk21, try to compile and run app. This works fine, no lockup.
- Install openjdk17 and try to compile and run app, locks up

On the GhostBSD installation:
- Install openjdk21, try to compile and run app, works fine, no lockup.

So it seems like the problem is specifically with openjdk17 on FreeBSD, which is the default that is installed when you install libreoffice, for example. I have also had lockups on openjdk8 on a separate project (Scala 2, locks up when fetching JARs for coffeescript compilation).

FYI I have cross-posted this issue to the FreeBSD forum as I'm not sure where the problem lies: https://forums.freebsd.org/threads/ghos ... 0ge.95846/
Post Reply