APAR status
Closed as program error.
Error description
Error Message: If more than one thread has a reference to the same HybridCipher instance it's possible for the "theCipher" field to be set to a non-null value just after it is set to null in getBestInstance(). This can lead to an endless loop. . Stack Trace: Loop occurs like this: +258 aconstnull <<< +240 <HAT>+312 <HAT>+505 +259 aload0getfield +260 getfield 185 com/ibm/crypto/ibmjcehybrid/provider/HybridCipher.theCipher (Ljavax/crypto/Cipher;) +263 ifacmpne C>> +508 +266 aconstnull +267 aload0getfield +268 getfield 141 com/ibm/crypto/ibmjcehybrid/provider/HybridCipher.theProvider (Ljava/lang/String;) +271 ifacmpeq C>> +508 +274 getstatic 159 com/ibm/crypto/ibmjcehybrid/provider/HybridCipher.debug (Lcom/ibm/misc/Debug;) +277 ifnull C>> +295 +280 getstatic 159 com/ibm/crypto/ibmjcehybrid/provider/HybridCipher.debug (Lcom/ibm/misc/Debug;) +283 ldc2lw 283 (long) 0x0000000000004000 +286 ldc 1 (java.lang.String) "com.ibm.crypto.ibmjcehybrid.provider.HybridCipher" +288 ldc 111 (java.lang.String) "getBestInstance" +290 ldc 117 (java.lang.String) "Top of loop 2" +292 invokevirtual 174 {com/ibm/misc/Debug.text(JLjava/lang/Object;Ljava/lang/String;Lj ava/lang/String;)V} +295 aload0 <<< +277 +296 aload0getfield +297 getfield 140 com/ibm/crypto/ibmjcehybrid/provider/HybridCipher.cipherSpec (Ljava/lang/String;) +300 aload0getfield +301 getfield 141 com/ibm/crypto/ibmjcehybrid/provider/HybridCipher.theProvider (Ljava/lang/String;) +304 invokestatic 248 {javax/crypto/Cipher.getInstance(Ljava/lang/String;Ljava/lang/St ring;)Ljavax/crypto/Cipher;} +307 putfield 185 com/ibm/crypto/ibmjcehybrid/provider/HybridCipher.theCipher (Ljavax/crypto/Cipher;) +310 iconst0 +311 istore3 +312 goto U>> <HAT>+258 <----- Loop 2 back edge
Local fix
Run it again
Problem summary
If more than one thread has a reference to the same HybridCipher instance it's possible for the "theCipher" field to be set to a non-null value just after it is set to null in getBestInstance(). This can lead to an endless loop.
Problem conclusion
A change has been made where: After peeling apart the Java core we can see that notDone == True at the same time theCipher != null. Which should not be possible becuase they are set at the same time in this loop. Nested while loops will use a variable that is internal only to the class called(notDone) To avoid possibility of thread manipulating previous external variable (theCipher) . This APAR will be fixed in the following Releases: . IBM Semeru Runtimes IBM SDK, Java Technology Edition 8 SR8 FP35 (8.0.8.35) . Downloads and supplementary documentation can be found at the following locations: - For the z/OS operating system: - Java SDK Products on z/OS https://www.ibm.com/support/pages/java-sdk-products-zos
Temporary fix
Run it again
Comments
APAR Information
APAR number
PH63295
Reported component name
JAVA Z/OS 64
Reported component ID
620700104
Reported release
800
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2024-09-18
Closed date
2024-09-18
Last modified date
2025-01-17
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
JAVA Z/OS 64
Fixed component ID
620700104
Applicable component levels
[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"800","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]
Document Information
Modified date:
17 January 2025