SIGSEGV caused by compiled Java code

Volker Simonis volker.simonis at gmail.com
Mon Oct 16 15:18:33 UTC 2023


Exactly, that was the issue!

Thanks, Tobias.

On Mon, Oct 16, 2023 at 4:39 PM Tobias Hartmann
<tobias.hartmann at oracle.com> wrote:
>
> Confirmed. The issues was fixed in JDK 17.0.9, JDK 21 b29 and JDK 22 b12.
>
> Best regards,
> Tobias
>
> On 16.10.23 16:37, Tobias Hartmann wrote:
> > I think it's: https://bugs.openjdk.org/browse/JDK-8310126
> >
> > Verifying ...
> >
> > Best regards,
> > Tobias
> >
> > On 16.10.23 16:01, Volker Simonis wrote:
> >> 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
> >>
> >>
> >> On Mon, Oct 16, 2023 at 2:57 PM Reto Merz <reto.merz at abacus.ch> wrote:
> >>>
> >>> 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