|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Buffer is null in ImportMQMDMesageBuffer, causes crash |
« View previous topic :: View next topic » |
Author |
Message
|
dudetom |
Posted: Thu Jan 10, 2019 2:53 am Post subject: Buffer is null in ImportMQMDMesageBuffer, causes crash |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
We are facing a difficult problem, I hope someone can give advice on how we can troubleshoot this.
We encounter following XMSException in our logging:
Code: |
IBM.XMS.XMSException: CWSMQ0282E: A null value has been used for argument BUFFER = <> NULL within method ImportMQMDMesageBuffer(WmqSession, WmqDestination, MQMD,byte[],int,int).
The preceding method detected an invalid null argument.
If necessary, recode the application to avoid the error condition.
at IBM.XMS.Client.WMQ.WmqReceiveMarshal.ImportMQMDMesageBuffer(MQMessageDescriptor mqmd, Byte[] buffer, Int32 dataStart, Int32 dataEnd)
at IBM.XMS.Client.WMQ.WmqAsyncConsumerShadow.Consumer(Phconn hconn, MQMessageDescriptor mqmd, MQGetMessageOptions mqgmo, Byte[] pBuffer, MQCBC mqcbc)
at IBM.WMQ.Nmqi.UnmanagedNmqiMQ.NmqiConsumerMethodUM(Int32 hconn, IntPtr structMqmd, IntPtr structMqgmo, IntPtr buffer, IntPtr structMqcbc) |
After this XMSException, the Windows Service crashes. The difficult part is that we can't reproduce this behavior on our dev environment. We are still troubleshooting, we couldn't find what's the root cause of this issue.
Below you can find information on how we make connection:
Used version: IBM.XMS 8.0.0.5
A connection is created this way:
Code: |
XMSFactoryFactory factory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
IConnectionFactory cf = factory.CreateConnectionFactory();
cf.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT_UNMANAGED);
cf.SetStringProperty(XMSC.WMQ_HOST_NAME, hostname);
cf.SetStringProperty(XMSC.WMQ_PORT, port);
cf.SetStringProperty(XMSC.WMQ_CHANNEL, channelname);
cf.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, qmname);
IConnection connection = cf.CreateConnection();
|
Session is created this way:
Quote: |
ISession session = connection.CreateSession(false, AcknowledgeMode.AutoAcknowledge); |
Destination is created this way:
Code: |
destination = session.CreateQueue("queuename");
destination.SetIntProperty(XMSC.WMQ_MESSAGE_BODY, XMSC.WMQ_MESSAGE_BODY_MQ);
destination.SetBooleanProperty(XMSC.WMQ_MQMD_WRITE_ENABLED, true);
destination.SetBooleanProperty(XMSC.WMQ_MQMD_READ_ENABLED, true); |
Listener is created this way:
Code: |
IMessageConsumer consumer = session.CreateConsumer(destination);
consumer.MessageListener = listenerDelegate; |
|
|
Back to top |
|
 |
dudetom |
Posted: Thu Jan 10, 2019 7:47 am Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
UPDATE
I'm able to reproduce this. If I send an empty message to the client application. then I receive the same XMSException.
So how can this be fixed? What would you expect IBM.XMS to do with such an empty message? Or in other words, how can I make the client application to not crash if this is happening? What I expect is that IBM.XMS should handle such empty messages on another way instead of throwing an XMSException which leads to a crash? |
|
Back to top |
|
 |
hughson |
Posted: Thu Jan 10, 2019 2:05 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
Raise a PMR with IBM - sounds like a defect to me.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|