APAR status
Closed as program error.
Error description
Error Message: A SIG_SEGV is received when executing an array-copy in StringBuffer.append(). . Stack Trace: {libj9jit29.so}{__codeForShortArrayCopy} {libj9jit29.so}{__arrayCopy} {libj9jit29.so}{__arrayCopy_dp} {java/lang/StringBuffer.append} JIT {org/apache/log4j/helpers/PatternParser$LiteralPatternConverter. format} JIT {org/apache/log4j/WriterAppender.subAppend} JIT {org/apache/log4j/Category.forcedLog} JIT The StringBuffer.append() is likely going to be on the stack and arrayCopy() JIT helper routines will be at the top of the stack. . This problem can only occur on systems where the architecture employs weak memory coherency. This mean POWER or AArch64. The issue can not occur on x86 or IBM-Z for example. The problem is extremely intermittent since the timing window is very small and it can only occur when new objects are exposed to more then one thread without some barrier like synchronization or the use of volatile fields.
Local fix
The problem can be avoided by preventing the JIT from compiling the StringBuffer/StringBuilder methods. This will have some affect on performance but the extent of that effect depends on how important the performance of StringBuffer/StringBuilder methods are to the overall performance of the application. -Xjit:exclude={*/StringBuffer.*<PIPE>*/StringBuilder.*},dontInli ne={*/StringBuffer.*<PIPE>*/StringBuilder.*}
Problem summary
The JIT compiler is removing NULL-CHECKS from StringBuffer/StringBuilder methods which can in rare cases result in a crash if the java application is exposing new object instances to other threads without using something to enforce store ordering on systems with weak memory coherency.
Problem conclusion
The JIT was modified so that a store-store barrier is added after running the constructor of StringBuffer/StringBuilder objects on systems with weak memory coherency. . This APAR will be fixed in the following Releases: . IBM Semeru Runtimes 11 11.0.24.0 17 17.0.12.0 IBM SDK, Java Technology Edition 8 SR - (8.0.-.0) . Downloads and supplementary documentation can be found at the following locations: - For non z/OS operating systems: - IBM Semeru Runtimes, Version 11 and later https://www.ibm.com/semeru-runtimes/downloads/ - IBM SDK, Java Technology Edition, Version 8 https://www.ibm.com/support/pages/java-sdk-downloads/ - For the z/OS operating system: - Java SDK Products on z/OS https://www.ibm.com/support/pages/java-sdk-products-zos
Temporary fix
Comments
APAR Information
APAR number
IJ50878
Reported component name
JIT
Reported component ID
620700124
Reported release
130
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2024-04-16
Closed date
2024-04-16
Last modified date
2024-04-16
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
JIT
Fixed component ID
620700124
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":"130","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]
Document Information
Modified date:
17 April 2024