Author |
Message
|
kolthorr |
Posted: Thu Oct 23, 2003 5:50 pm Post subject: AIX 5.3 trigmon swallowing signals? |
|
|
Apprentice
Joined: 09 Mar 2002 Posts: 31
|
Hi all,
We just upgraded an AIX QMgr to 5.3 and our message processing app stopped working. It's straight C/MQI stuff, no Java. The triggered process forks() a couple of times, then waits for the children to finish before quitting - bog standard unix stuff.
For some reason the parent process never receives the SIGCHLD signals (or any signals for that matter) when run triggered. I've boiled it down to a small test program that runs fine when run standalone (ie, starts, forks, waits, gets signals, exits) but when triggered it never gets the signals and so effectively hangs (with the child processes hanging round as zombies).
Any thoughts? It's really wierd. Thanks very much for any ideas.
Cheers,
Andrew |
|
Back to top |
|
 |
kolthorr |
Posted: Sun Oct 26, 2003 3:17 pm Post subject: Re: signals? |
|
|
Apprentice
Joined: 09 Mar 2002 Posts: 31
|
I've made a code change to our triggered process so the parent process just sleeps for a while, then exits without waiting for its child exit signals. Everything works as expected.
That goes against every unix programming grain in my body so I'm still looking at the underlying cause. Will let people know when we track it down!
Cheers,
Andrew |
|
Back to top |
|
 |
AlainB |
Posted: Mon Oct 27, 2003 2:42 am Post subject: |
|
|
 Voyager
Joined: 31 Oct 2002 Posts: 79 Location: Belgium
|
Hi,
A solution is to start the triggered program in background, so ie
/var/mqm/PROCESS.TO.RUN &
That way, the trigger monitor can immediatly treat the next trigger message, instead of waiting the end of the program.
PS: on an NT box, you can trigger a batch file that performs a start /b myapp _________________ Alain Buret
Visit http://www.fosdem.org |
|
Back to top |
|
 |
kolthorr |
Posted: Sun Nov 09, 2003 3:44 pm Post subject: Signal handling fixed! |
|
|
Apprentice
Joined: 09 Mar 2002 Posts: 31
|
Hi all,
Following a tip from IBM we set the following env variable:
AMQ_SIGCHLD_SIGACTION=YES
in the MQ envrionment and restarted MQ. Problem solved! Our triggered program now receives child exit signals as before.
A handy 'little-documented' feature to keep in mind for your 5.3 unix upgrades.
Cheers,
Andrew |
|
Back to top |
|
 |
Shalini |
Posted: Wed Jul 27, 2005 9:16 am Post subject: |
|
|
Master
Joined: 30 Apr 2002 Posts: 224 Location: India
|
Hi All,
We are getting the same error in MQ 5.2 Solaris OS (not in AIX) same Trigger messages going to Dead Queue
RC is 265 going to Dead Queue..
Is there any Environment variable for SunOS MQ5.2 ????
Still we use 5.2 as other legacy system donot support MQ 5.3
Please help....
 |
|
Back to top |
|
 |
Nigelg |
Posted: Thu Jul 28, 2005 12:21 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
kolthorr, if you were interested in SIGCHLD (or any other signal) you should have explicitly unblocked the signal at the start of your app, not relied on it being unblocked when the app started.
The change from 5.2 -> 5.3 was to block all async signals in the trigger monitor, including SIGCHLD. The signal mask was inherited by your app when it started. The env var causes the signal not to be added to the mask of blocked signals, but instead installs a signal handler for it. |
|
Back to top |
|
 |
Nigelg |
Posted: Thu Jul 28, 2005 12:24 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Shalini
The env var does exist in 5.2, so you can set it there as well.
However, the problem of the trigger msg going to the DLQ with error code 265 does not happen in the same way on Solaris, so the env var will probably not help.
The reason for the error is probably that your app is not exiting with status 0, or is not actually starting, either of which are legitimate reasons for the msg going to the DLQ. |
|
Back to top |
|
 |
Shalini |
Posted: Thu Jul 28, 2005 1:14 am Post subject: |
|
|
Master
Joined: 30 Apr 2002 Posts: 224 Location: India
|
Hi
Quote: |
The env var does exist in 5.2, so you can set it there as well.
|
Can you please let me know what is the environment variable name and its Valuse
The Syntax to set this variable... ????? or any Link which gives me the info etc...
Thanks
 |
|
Back to top |
|
 |
Nigelg |
Posted: Thu Jul 28, 2005 1:58 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
The syntax is in the post immediately prior to your initial question.
The env var has to be set in the shell before you start the trigger monitor.
...
Perhaps you could have looked there before posting again, or done a search on this site, to find the syntax.
Did you read my last comment, about the exit value of the app, or the app not being found? That is a more likely solution than setting the env var.
Still, since you were too lazy even to look in this thread to find the answer as to how to set the env var, I suppose expecting you to exert some effort to find the problem in your app or in starting it was too much to ask.
MQSeries.net helps those who help themselves... |
|
Back to top |
|
 |
Shalini |
Posted: Thu Jul 28, 2005 5:13 am Post subject: |
|
|
Master
Joined: 30 Apr 2002 Posts: 224 Location: India
|
Hi,
Quote: |
Did you read my last comment, about the exit value of the app, or the app not being found? That is a more likely solution than setting the env var. |
This issue we had same in the AIX even there was no issue with the Process (Application) , but once we set the Environment variable it worked fine...
Quote: |
Perhaps you could have looked there before posting again, or done a search on this site, to find the syntax.
|
I found most of search setting for AIX with 5.3 not for MQ5.2 SunOS... so I wanted the env variable, which I expected to be different..
Quote: |
Still, since you were too lazy even to look in this thread to find the answer as to how to set the env var, I suppose expecting you to exert some effort to find the problem in your app or in starting it was too much to ask. |
Actually I am looking for variable for SunOS (not for AIX MQ5.3 ) |
|
Back to top |
|
 |
|