SIGSEGV caused by compiled Java code

28 views
Skip to first unread message

Reto Merz

unread,
Oct 14, 2023, 1:13:34 PM10/14/23
to dis...@openjdk.org
Hello,

We can always reproduce a JVM crash SIGSEGV caused by compiled Java code.
At the moment we can it only reproduce on Linux system (Ubuntu 22.04.3 LTS), and not on Windows.

First we have seen it with version
OpenJDK Runtime Environment Temurin-17.0.4.1+1 (17.0.4.1+1) (build 17.0.4.1+1)

After that we updatet to the latest 17 LTS Temurin release
OpenJDK Runtime Environment Temurin-17.0.8.1+1 (17.0.8.1+1) (build 17.0.8.1+1)

but we can still reproduce it.

Here is the content of the full hs_err_pid*.log:
https://github.com/retomerz/pasetbin/blob/main/hs_err_pid215731.log

The Java code of the mentioned method (ch.abacus.abareport.Logger.logOldImpl(Level,String,Throwable))
is below [1].

Is this a known problem or should we report this via bugreport.java.com?
In case we should report it, what exact info should be provided?

Thanks

Regards
Reto

[1]
private static void logOldImpl(Level level, String message, Throwable throwable){
if (LOG_TO_SYSTEM_OUT){
System.out.println(/*NlsIgnore*/"LOG: " + level + " -> " + message);
} else {
try {
if (ULCParams.hasULCParams()){
message = ((AVSystem)((WeakReference)ULCParams.currentULCParams().properties().get(AVSystem.PARAM_STRING)).get()).getReport().getFile().getURL().toString() + " - " + message;
}
} catch (Exception e){
message = /*NlsIgnore*/"no system - " + message;
}
getLogger().log(level, message, throwable);
}

if (throwable != null){
throwable.printStackTrace();
}
}

Jesper Wilhelmsson

unread,
Oct 14, 2023, 6:41:19 PM10/14/23
to Reto Merz, dis...@openjdk.org
Hi Reto,

If you think you have found a bug then please do report it through bugreport.java.com. Provide as much relevant info as you possibly can. A reproducer is much appreciated. You can find more information about what info to provide here: https://openjdk.org/guide/#filing-an-issue

Thanks,
/Jesper
signature.asc

Reto Merz

unread,
Oct 16, 2023, 8:57:49 AM10/16/23
to Jesper Wilhelmsson, David Griffiths, Douglas Simon, dis...@openjdk.org
Hello,

Thanks Douglas Simon, David Griffiths and Jesper Wilhelmsson for your time, feedback and suggestions.

I was able to create a simple reproducer [1] which cause the crash dump [2]
very often after a few seconds. Sometimes 2-3 attempts are needed.

The problem is still only reproducible with Linux OS, not Windows.
I suspect that the problem is related to the used ReentrantLock.

As I expected, the problem is not related to Adoptium/Temurin build.
It is also reproducible with latest Oracle 17 LTS build ([3]).

So I have reported it via bugreport.java.com (internal review ID: 9076126)
I think "adoptium-support" ([4]) would not be the right place for that sort of bug report.

If I receive a public JDK issues link, I will post it here.

Regards

Thanks
Reto

[1]
https://github.com/retomerz/pasetbin/blob/main/Reproducer.java

[2]
https://github.com/retomerz/pasetbin/blob/main/hs_err_pid113346.log

[3]
IMPLEMENTOR="Oracle Corporation"
JAVA_RUNTIME_VERSION="17.0.8+9-LTS-211"
JAVA_VERSION="17.0.8"
JAVA_VERSION_DATE="2023-07-18"
LIBC="gnu"
MODULES="java.base [...]"
OS_ARCH="x86_64"
OS_NAME="Linux"
SOURCE=".:git:3495b01a06c1 open:git:66f469c5cf06"

[4]
https://github.com/adoptium/adoptium-support/issues


On 15 Oct 2023, at 00:41, Jesper Wilhelmsson <mailto:jesper.wi...@oracle.com> wrote:

Hi Reto,

If you think you have found a bug then please do report it through bugreport.java.com. Provide as much relevant info as you possibly can. A reproducer is much appreciated. You can find more information about what info to provide here: https://openjdk.org/guide/#filing-an-issue

Thanks,
/Jesper


Volker Simonis

unread,
Oct 16, 2023, 10:01:45 AM10/16/23
to Reto Merz, Jesper Wilhelmsson, David Griffiths, Douglas Simon, dis...@openjdk.org
Hi Reto,

Thanks a lot for the reproducer!

This seems to be a C1 issue and it looks like it was fixed in JDK 21
(i.e. I could easily reproduce it with JDK 17 & 20 but not with 21).
If we're lucky it was a simple fix which can easily be downported.

Best regards,
Volker

Tobias Hartmann

unread,
Oct 16, 2023, 10:37:52 AM10/16/23
to Volker Simonis, Reto Merz, Jesper Wilhelmsson, David Griffiths, Douglas Simon, dis...@openjdk.org
I think it's: https://bugs.openjdk.org/browse/JDK-8310126

Verifying ...

Best regards,
Tobias

Tobias Hartmann

unread,
Oct 16, 2023, 10:40:50 AM10/16/23
to Volker Simonis, Reto Merz, Jesper Wilhelmsson, David Griffiths, Douglas Simon, dis...@openjdk.org
Confirmed. The issues was fixed in JDK 17.0.9, JDK 21 b29 and JDK 22 b12.

Best regards,
Tobias

Volker Simonis

unread,
Oct 16, 2023, 11:19:09 AM10/16/23
to Tobias Hartmann, Reto Merz, Jesper Wilhelmsson, David Griffiths, Douglas Simon, dis...@openjdk.org
Exactly, that was the issue!

Thanks, Tobias.

Reto Merz

unread,
Oct 18, 2023, 12:03:56 PM10/18/23
to Tobias Hartmann, Volker Simonis, Jesper Wilhelmsson, David Griffiths, Douglas Simon, dis...@openjdk.org
Thank you very much for verification and confirmation!

Regards

Reto
Reply all
Reply to author
Forward
0 new messages