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 Index » IBM MQ API Support » core dump in MQV 7 on linux RHEL5

Post new topic  Reply to topic
 core dump in MQV 7 on linux RHEL5 « View previous topic :: View next topic » 
Author Message
mquser01
PostPosted: Mon Aug 30, 2010 3:31 am    Post subject: core dump in MQV 7 on linux RHEL5 Reply with quote

Acolyte

Joined: 06 Mar 2008
Posts: 52

I am using MQV 7 on Linux RHEL 5.
It is giving core dump while connecting to queue manager using MQCONNX.
stack shows it gave core dump in
strncpy function from (libc.so.6)
in InitProcessInitialisation from (libmqmcs_r.so).
in pthread_once() from (libpthread.so.0)
in xcsInitialize() from (libmqmcs_r.so)
in zstMQCONNX() from (libmqz_r.so)
in MQCONNX() from (libmqm_r.so).

I have checked my code. But doesn't seem to have any problem.

In case any one have faced same problem please need your help.

Thanks and Regards,
Nithesh
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 30, 2010 3:39 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

can you post your code that builds the arguments to MQCONNX and then calls it, anyway?

Are you using C? If so, can you confirm that you have used an supported compiler to build the program? And that you have installed the correct levels of glibc for your RHEL 5 and MQ v7, per the MQ system requirements?
Back to top
View user's profile Send private message
mquser01
PostPosted: Mon Aug 30, 2010 4:01 am    Post subject: Reply with quote

Acolyte

Joined: 06 Mar 2008
Posts: 52

MQHCONN QueueManagerHandle;
MQHOBJ QueueManagerHandle;
MQLONG CompCode, ReasonCode;

MQCNO ConnectOptions = {MQCNO_DEFAULT};
MQCD ClientConn = {MQCD_CLIENT_CONN_DEFAULT};
ConnectOptions.Options |= MQCNO_HANDLE_SHARE_BLOCK;
ConnectOptions.Version = MQCNO_VERSION_2;

MQCONNX("QM", &ConnectOptions, &QueueManagerHandle, &CompCode,
&ReasonCode);

rest regarding the version.
its
Linus version 2.6.18-8.e15 (gcc version 4.1.1 20070105(Red Hat 4.1.1-52))

Regards
Nithesh
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Mon Aug 30, 2010 4:24 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

Maybe its because you are setting MQCNO version to 2, but not setting the ClientConnOffset &/or ClientConnPtr in that structure to point to the MQCD structure.

What is MQCD_CLIENT_CONN_DEFAULT, its not a standard MQ name?
_________________
Glenn
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Aug 30, 2010 5:15 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Quote:
What is MQCD_CLIENT_CONN_DEFAULT, its not a standard MQ name?

It is, actually; and is discussed in the v7 migration guide, and v6/v7 InfoCenter.
ftp://public.dhe.ibm.com/software/integration/wmq/docs/V7.0/csqzao03.pdf
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Aug 30, 2010 8:20 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

It's not in the pdf per se but is mentioned with using defaults vs using explicit values.

It is mentioned however in the infocenter See here

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mquser01
PostPosted: Mon Aug 30, 2010 10:28 pm    Post subject: Reply with quote

Acolyte

Joined: 06 Mar 2008
Posts: 52

will the change in options make any difference since unable to find what made it crash.

Regards
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 31, 2010 1:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It looks like it's crashing because you passed in a structure that had the wrong size and MQ tried to copy more data into a string than would fit.

At least, that's what I interpret a core dump coming from strncpy to mean.

Or, again, that you didn't properly assign a pointer in one of the structures, and so it is still at a null or incorrect value. That's what gbaddeley means.
Back to top
View user's profile Send private message
mquser01
PostPosted: Sun Sep 05, 2010 9:53 pm    Post subject: Reply with quote

Acolyte

Joined: 06 Mar 2008
Posts: 52

I have passed the right parameter i don't think any type mismatch is there.

And if that would have been the case then it should crash everytime i call the function, which is not the case.

Regards,
Back to top
View user's profile Send private message
rekarm01
PostPosted: Mon Sep 06, 2010 5:37 am    Post subject: Re: core dump in MQV 7 on linux RHEL5 Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

This topic belongs in the WebSphere MQ API Support forum.

mquser01 wrote:
MQHCONN QueueManagerHandle;
MQHOBJ QueueManagerHandle;

The compiler should have quit there. One of those declarations is wrong.

mquser01 wrote:
I have passed the right parameter i don't think any type mismatch is there.

Re-read this:
gbaddeley wrote:
Maybe its because you are setting MQCNO version to 2, but not setting the ClientConnOffset &/or ClientConnPtr in that structure to point to the MQCD structure.

Perhaps this would help:
Code:
ConnectOptions.ClientConnPtr = &ClientConn;

Otherwise, nothing is actually using the MQCD.

mquser01 wrote:
And if that would have been the case then it should crash everytime i call the function, which is not the case.

Not necessarily. C buffer overflows can cause unpredictable behavior.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Sep 06, 2010 6:03 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Moved to WebSphere MQ API Support forum.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mquser01
PostPosted: Mon Sep 06, 2010 8:21 pm    Post subject: Reply with quote

Acolyte

Joined: 06 Mar 2008
Posts: 52

ConnectOptions.ClientConnPtr = &ClientConn;

done the above change. but am not very sure that it will work . I personally feel
that for normal connection this structure ClientConn won't be used.

But since paramter is passed its the right way to do.

Regards
Back to top
View user's profile Send private message
mvic
PostPosted: Tue Sep 07, 2010 5:36 pm    Post subject: Re: core dump in MQV 7 on linux RHEL5 Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

mquser01 wrote:
stack shows it gave core dump in
strncpy function from (libc.so.6)
in InitProcessInitialisation from (libmqmcs_r.so).
in pthread_once() from (libpthread.so.0)
in xcsInitialize() from (libmqmcs_r.so)
in zstMQCONNX() from (libmqz_r.so)
in MQCONNX() from (libmqm_r.so).

An exception with a stack like that possibly indicates a problem in MQ code.. raise a PMR if you cannot solve it by changes to your app.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » core dump in MQV 7 on linux RHEL5
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.