SIGSEGV caused by compiled Java code

Reto Merz reto.merz at abacus.ch
Mon Oct 16 12:57:16 UTC 2023


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.wilhelmsson at 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


On 14 Oct 2023, at 19:12, Reto Merz <mailto:reto.merz at abacus.ch> wrote:

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();
   }
}



More information about the discuss mailing list