APAR status
Closed as program error.
Error description
A MQ classes for JMS application is running inside WebSphere Liberty Profile, consuming messages from an MQ queue, over a queue manager channel which is configured to use channel compression using the 'ZLIBFAST' compression algorithm. Occasionally a message is not consumed, and the JMS application receives an exception of the form: Message : com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195 Class : class com.ibm.mq.jmqi.JmqiException Stack : com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetMessageWithProps(Rem oteFAP.java:8835) com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternalWithRecon(Re moteFAP.java:6136) com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternal(RemoteFAP.j ava:6010) com.ibm.mq.jmqi.internal.JmqiTools.getMessage(JmqiTools.java:137 1) com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGet(RemoteFAP.java:5975 ) com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiGet(InterceptedJmqiI mpl.java:1341) com.ibm.mq.ese.jmqi.ESEJMQI.jmqiGet(ESEJMQI.java:602) com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQCons umerShadow.java:1795) com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInt ernal(WMQSyncConsumerShadow.java:228) com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQCon sumerShadow.java:1461) com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMe ssageConsumer.java:674) com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveIn boundMessage(JmsMessageConsumerImpl.java:1051) com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(J msMessageConsumerImpl.java:667) com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java: 209) com.ibm.mq.connector.outbound.MessageConsumerWrapper.receive(Mes sageConsumerWrapper.java:306) myApplication.myMethod(MyApplication.java:100)
Local fix
Disable channel compression.
Problem summary
**************************************************************** USERS AFFECTED: Users of the IBM MQ classes for Java/JMS APIs which are consuming messages over a CLIENT transport connection to the queue manager, where both the IBM MQ classes for Java/JMS and the queue manager channel is been configured to use channel compression, using the compression algorithms: RLE ZLIBFAST ZLIBHIGH to compress data which is transmitted over TCP/IP. To trigger the problem, the size of the message needs to be in the region of 32KB or larger, and the issue is more regularly seen with a low latency network connection between the client application and queue manager. Platforms affected: MultiPlatform **************************************************************** PROBLEM DESCRIPTION: The IBM MQ classes for Java and JMS can be configured to compress message data which is transmitted between a queue manager and the client system when using a CLIENT transport connection. This is done by configuring the SVRCONN channel with the message compression options, for example: ALTER CHANNEL(MY.CHANNEL) CHLTYPE(SVRCONN) COMPMSG(RLE,ZLIBFAST,ZLIBHIGH) and then requesting a specific channel compression algorithm in the client application, for example with the MQ classes for JMS API by using the syntax: Collection msgCompressionCollection = new Vector(); msgCompressionCollection.add(new Integer(WMQConstants.WMQ_COMPMSG_ZLIBFAST)); mqConnectionFactory.setMsgCompList(msgCompressionCollection); When specifying the use of channel compression (using any of the three compression types), exceptions would be thrown by the MQ classes for Java/JMS API to indicate that the consume of the message (or subsequent API calls) had failed. The precise form of the exception would vary quite significantly. Some examples included: EXAMPLE 1: com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ2002: Failed to get a message from destination 'MYQUEUE'. IBM MQ classes for JMS attempted to perform an MQGET; however IBM MQ reported an error. Use the linked exception to determine the cause of this error. at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException( Reason.java:595) at com.ibm.msg.client.wmq.common.internal.Reason.createException(Re ason.java:215) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCall Success(WMQMessageConsumer.java:222) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCall Success(WMQMessageConsumer.java:156) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQCons umerShadow.java:1858) at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInt ernal(WMQSyncConsumerShadow.java:228) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQCon sumerShadow.java:1461) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMe ssageConsumer.java:674) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveIn boundMessage(JmsMessageConsumerImpl.java:1051) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveNo Wait(JmsMessageConsumerImpl.java:725) at com.ibm.mq.jms.MQMessageConsumer.receiveNoWait(MQMessageConsumer .java:231) at MyApplication.myMethod Caused by: com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2195' ('MQRC_UNEXPECTED_ERROR'). at com.ibm.msg.client.wmq.common.internal.Reason.createException(Re ason.java:203) ... 12 more Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195 at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetMessageWithProps(Rem oteFAP.java:8817) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternalWithRecon(Re moteFAP.java:6118) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternal(RemoteFAP.j ava:5992) at com.ibm.mq.jmqi.internal.JmqiTools.getMessage(JmqiTools.java:137 1) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGet(RemoteFAP.java:5957 ) at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiGet(InterceptedJmqiI mpl.java:1341) at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiGet(ESEJMQI.java:602) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQCons umerShadow.java:1795) ... 9 more EXAMPLE 2: com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ2002: Failed to get a message from destination 'MYQUEUE'. IBM MQ classes for JMS attempted to perform an MQGET; however IBM MQ reported an error. Use the linked exception to determine the cause of this error. at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException( Reason.java:595) at com.ibm.msg.client.wmq.common.internal.Reason.createException(Re ason.java:215) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCall Success(WMQMessageConsumer.java:222) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCall Success(WMQMessageConsumer.java:156) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQCons umerShadow.java:1859) at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInt ernal(WMQSyncConsumerShadow.java:233) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQCon sumerShadow.java:1462) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMe ssageConsumer.java:674) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveIn boundMessage(JmsMessageConsumerImpl.java:1051) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveNo Wait(JmsMessageConsumerImpl.java:725) at com.ibm.mq.jms.MQMessageConsumer.receiveNoWait(MQMessageConsumer .java:231) at MyApplication.myMethod Caused by: com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2341' ('MQRC_UCS2_CONVERSION_ERROR'). at com.ibm.msg.client.wmq.common.internal.Reason.createException(Re ason.java:203) ... 12 more Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2341;AMQ6051: Conversion length error. [1=1208 (UTF8),2=1200 (UCS2)] at com.ibm.mq.jmqi.internal.JmqiDC.convUtf8Utf16(JmqiDC.java:315) at com.ibm.mq.jmqi.internal.JmqiDC.readField(JmqiDC.java:1031) at com.ibm.mq.jmqi.MQMD.readFromBuffer(MQMD.java:1395) at com.ibm.mq.jmqi.MQMD.readFromBuffer(MQMD.java:1261) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetMessageWithProps(Rem oteFAP.java:8773) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternalWithRecon(Re moteFAP.java:6141) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternal(RemoteFAP.j ava:6013) at com.ibm.mq.jmqi.internal.JmqiTools.getMessage(JmqiTools.java:137 1) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGet(RemoteFAP.java:5976 ) at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiGet(InterceptedJmqiI mpl.java:1341) at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiGet(ESEJMQI.java:602) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQCons umerShadow.java:1796) ... 9 more EXAMPLE 3: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1866295358 at java.lang.System.arraycopy(Native Method) at com.ibm.mq.jmqi.remote.impl.RemoteSession.receiveSpannedMQIData( RemoteSession.java:1631) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetMessageWithProps(Rem oteFAP.java:8811) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternalWithRecon(Re moteFAP.java:6141) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternal(RemoteFAP.j ava:6013) at com.ibm.mq.jmqi.internal.JmqiTools.getMessage(JmqiTools.java:137 1) at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGet(RemoteFAP.java:5976 ) at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiGet(InterceptedJmqiI mpl.java:1341) at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiGet(ESEJMQI.java:602) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQCons umerShadow.java:1796) at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInt ernal(WMQSyncConsumerShadow.java:233) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQCon sumerShadow.java:1462) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMe ssageConsumer.java:674) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveIn boundMessage(JmsMessageConsumerImpl.java:1051) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveNo Wait(JmsMessageConsumerImpl.java:725) at com.ibm.mq.jms.MQMessageConsumer.receiveNoWait(MQMessageConsumer .java:231) at MyApplication.myMethod In some cases it was found that all subsequent MQ API calls made over the connection which had the failed received call would subsequently fail, for example opening a queue with an MQOPEN call, and the connection would have to be closed and re-established to continue successfully making MQ API calls. This issue was only seen when the amount of data contained within the MQ message was in the region of, or exceeded 32KB worth of data. Data transmitted over TCP/IP between a queue manager and a MQ classes for Java/JMS application is chunked up into near 32KB packets. For example, if a MQ message had a size of 40KB, and the application issued the MQ API call: MQGET the message would be transmitted over TCP/IP in two packets, reassembled by the MQ API, processed and passed back to the application. When communicating over a queue manager channel which had a value of SHARECNV greater than 0, one thread receives the data over TCP/IP, and then passes the data to the application thread to reassemble the message data. If channel compression was in operation, there was a timing condition where the data which had been passed to the application thread to assemble would be overwritten by the second (or subsequent) packets, leading to a number of failure scenarios. This issue would only be encountered if the message data was broken into multiple MQ packets for transmission over TCP/IP. If all the message data (prior to message compression) could fit into a single MQ packet, the issue would not be encountered.
Problem conclusion
The MQ classes for Java and classes for JMS have been updated to make the code thread safe when receiving multiple MQ packets for a single MQ message over a compressed channel. --------------------------------------------------------------- The fix is targeted for delivery in the following PTFs: Version Maintenance Level v9.3 LTS 9.3.0.5 v9.x CD 9.3.2 The latest available maintenance can be obtained from 'WebSphere MQ Recommended Fixes' http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037 If the maintenance level is not yet available information on its planned availability can be found in 'WebSphere MQ Planned Maintenance Release Dates' http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309 ---------------------------------------------------------------
Temporary fix
Comments
APAR Information
APAR number
IT42435
Reported component name
MQ BASE V9.3
Reported component ID
5724H7291
Reported release
930
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2022-11-10
Closed date
2022-11-10
Last modified date
2022-11-10
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
MQ BASE V9.3
Fixed component ID
5724H7291
Applicable component levels
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.3","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
11 November 2022