ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexGeneral IBM MQ SupportBuffer is null in ImportMQMDMesageBuffer, causes crash

Post new topicReply to topic
Buffer is null in ImportMQMDMesageBuffer, causes crash View previous topic :: View next topic
Author Message
dudetom
PostPosted: Thu Jan 10, 2019 2:53 am Post subject: Buffer is null in ImportMQMDMesageBuffer, causes crash Reply with quote

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
View user's profile Send private message
dudetom
PostPosted: Thu Jan 10, 2019 7:47 am Post subject: Reply with quote

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
View user's profile Send private message
hughson
PostPosted: Thu Jan 10, 2019 2:05 pm Post subject: Reply with quote

Grand Master

Joined: 09 May 2013
Posts: 1076
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
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportBuffer is null in ImportMQMDMesageBuffer, causes crash
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.