LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   KSH script behaving differently on an HACMP cluster node (prod) & a single node (UAT) (http://www.linuxquestions.org/questions/programming-9/ksh-script-behaving-differently-on-an-hacmp-cluster-node-prod-and-a-single-node-uat-850599/)

mufy 12-16-2010 02:51 AM

KSH script behaving differently on an HACMP cluster node (prod) & a single node (UAT)
 
I have created a simple menu driven script for our Operations to take care of the basic monitoring and managing of our production application from the back-end. Now, the script when tested in UAT environment was fine, but when deployed to production it kind of behaved oddly.

This is the scenario:

When the Operator chooses an option from the menu he is given the output and at the end is prompted to return to the main menu by using ctrl+c. In production, this return does not occur for some strange reason and the program just sits there.

The session becomes unresponsive after that and I'm forced to terminated it by closing the PuTTY.

I tried enabling the debug mode too (set -x) and still was not able to find any useful hints/trails as to why.

Any troubleshooting tips would be greatly appreciated as I'm scheduled to have this sorted out by the end of the day :-).

kbp 12-16-2010 03:09 AM

Start with comparing the versions between UAT and Prod, then maybe compare the environments for the accounts you're using.

mufy 12-16-2010 03:16 AM

Production OS level
Code:

op58@prapbc1[/home/op58] $oslevel -s
5300-09-01-0847

UAT OS level
Code:

op58@prapbc[/home/op58] $oslevel -s
5300-06-10-0846

The accounts environments are identical across both the areas.

kbp 12-16-2010 12:53 PM

Well that's a problem for a start .. UAT and Prod should really be identical, there's not much point looking any further until you resolve this - behaviour of applications will change with new versions

mufy 12-30-2010 12:05 PM

For those who would like to have a bigger picture, it is available here:
http://www.linkedin.com/groupItem?vi...entID_28666370

Below are the part of traces I have gathered. I'd like to know understand their co-relation.
kioctl(2, 1074295912, 0x2FF19720, 0x00000000) = 0
kioctl(2, 22528, 0x00000000, 0x00000000) = 0
kioctl(2, 21505, 0x2000C0F8, 0x00000000) = 0
kioctl(2, 22528, 0x00000000, 0x00000000) = 0
kioctl(2, 21507, 0x2000C0B8, 0x00000000) Err#82 ERESTART
Received signal #22, SIGTTOU [caught]

root[/home/root] # lsof64 -p 2478194
In while loop:256
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sh 2478194 root cwd VDIR 10,8 4096 28672 /home (/dev/hd1)
sh 2478194 root 0u VCHR 23,6 0t67759 1335 /dev/pts/6
sh 2478194 root 1u VCHR 23,6 0t67759 1335 /dev/pts/6
sh 2478194 root 2u VCHR 23,6 0t67759 1335 /dev/pts/6
sh 2478194 root 10r VREG 10,5 5773 21707 /usr (/dev/hd2)
sh 2478194 root 62r VREG 10,8 421 28678 /home (/dev/hd1)

mufy 01-03-2011 02:08 AM

Finally the issue was resolved by upgrading sudo from 1.6.9p2 to 1.7.2p2. Never knew signal handlers could be so tricky.


All times are GMT -5. The time now is 06:46 AM.