Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8345970

pthread_getcpuclockid related crashes in shenandoah tests

XMLWordPrintable

    • gc
    • b03
    • x86_64, aarch64
    • linux, linux_alpine

        We see recently a few of similar crashes ; mostly in shenandoah jtreg jdk24 tests. Those crashes are seen recently on Alpine Linux.
        Since 30th Nov 2024 we observed the crashes here (hs jtreg tests)
        gc/shenandoah/TestEvilSyncBug.java#generational 3 times
        gc/shenandoah/oom/TestClassLoaderLeak.java 2 times

        Maybe shenandoah calls more into pthread_getcpuclockid, and sometimes we call it on "bad" (already terminated?) threads.
        Looks like Alpine is even more sensitive to this and pthread_getcpuclockid crashes on such threads?
        Can we add a little check or assert for 'good' threads ?

        Example :
        # SIGSEGV (0xb) at pc=0x00007fd79548e234, pid=24021, tid=24114
        #
        # JRE version: OpenJDK Runtime Environment (24.0) (fastdebug build 24-internal-adhoc.jenkinsi.jdk)
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 24-internal-adhoc.jenkinsi.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, shenandoah gc, linux-amd64)
        # Problematic frame:
        # C [ld-musl-x86_64.so.1+0x56234] pthread_getcpuclockid+0x0

        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        C [ld-musl-x86_64.so.1+0x56234] pthread_getcpuclockid+0x0
        V [libjvm.so+0x1889bf4] ThreadTimeAccumulator::do_thread(Thread*)+0x14 (shenandoahMmuTracker.cpp:51)
        V [libjvm.so+0x18890c0] ShenandoahMmuTracker::fetch_cpu_times(double&, double&)+0x50 (shenandoahMmuTracker.cpp:76)
        V [libjvm.so+0x18895ce] ShenandoahMmuTracker::record_young(unsigned long)+0x6e (shenandoahMmuTracker.cpp:100)
        V [libjvm.so+0x17db715] ShenandoahGenerationalControlThread::service_concurrent_cycle(ShenandoahHeap*, ShenandoahGeneration*, GCCause::Cause&, bool)+0x1e5 (shenandoahGenerationalControlThread.cpp:618)
        V [libjvm.so+0x17dc0c8] ShenandoahGenerationalControlThread::service_concurrent_normal_cycle(ShenandoahGenerationalHeap*, ShenandoahGenerationType, GCCause::Cause)+0x128 (shenandoahGenerationalControlThread.cpp:581)
        V [libjvm.so+0x17dcde2] ShenandoahGenerationalControlThread::run_service()+0x642 (shenandoahGenerationalControlThread.cpp:229)
        V [libjvm.so+0xabca5b] ConcurrentGCThread::run()+0x1b (concurrentGCThread.cpp:48)
        V [libjvm.so+0x1a8b2d6] Thread::call_run()+0xb6 (thread.cpp:232)
        V [libjvm.so+0x15aa58a] thread_native_entry(Thread*)+0x17a (os_linux.cpp:849)

        siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x00007fd7792b8b68

              wkemper William Kemper
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: