[Ilugc] su login problem

Easwaran .K.V kveaswaran.ilugc at gmail.com
Fri Jun 23 13:02:33 IST 2006

Hi all

Is there way to kill a process in uninterruptible sleep state, without
killing the parent process.
I have a script say abc.sh which needs to use su in the following manner

su - user1 -c myscript.sh

that is abc.sh is a cron job executes myscript.sh as a different user.
If myscript.sh goes into "uninterruptible sleep state" for some reason, what
happens to my "su" command.

In my case "su" too went into the same state. Not only that, I was not able
to use the "su" command after that,
even from an other terminal. If i issue "su -" or "su" the terminal just
freezes, and I cannot get a root shell.

Will one "su" in a "uninterruptible sleep state" cause any other "su" issued
thereafter to go into the same state.
Thats what happens in my case. I tried some 10 to 15 times from different
terminals, and I got 15 "su"s in "D" state,
when I checked with "ps -auxwww" as an ordinary user.

Is using "-c" option of the "su" command the cause. Can I have the same
results by using "sudo" instead of "su -c".

Only a reboot solves the problem. I am able to "su -" and login as root
after a reboot. But this happens in a RHEL 3 update 3 server, hosting
critical database applications. I cannot reboot every time I loose "su"

How can I prevent the above scenario from repeating. I cannot alter the
scripts as they are from a 3rd party DB vendor and modifying the scripts may
have disastrous effects on the database.


More information about the ilugc mailing list