From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Iain Barker Newsgroups: gmane.os.tru64.managers Subject: FOLLOWUP: Process stuck at 99% and cannot kill it Date: Wed, 04 Aug 2004 19:20:53 -0400 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1091661912 30253 80.91.224.253 (4 Aug 2004 23:25:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Aug 2004 23:25:12 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Thu Aug 05 01:25:02 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 1BsV82-0001DD-00 for ; Thu, 05 Aug 2004 01:25:02 +0200 Original-Received: (qmail 6830 invoked by uid 5); 4 Aug 2004 23:24:51 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 6815 invoked by uid 49501); 4 Aug 2004 23:24:51 -0000 Original-Received: from ibarker@aastra.com by sws1 by uid 49491 with qmail-scanner-1.21 (clamdscan: 0.70-rc. iscan: v3.1/v5.600-1011/847/50540. spamassassin: 2.63. Clear:RC:0(160.91.4.110):SA:0(-4.9/5.0):. Processed in 0.961242 secs); 04 Aug 2004 23:24:51 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 4 Aug 2004 23:24:50 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2-X27 #30899) with ESMTP id <0I1Y006CB3PCX4@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 04 Aug 2004 19:24:49 -0400 (EDT) Original-Received: from VIRUSCAN-DAEMON.emroute3.ornl.gov by emroute3.ornl.gov (PMDF V6.2-X27 #30899) id <0I1Y00A023OY25@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 04 Aug 2004 19:24:35 -0400 (EDT) Original-Received: from solmail1.aastra.com (eumail.aastra.com [62.2.240.252]) by emroute3.ornl.gov (PMDF V6.2-X27 #30899) with ESMTP id <0I1Y0085U3OWUZ@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 04 Aug 2004 19:24:34 -0400 (EDT) Original-Received: from bilmail.aastra.com ([10.50.2.10]) by solmail1.aastra.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 05 Aug 2004 01:20:58 +0200 Original-To: tru64-unix-managers@ornl.gov X-MIMEOLE: Produced By Microsoft Exchange V6.5.7226.0 Thread-Topic: FOLLOWUP: Process stuck at 99% and cannot kill it Thread-Index: AcR6eFXKBGMhWTynRzqpEJMWKfTihw== Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: X-OriginalArrivalTime: 04 Aug 2004 23:20:58.0851 (UTC) FILETIME=[B326C330:01C47A79] Xref: main.gmane.org gmane.os.tru64.managers:7404 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:7404 I got a followup from Whitney Latta at HP, which helped pinpoint the = root cause - extract as below. I had already rebooted the system, but the problem reoccurred when I = tried the same ar command again, so was reproducable, and this time = using dbx I was able to get a thread trace. It appears the lockup was caused by failed access to a third-party = filesystem (ClearCase mvfs remote over the network). The same ar command = subsequently worked fine from a local disk. Thanks again for your help! - Iain -----Original Message----- Sent: Wednesday, 04 August, 2004 12:48 Subject: RE: SUMMARY: Process stuck at 99% and cannot kill it Hello, Regarding the runaway process... it will be important to determine what = exactly it is doing in order to understand why it is running away like = this. The fact that "kill -9 {pid}" failed to terminate the process = indicates it is running in an "uninterruptible" state... meaning the = underlying functions cannot be terminated, and must run to completion = (or system reboot). Assuming the process can accept signals, kill -9 is = the most powerful of all signals... if it doesn't respond to that = signal, it won't to any other ones. I'm curious why using dbx(1) to examine the executing thread "locked up" = when trying to examine the running process. The method to examine an = individual process should allow you to obtain a stack trace even on a = thread that has "run away" like this (This assumes the system as a whole = still has cpu cycles remaining to run dbx properly). Here is how I would use dbx(1) to examine a running thread: 1) First find the "pid" number of the process (pid=3D4559 from the ps = output below). 2) Next invoke dbx on the running kernel, by typing "dbx -k /vmunix" 3) At the "dbx>" prompt, type: "set $pid=3D4559" 4) If this process is "single-threaded", then type "t" to get the stack = trace. 4a) If this process is "multi-threaded", type "tlist" to obtain a list = of the thread addresses. 4b) since each individual thread is a schedulable entity, set dbx = context to each thread in turn, by typing "tset {thread-address}", = followed by "t" to get the stack trace. (note "thread-address" will be = the 64-bit hex address displayed by the "tlist" command above, for = multi-threaded processes). 5) Once you have found the thread that is running away, run the "t" = command several times in a row... what you will want to look for is = whether the thread appears to be looping through the same series of = function calls over and over, or is making some kind of progress through = a linked-list or some other areas of code.=20 The above dbx operations should return very quickly, if the system as a = whole has resource capacity. Another alternative, if dbx(1) still fails to yield results, is to run = "truss" or "trace" against the running process. Truss is part of the = SysV environment... and is optional (so, it may not be on the system = now; it can be loaded on later). The "trace" utility is a standalone = executable and is available in the public domain. I have a version built = for V5 and can make it available on our ftp-server. It can be run = against a running process and, similar to "truss", will return the = system calls and their exit codes (which can be captured in a logfile = for easy review).=20 I would suspect that something is failing and looping through some = low-level kernel-mode calls to palcode.=20 I hope this is helpful. Regards, Whitney Latta=20 Complex Problem Mgr HP Global Solutions Engineering