- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- kill -9 $$ fails! So does exit! Remsh bug?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2002 04:59 PM
06-23-2002 04:59 PM
kill -9 $$ fails! So does exit! Remsh bug?
Same thing happens if I type kill -9 $$ (which ought to kill the current process). "Logout" gets printed, but it never really happens - it just hangs.
It doesn't always happen - just when I've run certain scripts (oracle startup scripts, apowsctl.sh start). Doesn't matter whether I use nohup to run the command or not.
Also, perhaps nohup provides a clue. Even though I'm starting a process with "nohup process &", when I type "exit", I'm warned that there are running processes. I thought that ought not happen when I use nohup, since the process I started should have been dissociated from the controlling terminal.
It's probably worth mentioning that the hanging only happens when I'm using a remote login shell, such as one obtained via remsh or ssh.
But it seems like a bug in HP-UX to me.
BTW, I've also tried every imaginable (by me) I/O redirection, including this one:
process 1>/dev/null 2>&1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2002 07:08 PM
06-23-2002 07:08 PM
Re: kill -9 $$ fails! So does exit! Remsh bug?
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 05:12 AM
06-24-2002 05:12 AM
Re: kill -9 $$ fails! So does exit! Remsh bug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 06:30 AM
06-24-2002 06:30 AM
Re: kill -9 $$ fails! So does exit! Remsh bug?
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 06:52 AM
06-24-2002 06:52 AM
Re: kill -9 $$ fails! So does exit! Remsh bug?
If I were issuing a command with the remsh like so:
remsh host2 'tty'
...then I would not expect a controlling tty (and hence would get the message "not a tty" from the tty command above), but I would NOT expect this to be an issue when actually running an interactive session via remsh. For example, if I just remsh into host2, wait for the shell prompt, then issue my command, wait for the shell prompt again, then exit (twice if using nohup), I would not expect to have a problem related to the absence of a controlling tty, because there *was* a tty allocated. Nonetheless, the connection hangs after the remote shell prints "logout".
Again, this seems like a bug to me. I'm not sure what conditions might cause this behavior to be valid...?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 07:05 AM
06-24-2002 07:05 AM
Re: kill -9 $$ fails! So does exit! Remsh bug?
will actually translate into rlogin in which case there is a controlling tty. "remsh hosta tty" or "remsh hosta -n tty" should produce: "not a tty" in either case. This may be an obscuree patch issue. Do you have the 2002 patch bundles loaded?
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 08:53 AM
06-24-2002 08:53 AM
Re: kill -9 $$ fails! So does exit! Remsh bug?
nohup does not disassociate a process from the controlling terminal or shell. It only disables SIGHUP and redirects stdout and stderr to a file.
To completely avoid this problem, try passing the command to batch instead of nohup. For example:
remsh host
echo "command" | batch
or
remsh host -n 'echo "command" | batch'
This way the command doesn't have to be disassociated since it is invoked under cron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 09:48 AM
06-24-2002 09:48 AM
Re: kill -9 $$ fails! So does exit! Remsh bug?
Here's the exact situation. I need to automate startup and shutdown of Oracle processes where the actual processes are distributed across several accounts and several machines.
For each step there is an Oracle-provided shell script which launches various Oracle binaries. The processes resulting from these scripts are daemons (for example the web listeners), not the scripts that I run directly.
Even if I do this interactively within an rlogin session, and even though the script that launches the binaries (apowsctl.sh, for example) successfully completes and exits, when I exit the rlogin shell I get the shell's "logout" message but the connection hangs.
In answer to your question about patch levels, Bill, we have various individual patches applied, along with the quality pack from March of 2001.
Thanks for the clarification of how nohup works - I should have read the man page before posting. :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 11:37 AM
06-24-2002 11:37 AM
Re: kill -9 $$ fails! So does exit! Remsh bug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 12:13 PM
06-24-2002 12:13 PM
Re: kill -9 $$ fails! So does exit! Remsh bug?
Got any advice for compiling lsof for 64-bit hpux? Or suggestions on other "process profiling" tools that may be helpful?
Of course, I'm not sure I could get an update out of Oracle if I determined exactly the behavior that leads to this symptom (although I have more faith in HP having a fix).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 12:17 PM
06-24-2002 12:17 PM
Re: kill -9 $$ fails! So does exit! Remsh bug?
Look at the following thread on compiling lsof for 64bit.
I tried to do a work around but there are some other good suggestions too.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x15eaf715edc6d5118ff10090279cd0f9,00.html
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 12:22 PM
06-24-2002 12:22 PM
Re: kill -9 $$ fails! So does exit! Remsh bug?
If you have HP Openview Operations (OVO/VPO/ITO/OpC or whatever they are calling it these days) you may have a copy of it. Look for:
/opt/OV/contrib/OpC/lsof_64bit
HTH
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 01:02 PM
06-24-2002 01:02 PM
Re: kill -9 $$ fails! So does exit! Remsh bug?
#!/sbin/sh
lsof -p $$
The attached shows the results from two remsh invocations.
This one
remsh client -n 'nohup script /dev/null 2>&1'
_should_ eliminate the problem, but then you won't get any output back.
Since remsh does not return the errno of the invoked process, the process must return readable data.
Try this:
#!/sbin/sh
typeset -i errno=0
if remsh client -n './script /dev/null 2>&1; echo $?' | read errno
then
if [ $errno -gt 0 ]
then
echo script failed
fi
else
echo remsh failed
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2002 12:43 PM
06-25-2002 12:43 PM
Re: kill -9 $$ fails! So does exit! Remsh bug?
(process &), the process will be inherited by the init process. When you exit, there will be no batch processes tied to your session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2002 05:24 AM
06-26-2002 05:24 AM
Re: kill -9 $$ fails! So does exit! Remsh bug?
If so, post that and we can look at it, try to reproduce it, etc..
Other than that, adding to the other responses:
While nohup(1) should redirect standard output and standard error and "remsh -n" should redirect standard input, I have seen cases where that was not sufficient and only *explicit* redirection solved the problem.
So in any location which *could* generate (error) output or/and ask for input, do yourself a favor and *explicitly* redirect, i.e.
/dev/null 2>/dev/null