Author |
Message
|
mquser01 |
Posted: Mon Aug 30, 2010 3:31 am Post subject: core dump in MQV 7 on linux RHEL5 |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Aug 30, 2010 3:39 am Post subject: |
|
|
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 |
|
 |
mquser01 |
Posted: Mon Aug 30, 2010 4:01 am Post subject: |
|
|
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 |
|
 |
gbaddeley |
Posted: Mon Aug 30, 2010 4:24 pm Post subject: |
|
|
 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 |
|
 |
bruce2359 |
Posted: Mon Aug 30, 2010 5:15 pm Post subject: |
|
|
 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 |
|
 |
fjb_saper |
Posted: Mon Aug 30, 2010 8:20 pm Post subject: |
|
|
 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 |
|
 |
mquser01 |
Posted: Mon Aug 30, 2010 10:28 pm Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Tue Aug 31, 2010 1:55 am Post subject: |
|
|
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 |
|
 |
mquser01 |
Posted: Sun Sep 05, 2010 9:53 pm Post subject: |
|
|
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 |
|
 |
rekarm01 |
Posted: Mon Sep 06, 2010 5:37 am Post subject: Re: core dump in MQV 7 on linux RHEL5 |
|
|
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 |
|
 |
bruce2359 |
Posted: Mon Sep 06, 2010 6:03 am Post subject: |
|
|
 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 |
|
 |
mquser01 |
Posted: Mon Sep 06, 2010 8:21 pm Post subject: |
|
|
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 |
|
 |
mvic |
Posted: Tue Sep 07, 2010 5:36 pm Post subject: Re: core dump in MQV 7 on linux RHEL5 |
|
|
 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 |
|
 |
|