Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PL/Java crash on Ubuntu latest kernel #129
I've been using PLJava for many years in a scientific application that I develop and distribute. The most recent version is running on Ubuntu Xenial running PG 9.5, and all has been well for quite some time.
On Wednesday my own instance of the server was shut down to replace a disk in a degraded raid array. When the server was restarted all aspects of my server seem to work fine with the exception of calls using PLJava which result in the following error message:
i've just had an email from another lab running my software who have the same problem. They noticed the problem following a power outage that shut their server down. So both servers first exhibited the issue following a hard restart. While there appear to have been no auto software updates done at time, I'm guessing now that a previous update may have been installed that didn't come into effect until the servers were rebooted?
Anybody have a similar problem? Any suggestions on how to troubleshoot?
You might check issue #128, reporting a crash from Java after a recent kernel update. That could be consistent with your observation of a problem right after an OS reboot.
OS vendors have been recently rushing out kernels to harden against a possible attack that accesses memory near the gap between stack and lower addresses. So it's quite possible that the mappings in that area have been changed, and there's an interaction with something Java tries to do (though what exactly, I haven't guessed).
You might check for your own
It would be of interest to find out if there's a way to get Java standalone to misbehave in a similar way under this updated kernel.
I can't access the Red Hat solutions link, but other reports of the issue online suggest adding
According to the docs, this option is a hard stack size setting, not a minimum. Not only will the stack begin that size, it also can't grow. So if whatever PL/Java is being used for might require more than 2 MB of stack, the option may need to be increased further to avoid stack overflow errors.
I assume this is an interim solution, and Oracle will eventually release a Java update that doesn't blunder into the stack guard, and then
The version that I know definitely highlights the problem is 4.4.0-81-generic. My server hasn't been restarted before this Wednesday for months so it's possible that earlier versions also had the issue.
My unattended-upgrades log shows that this kernel was installed on Monday 19th June, and given I haven't had complaints from other users (who are likely to restart much more regularly than me) before this week it seems a good guess that prior kernel versions work OK.
Using the vmoptions workaround with the more secure kernel seems the best fix for now though.