openj9
openj9 copied to clipboard
Very strange NPE - complaining that "this" is null
Hi,
we are running recent Semeru Java 17 with OpenJ9 JVM on AIX and we received strange NPE, which I'm not sure how to interpret, here is excerpt from stack trace
...
Caused by: java.lang.NullPointerException: Cannot read field "noveUp" because "this" is null
at adis.sfu.msfu_sfu.params.SfuParamStorage.getSeznamUfNovy(SfuParamStorage.java:271) ~[al-a-adis.jar:?]
...
and impacted code looks like this
public class SfuParamStorage {
// ...
// noveUp is field on this class with package access
TCUfo noveUp;
// private method within this class
private List<Volba> getSeznamUfNovy ()
{
switch (selectedNovyTypUfo)
{
case TYP_UP:
return Volba.singletonList (noveUp.getNazUfo (), null, noveUp.getCUfo ()); // line 271 - where exception happens
// ... method continues
What I cannot understand how "this" can be null if I'm calling method on an existing object?
And another object field selectedNovyTypUfo is accessed fine just before problematic line, so "this" was not null there.
Are there theoretically some cases when this could be legitimate behavior of JVM? Or is this bug of JVM?
Unfortunately I do not have much more info then stack trace and problem does not occur regularly, but it's so strange that I'd like to understand it more - how this can happen and how eventually get more details when this exception appears again.
Thanks for any ideas or hints.
Does it still occur with the pre-release build for the next release? The Semeru OE release build for jdk17 is expected to be published this week.
https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Build_JDK17_ppc64_aix_Release/103/OpenJ9-JDK17-ppc64_aix-20240130-225510.tar.gz
from https://openj9-jenkins.osuosl.org/job/Pipeline-Release-0.43.0-Build17/18/
Do not know, as I said it appeared once and have no way yet to replicate. For sure cannot push prerelease to production. For now I'd like to have a qualified opinion if this is really as weird as I think.
Yes it's a problem, it indicates a bug in the JIT compiler. We've seen these types of issues before. If it's not resolved by the upcoming release, we'll need more information to investigate.
Semeru 17.0.10 is available now. https://developer.ibm.com/languages/java/semeru-runtimes/downloads/ https://github.com/ibmruntimes/semeru17-binaries/releases/tag/jdk-17.0.10%2B7_openj9-0.43.0
@pshipton thanks, actually we use certified edition, I assume this edition will be available little bit later - what is usual delay in release of certified edition after open edition?
Hopefully CE will be available this week.
The CE builds for jdk17 are available now. https://developer.ibm.com/languages/java/semeru-runtimes/downloads/
There is nothing more to do with the available information. I'll go ahead and close but it can be reopened later if necessary.