[jdk11u-dev] RFR: 8214097: Rework thread initialization and teardown logic

SUN Guoyun duke at openjdk.org
Tue Dec 19 09:55:09 UTC 2023


runtime/InternalApi/ThreadCpuTimesDeadlock.java can trigger exception occasionally on jdk11u fastdebug, the reason is that when `fast_cpu_time(Thread *thread)` is called, a non-java-thread state is ALLOCATED, so set_osthread (osthread) or osthread ->set_pthread_id (tid) is not yet completed.

<pre>
14:13:40 #
14:13:40 # A fatal error has been detected by the Java Runtime Environment:
14:13:40 #
14:13:40 #  SIGSEGV (0xb) at pc=0x000000fff454e840, pid=954448, tid=954670
14:13:40 #
14:13:40 # JRE version: OpenJDK Runtime Environment ls-internal (11.0.22+6) (fastdebug build 11.0.22+6-1)
14:13:40 # Java VM: OpenJDK 64-Bit Server VM ls-internal (fastdebug 11.0.22+6-1, mixed mode, tiered, compressed oops, g1 gc, linux-loongarch64)
14:13:40 # Problematic frame:
14:13:40 # C  [libpthread.so.0+0x12840]  pthread_getcpuclockid+0x0
14:13:40 #
</pre>
so need backport this patch.
GHA and tier2-3 locally has finish, the failed items are not related to this patch.
<pre>
==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR   
   jtreg:test/hotspot/jtreg:tier2                      323   323     0     0   
>> jtreg:test/jdk:tier2                               3480  3478     2     0 <<
   jtreg:test/langtools:tier2                           11    11     0     0   
   jtreg:test/nashorn:tier2                             36    36     0     0   
>> jtreg:test/jaxp:tier2                               443    24   419     0 <<
==============================
==============================                                                  
Test summary                                                                    
==============================                                                  
   TEST                                              TOTAL  PASS  FAIL ERROR    
   jtreg:test/hotspot/jtreg:tier3                       48    48     0     0    
>> jtreg:test/jdk:tier3                               2114  2113     1     0 << 
   jtreg:test/langtools:tier3                            0     0     0     0    
   jtreg:test/nashorn:tier3                              0     0     0     0    
   jtreg:test/jaxp:tier3                                 0     0     0     0    
============================== 
</pre>

-------------

Commit messages:
 - Backport 526f854cc1ef8e88f9abd0b8eb38e418e77ff97e

Changes: https://git.openjdk.org/jdk11u-dev/pull/2411/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=2411&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8214097
  Stats: 192 lines in 8 files changed: 142 ins; 25 del; 25 mod
  Patch: https://git.openjdk.org/jdk11u-dev/pull/2411.diff
  Fetch: git fetch https://git.openjdk.org/jdk11u-dev.git pull/2411/head:pull/2411

PR: https://git.openjdk.org/jdk11u-dev/pull/2411


More information about the jdk-updates-dev mailing list