Solved openjdk8 in kernel lock (umtxn state) after upgrade

Hi there,

I have a FreeBSD 10.2-RELEASE-p9 (Intel Xeon) with a few jails, all managed with sysutils/ezjail. Yesterday I updated the system (from p7) and upgraded the various installed packages (with ports-mgmt/pkg). I have a specific jail where I run a Java based software.

After the minor upgrade of java/openjdk8, from 8.60.24 to 8.66.17_3, it has stopped working in a very unusual way.

If I try java --version nothing happens: no output is printed, no error is shown. The command just hang: it doesn't exit. Checking with top it is stuck in umtxn state, with 0% CPU usage. I have no errors on the logs.

I already tried to uninstall and reinstall it, even only the jre, with no results.

procstat -k for the java process is:
Code:
PID    TID COMM             TDNAME           KSTACK
17924 100095 java             -                mi_switch sleepq_catch_signals sleepq_wait_sig _sleep umtxq_sleep do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall

ldd /usr/local/openjdk8/bin/java is:
Code:
/usr/local/openjdk8/bin/java:
    libz.so.6 => /lib/libz.so.6 (0x80082b000)
    libthr.so.3 => /lib/libthr.so.3 (0x800a41000)

As this never happens before to me I have no idea on how to fix this. I also have no idea on where to look for the root cause.

The only idea I have is to manually rebuild openjdk, and is very long.

Some suggestions?

Thank you for your help.

Best Regards.
 
Something about this seemed familiar. Look at PR 203765 and/or Thread issues-with-python-web-applications-in-jails.53440. Did you update the jail as well?

Thanks for the hints!

I thought I updated it, yet I checked my libthr and

Host sha1 /lib/libthr.so.3:
Code:
SHA1 (libthr.so.3) = 594d3154c4bcbbd45bb5fa74cb56ec4fd4d6cb95

Jail sha1 /lib/libthr.so.3:
Code:
SHA1 (libthr.so.3) = 7b629a53cfcaba3c417417c0ddf63b8af6d4798a

So, after all something is wrong.

I'm now updating the jails again. I'll update this thread as soon I have news.

Thanks a lot.
 
Fixed.

As suggested, I failed to correctly update the jails.

In case you are using sysutils/ezjail remember to follow all the update steps, as described in https://www.freebsd.org/doc/handbook/jails-ezjail.html

In my case I did*:

Host:
sudo ezjail-admin stop MYJAIL
sudo ezjail-admin update -u
sudo mergemaster -U -D /usr/jails/MYJAIL
sudo ezjail-admin update -P
sudo ezjail-admin start MYJAIL

Then in my jail I had to reinstall java in order to have it correctly linked:
pkg remove openjdk8
pkg install openjdk8

*: please be sure to understand the mergemaster() command before running it.
 
Back
Top