From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Shaun.Racine@intier.com Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: ps hangs, fuser hangs, and w hangs Date: Mon, 05 Jan 2004 10:32:16 +0000 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073298837 1266 80.91.224.253 (5 Jan 2004 10:33:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2004 10:33:57 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Mon Jan 05 11:33:47 2004 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1AdS3P-0004Kt-00 for ; Mon, 05 Jan 2004 11:33:47 +0100 Original-Received: (qmail 6293 invoked by uid 5); 5 Jan 2004 10:33:34 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 6278 invoked by uid 49493); 5 Jan 2004 10:33:34 -0000 Original-Received: from Shaun.Racine@intier.com by sws1 by uid 49491 with qmail-scanner-1.16 (iscan: v3.1/v5.600-1011/622/49252. clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(-4.3/5.0):. Processed in 0.946384 secs); 05 Jan 2004 10:33:34 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 5 Jan 2004 10:33:33 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HR00055VINW15@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 05 Jan 2004 05:33:32 -0500 (EST) Original-Received: from smtp2.msi-it.com (smtp2.msi-it.com [213.150.229.10]) by emroute3.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HR00060ZINMHB@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 05 Jan 2004 05:33:24 -0500 (EST) Original-Received: from msifrahub01ds.msi.intranet ([213.150.229.253]) by smtp2.msi-it.com (8.11.6/8.11.6) with ESMTP id i05Ajeq25166 for ; Mon, 05 Jan 2004 11:45:41 +0100 Original-Received: from mail.MIS.Magna-Europa.com ([172.28.32.9]) by msifrahub01ds.msi.intranet (Lotus Domino Release 5.0.12) with ESMTP id 2004010511330899:47169 ; Mon, 05 Jan 2004 11:33:08 +0100 Original-To: tru64-unix-managers@ornl.gov X-Mailer: Lotus Notes Release 5.0.11 July 24, 2002 X-MIMETrack: Serialize by Router on MISGROUP01DS/SVR/MISGroup(Release 5.0.5 |September 22, 2000) at 01/05/2004 10:32:17 AM, Itemize by SMTP Server on MSIFRAHUB01DS/SVR/MSI-HUB(Release 5.0.12 |February 13, 2003) at 01/05/2004 11:33:09 AM, Serialize by Router on MSIFRAHUB01DS/SVR/MSI-HUB(Release 5.0.12 |February 13, 2003) at 01/05/2004 11:33:11 AM, Serialize complete at 01/05/2004 11:33:11 AM Xref: main.gmane.org gmane.os.tru64.managers:6110 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:6110 Hello All, Short summary - reboot cures it. I had suspected this was my only way out. May be caused by corrupt data structure. Something left unanswered, posed only for interest ; Why are /sbin/ps and /usr/bin/ps different binaries? Many thanks to respondents (replies below); Brian Staab Dr. Thomas Blinn Phil Farrell Further information - I am not running NIS and security is BASE. I did not get an opportunity to try Phil's suggestion, I was able to reboot before I got his email - but the alias goodps is ready for the next time. Best regards Shaun Racine ORIGINAL QUESTION DS10 Tru64 V5.1A patch T64V51AB21AS0004-20030206 OSF520 This question about ps hanging comes up quite regularly on the list. But here is a list of all symptoms found on my system; ps hangs fuser hangs w hangs (after showing 2 users - but "who" does show all the users) In the /proc directory, ls without options shows filename 46820, but ls -l complains ls: ./46820 not found kill -9 46820 says no such process I do have options RPTY in the kernel. /proc is mounted. The normal answer is to reboot, not possible at the moment. However, previous answers related to version 4.0x, and said this is fixed in 5.0x. Other answers suggest removing options RPTY from the kernel. I look after 6 Tru64 servers at various locations, none of the others suffer this problem and they all seem to be configured the same, apart from 3 being ES40, 1 AS4000 but 1 other DS10. What is the implication of removing RPTY from the kernel? (why is it there?) Why are /sbin/ps and /usr/bin/ps different binaries? Maybe it is a flag/semaphore issue? This happens about every other month, does anyone else suffer this problem? REPLIES: FROM Brian Staab: Can't tell you why this happens, but I have been successful avoiding reboots by restarting 'prpasswd' &/or 'nis' via the /etc/rc3.d scripts. All the commands you mention (that hang) have to go out to the NIS master to resolve UIDs - the others (ls, who, etc.) don't. I assume you are running NIS... Hope this helps, Brian Staab FROM Dr Tomas Blinn: I can't say off the top of my head what having the "RPTY" option does in a V5.1A kernel, but if you look in the various "files" files under /usr/sys/conf/ and /usr/sys/conf/alpha (do a "grep -i RPTY" in the set of files), you'll see something like what I see on my V5.1B DS10s which shows that there are a NUMBER of things that will be pulled in if that option is present, but none of them seem to be dependent on only that one option; so leaving it out may not influence what winds up in your kernel at all (that is, you might still pull in all of the modules that it causes to be pulled in). Being that as it may, you have a problem with the internal state of some of the kernel data structures; the presence of "46820" in /proc means that there are some process data structures associated with that process still in the system, but the "ls -l" failing means that they are NOT in a good state. Looking at /proc is much like looking into the kernel data structures with ps, fuser, or w (they all need to use things like the table() system call and Mach RPC calls to get data to produce their outputs). The system calls are failing because there is at least one inconsistency in the data structures. Why your system gets into this state is not obvious, or it would have been fixed by now. It's almost certainly some race condition that is able to mess up the data structures because there is a locking logic bug somewhere in the kernel code related to process state, most likely to process tear-down (process creation is trivially easy by comparison). Since it's an obscure case and possibly in code that rarely executes, it isn't easy to find and fix (it's hard to create a reproducer that can be used for debugging and verification of any fix). You will have to reboot to clear this, unless you have kernel sources and are incredibly skilled in using a debugger like dbx. If you have a support contract, it might be useful to force a panic and capture the system state in a crash dump and send it to kernel engineering for an analysis, but if you don't have a support contract, you won't have any way to get the case created and processed. Tom FROM Phil Farrell: Yes, I've seen this same problem of ps "hangs" with symptoms very similar to yours. I run Tru64 v4.0g on a DS20E, but first saw the problem under Tru64 v4.0d on an AS1000. I seem to get it perhaps twice a year. In my case, ps works IF you don't show the "tty" for the process. In fact, I've defined this alias for a ps that still works when plain ps starts to "hang": alias goodps 'ps agxww -o user,pid,ppid,state,pcpu,pmem,start,cputime,command' In my case, I've also noticed that "acctcom" will hang when ps hangs. This command processes accounting records in /var/adm/pacct. Clearly, there is some relation to collecting process information. I've never been able to "fix" this problem. Usually, I have to reboot. Once, after letting the system run with ps "hangs" for several days, it fixed itself! If you ever find a satisfactory explanation of this problem, or a fix, please let me know. Thanks.