java

JDK 21.0.4 Release Notes

Java SE 21.0.4 Bundled Patch Release (BPR) - Bug Fixes and Updates

The following sections summarize changes made in all Java SE 21.0.4 BPR. Bug fixes and any other changes are listed below in date order, most current BPR first. Note that bug fixes in the previous BPR are also included in the current BPR.

 

Changes in Java SE 21.0.4.0.2

Bug Fixes

Release date: August 16, 2024
BugId Category Subcategory Summary
JDK-8336107 (not public) install JDK rpm upgrade from 11.0.23 to 11.0.25 leaves "orphan" alternatives entry

 

Changes in Java SE 21.0.4.0.1

Bug Fixes

Release date: July 16, 2024
BugId Category Subcategory Summary
JDK-8322726 hotspot compiler C2: Unloaded signature class kills argument value
JDK-8331885 hotspot compiler C2: meet between unloaded and speculative types is not symmetric

Java™ SE Development Kit 21.0.4 (JDK 21.0.4)

Release date: July 16, 2024

The full version string for this update release is 21.0.4+8 (where "+" means "build"). The version number is 21.0.4.

 

IANA TZ Data 2024a

For more information, refer to Timezone Data Versions in the JRE Software.

 

Security Baselines

The security baselines for the Java Runtime at the time of the release of JDK 21.0.4 are specified in the following table:

Java Family Version Security Baseline (Full Version String)
2121.0.4+8
1717.0.12+8
1111.0.24+7
88u421-b09

 

Keeping the JDK up to Date

Oracle recommends that the JDK is updated with each Critical Patch Update. In order to determine if a release is the latest, the Security Baseline page can be used to determine which is the latest version for each release family.

Critical patch updates, which contain security vulnerability fixes, are announced one year in advance on Critical Patch Updates, Security Alerts and Bulletins. It is not recommended that this JDK (version 21.0.4) be used after the next critical patch update scheduled for October 15, 2024.

Java Management Service, available to all users, can help you find vulnerable Java versions in your systems. Java SE Subscribers and customers running in Oracle Cloud can use Java Management Service to update Java Runtimes and to do further security reviews like identifying potentially vulnerable third party libraries used by your Java programs. Existing Java Management Service user click here to log in to your dashboard. The Java Management Service Documentation provides a list of features available to everyone and those available only to customers. Learn more about using Java Management Service to monitor and secure your Java Installations.

 

New Features

security-libs/java.security
 New Security Category for -XshowSettings Launcher Option (JDK-8281658)

The -XshowSettings launcher has a new security category. Settings from security properties, security providers and TLS related settings are displayed with this option. A security sub-category can be passed as an argument to the security category option. See the output from java -X:

   -XshowSettings:security

       show all security settings and continue
   -XshowSettings:security:*sub-category*
       show settings for the specified security sub-category and continue. Possible *sub-category* arguments for this option include:
       all: show all security settings and continue
       properties: show security properties and continue
       providers: show static security provider settings and continue
       tls: show TLS related security settings and continue

Third party security provider details will be reported if they are included in the application class path or module path and such providers are configured in the java.security file.

hotspot/gc
 G1: Balance Code Root Scan Phase During Garbage Collection (JDK-8315503)

The Code Root Scan Phase during garbage collection finds references to Java objects in compiled code. To speed up this process, G1 maintains a remembered set for compiled code that contains references into the Java heap. That is, every region contains a set of compiled code that contains references into it.

Assuming that such references are few, previous code used a single thread per region to iterate over a particular region's references, which poses a scalability bottleneck if the distribution of these references is very unbalanced.

G1 now distributes this code root scan work across multiple threads within regions, removing this bottleneck.

hotspot/gc
 Parallel: Precise Parallel Scanning of Large Object Arrays for Young Collection Roots (JDK-8310031)

During a young collection, ParallelGC partitions the old generation into 64kB stripes when scanning it for references into the young generation. These stripes are assigned to worker threads that do the scanning in parallel as work units.

Before this change, Parallel GC always scanned these stripes completely even if only a small part had been known to contain interesting references. Additionally, every worker thread processed the objects that start in that stripe by itself, including parts of objects that extend into other stripes. This behavior limited parallelism when processing large objects. A single large object, potentially containing thousands of references, had been scanned by a single thread only and in full. This would cause bad scaling due to memory sharing and cache misses in the subsequent long, work stealing phase.

With this change, Parallel GC workers limit work to their stripe and only process interesting parts of large object arrays. This reduces the work done by a single thread for a stripe, improves parallelism, and reduces the amount of work stealing. Parallel GC pauses are now on par with G1 in presence of large object arrays, reducing pause times by 4-5 times in some cases.

 

Notable Issues Fixed

tools/jpackage
 jpackage May Produce an Inaccurate List of Required Packages on Debian Linux Distros (JDK-8295111)

Fixed an issue on Debian Linux distros where jpackage could not always build an accurate list of required packages from shared libraries with symbolic links in their paths, causing installations to fail due to missing shared libraries.

 

Removed Features and Options

install/install
 Remove Obsolete Desktop Integration from Linux Installers (JDK-8322234 (not public))

Delete nonfunctional desktop integration functionality from Linux installers. The installers will stop depositing files in /usr/share/icons, /usr/share/mime, and /usr/share/applications subtrees.

 

Other Notes

security-libs/java.security
 Added GlobalSign R46 and E46 Root CA Certificates (JDK-8316138)

The following root certificates have been added to the cacerts truststore:

+ GlobalSign

  + globalsignr46
    DN: CN=GlobalSign Root R46, O=GlobalSign nv-sa, C=BE

+ GlobalSign
  + globalsigne46
    DN: CN=GlobalSign Root E46, O=GlobalSign nv-sa, C=BE

infrastructure/build
 Native Executables and Libraries on Linux Use RPATH Instead of RUNPATH (JDK-8326891)

Native executables and libraries on Linux have switched to using RPATH instead of RUNPATH in this release.

JDK native executables and libraries use embedded runtime search paths to locate other internal JDK native libraries. On Linux these can be defined as either RPATH or RUNPATH. The main difference is that the dynamic linker considers RPATH before the LD_LIBRARY_PATH environment variable, while RUNPATH is only considered after LD_LIBRARY_PATH.

By making the change to using RPATH, it is no longer possible to replace JDK internal native libraries using LD_LIBRARY_PATH.

install/install
 Install DEB and RPM Java Packages in Version Directory (JDK-8325265 (not public))

The installation directory name of the Oracle JDK in RPM and DEB packages has changed from /usr/lib/jvm/jdk-${FEATURE}-oracle-${ARCH} to /usr/lib/jvm/jdk-${VERSION}-oracle-${ARCH}.

Every update release will be installed in a separate directory on Linux platform.

Installers will create a /usr/java/jdk-${FEATURE}-oracle-${ARCH} link pointing to the installation directory to allow programs to find the latest JDK version in the ${FEATURE} release train.

 

Updates to Third Party Libraries

Library New Version Module JBS
LCMS 2.16 java.desktop JDK-8321489
Zlib Data Compression Library 1.3.1 java.base JDK-8324632

 

Bug Fixes

This release also contains fixes for security vulnerabilities described in the Oracle Critical Patch Update.

Issues fixed in 21.0.4:
# JBS Component/Subcomponent Summary
1JDK-8318854client-libs/java.awt[macos14] Running any AWT app prints Secure coding warning
2JDK-8317771client-libs/javax.accessibility[macos14] Expand/collapse a JTree using keyboard freezes the application in macOS 14 Sonoma
3JDK-8322239client-libs/javax.swing[macos] a11y : java.lang.NullPointerException is thrown when focus is moved on the JTabbedPane
4JDK-8187759client-libs/javax.swingBackground not refreshed when painting over a transparent JFrame
5JDK-8320692client-libs/javax.swingNull icon returned for .exe without custom icon
6JDK-8324858core-libs[vectorapi] Bounds checking issues when accessing memory segments
7JDK-8315373core-libs/java.langChange VirtualThread to unmount after freezing, re-mount before thawing
8JDK-8322846core-libs/java.langRunning with -Djdk.tracePinnedThreads set can hang
9JDK-8322818core-libs/java.langThread::getStackTrace can fail with InternalError if virtual thread is timed-parked when pinned
10JDK-8321270core-libs/java.langVirtual Thread.yield consumes parking permit
11JDK-8312498core-libs/java.langThread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked
12JDK-8320570core-libs/java.langNegativeArraySizeException decoding >1G UTF8 bytes with non-ascii characters
13JDK-8306040core-libs/java.netHttpResponseInputStream.available() returns 1 on empty stream
14JDK-8318599core-libs/java.netHttpURLConnection cache issues leading to crashes in JGSS w/ native GSS introduced by 8303809
15JDK-8318322core-libs/java.util:i18nUpdate IANA Language Subtag Registry to Version 2023-10-16
16JDK-8327631core-libs/java.util:i18nUpdate IANA Language Subtag Registry to Version 2024-03-07
17JDK-8313702core-libs/java.util:i18nUpdate IANA Language Subtag Registry to Version 2023-08-02
18JDK-8325672hotspot/compilerC2: allocate PhaseIdealLoop::_loop_or_ctrl from C->comp_arena()
19JDK-8323065hotspot/compilerUnneccesary CodeBlob lookup in CompiledIC::internal_set_ic_destination
20JDK-8320206hotspot/compilerSome intrinsics/stubs missing vzeroupper on x86_64
21JDK-8316670hotspot/compilerRemove effectively unused nmethodBucket::_count
22JDK-8317235hotspot/compilerRemove Access API use in nmethod class
23JDK-8316669hotspot/compilerImmutableOopMapSet destructor not called
24JDK-8317677hotspot/compilerSpecialize Vtablestubs::entry_for() for VtableBlob
25JDK-8293069hotspot/compilerMake -XX:+Verbose less verbose
26JDK-8316959hotspot/compilerImprove InlineCacheBuffer pending queue management
27JDK-8314220hotspot/compilerConfigurable InlineCacheBuffer size
28JDK-8324050hotspot/compilerIssue store-store barrier after re-materializing objects during deoptimization
29JDK-8326638hotspot/compilerCrash in PhaseIdealLoop::remix_address_expressions due to unexpected Region instead of Loop
30JDK-8328165hotspot/compilerimprove assert(idx < _maxlrg) failed: oob
31JDK-8325432hotspot/compilerenhance assert message "relocation addr must be in this section"
32JDK-8313899hotspot/compilerJVMCI exception Translation can fail in TranslatedException.<clinit>
33JDK-8328702hotspot/compilerC2: Crash during parsing because sub type check is not folded
34JDK-8317809hotspot/compilerInsertion of free code blobs into code cache can be very slow during class unloading
35JDK-8324817hotspot/gcParallel GC does not pre-touch all heap pages when AlwaysPreTouch enabled and large page disabled
36JDK-8315605hotspot/gcG1: Add number of nmethods in code roots scanning statistics
37JDK-8317350hotspot/gcMove code cache purging out of CodeCache::UnloadingScope
38JDK-8318585hotspot/gcRename CodeCache::UnloadingScope to UnlinkingScope
39JDK-8318720hotspot/gcG1: Memory leak in G1CodeRootSet after JDK-8315503
40JDK-8317007hotspot/gcAdd bulk removal of dead nmethods during class unloading
41JDK-8288936hotspot/jfrWrong lock ordering writing G1HeapRegionTypeChange JFR event
42JDK-8326106hotspot/jfrWrite and clear stack trace table outside of safepoint
43JDK-8312777hotspot/jvmtinotifyJvmtiMount before notifyJvmtiUnmount
44JDK-8322282hotspot/runtimeIncorrect LoaderConstraintTable::add_entry after JDK-8298468
45JDK-8316132hotspot/runtimeCDSProtectionDomain::get_shared_protection_domain should check for exception
46JDK-8319137hotspot/runtimerelease _object in ObjectMonitor dtor to avoid races
47JDK-8324514hotspot/runtimeClassLoaderData::print_on should print address of class loader
48JDK-8320275hotspot/runtimeassert(_chunk->bitmap().at(index)) failed: Bit not set at index
49JDK-8323595hotspot/runtimeis_aligned(p, alignof(OopT))) assertion fails in Jetty without compressed OOPs
50JDK-8320515hotspot/runtimeassert(monitor->object_peek() != nullptr) failed: Owned monitors should not have a dead object
51JDK-8319896hotspot/runtimeRemove monitor deflation from final audit
52JDK-8325437hotspot/runtimeSafepoint polling in monitor deflation can cause massive logs
53JDK-8316002hotspot/runtimeRemove unnecessary seen_dead_loader in ClassLoaderDataGraph::do_unloading
54JDK-8315998hotspot/runtimeRemove dead ClassLoaderDataGraphKlassIteratorStatic
55JDK-8319955hotspot/runtimeImprove dependencies removal during class unloading
56JDK-8324824hotspot/runtimeAArch64: Detect Ampere-1B core and update default options for Ampere CPUs
57JDK-8327036hotspot/runtime[macosx-aarch64] SIGBUS in MarkActivationClosure::do_code_blob reached from Unsafe_CopySwapMemory0
58JDK-8322783hotspot/runtimeprioritize /etc/os-release over /etc/SuSE-release in hs_err/info output
59JDK-8319048hotspot/runtimeMonitor deflation unlink phase prolongs time to safepoint
60JDK-8315559hotspot/runtimeDelay TempSymbol cleanup to avoid symbol table churn
61JDK-8324933hotspot/runtimeConcurrentHashTable::statistics_calculate synchronization is expensive
62JDK-8326643security-libs/java.securityJDK server does not send a dummy change_cipher_spec record after HelloRetryRequest message
63JDK-8312383security-libs/javax.net.sslLog X509ExtendedKeyManager implementation class name in TLS/SSL connection
64JDK-8294699tools/jpackageLauncher causes lingering busy cursor
65JDK-8325203tools/jpackageSystem.exit(0) kills the launched 3rd party application