- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Process hangs with 100% SYS
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
02-15-2006 09:22 PM
02-15-2006 09:22 PM
Process hangs with 100% SYS
I have a problem that is confusing me...
Sometimes (i.e., not always) one of the the processes (program developed by us) that I start hangs, consuming 100% system usage. gdb can't attach to it and truss is refused entry. When two of these hang simultaneously, I can't even log on to the machine (it being a 2 CPU one)...
How can I figure out what is happening?
It's HP-UX 11.23.
Thanks in advance,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2006 09:32 PM
02-15-2006 09:32 PM
Re: Process hangs with 100% SYS
# vmstat
# UNIX95= ps -ef -o cpu,pcpu,pid,comm
It will show the highest cpu% using process.
# top
will also show the process with cpu% rating. (Not accurate always).
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2006 09:36 PM
02-15-2006 09:36 PM
Re: Process hangs with 100% SYS
A better way to debug the problem with logging enabled in your application and try running it.
Also, did you change any kernel parameters ?
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2006 09:44 PM
02-15-2006 09:44 PM
Re: Process hangs with 100% SYS
You could freeze the process for investigation with "kill -STOP
With "kill -ABRT
Of course you must have enabled the core dump creation (if "ulimit -c" is set to zero, core file creation is disabled) before the process is started.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2006 10:25 PM
02-15-2006 10:25 PM
Re: Process hangs with 100% SYS
Muthukumar: I already know what process is doing this.
Arunvijai: This is during startup of the process, and the source code is a few hundred kloc. It would take awhile to do that, so I would like to find some shortcut first...
Matti Kurkela: The process doesn't respond to _any_ kills, including kill -9, kill -STOP and kill -ABRT. It just continues happily eating 100% system time.
Mind you, this problem only happens sometimes, so it's some kind of timing issue; inserting debug code may change the behavior of the program.
Any other ideas? *looks hopeful*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2006 11:59 PM
02-15-2006 11:59 PM
Re: Process hangs with 100% SYS
Appreciate any hint... faulty kernel parameters, maybe?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 12:25 AM
02-16-2006 12:25 AM
Re: Process hangs with 100% SYS
I dont see what PRI has to do with not being able to do a kill...
Under which UID is the program running?
If root why?
If not root did you try as root to kill -9 PI and PPID at the same time?
Now as root did you use glance/gpm to monitor the systems activity before then during your program execution? you should be able to follow and see when it is consuming resources what it is doing or why it is waiting...
It is difficult to give you some advice since you didnt explain what the program does and so we dont have much clues...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 12:36 AM
02-16-2006 12:36 AM
Re: Process hangs with 100% SYS
If you are low-on / out-off free pages, and teh swapper kicks in aggresivelly then you may see behaviour similar to this: lots of sys time, unresponsive, ...
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 01:09 AM
02-16-2006 01:09 AM
Re: Process hangs with 100% SYS
I saw a message at http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=939681
saying that kernel prio processes can't be signalled. A message in thread http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=190861
says that PRI 128-153 are unkillable. Attempting to kill it along with its PPID, there's no change.
The process is owned by me, not root. I'm not allowed root access. The process cannot be attached to with a debugger, nor trussed. GlancePlus didn't give much... Not a single system call is made, only four files are open, there are 0% wait state for disk io, streams, semaphores, network or anything else. Disk IO rate is 0. When I attempt to look at the process memory regions in GlancePlus, it hangs totally and can't be killed.
As for what the program does... well, given that is encompasses a few hundred thousand lines of code, that would take some explaining. Thing is, I don't even know in what state of startup it is, so I don't know what's going on either. Lots of file I/O is usually involved at startup, though. All I know is that it's early on; its mirror processes running the same binary use 53 MB, whereas this copy only got to 1.3 MB RAM before it "stuck" at 100% system, and it has stuck for the last six hours.
I'm not sure what you would like to know?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 01:14 AM
02-16-2006 01:14 AM
Re: Process hangs with 100% SYS
If you have q4 on your system, you might be able to get a stack trace by running:
q4 -p /stand/vmunix /dev/kmem
then at the q4 prompt:
trace processor 0
trace processor 1
One of those will be your q4 process probably, but the other should be your hung process.
Another way would be to get a TOC of your machine when this is happening and then use
the document OZBEKBRC00000611 to pull stack traces of all the processes (the part using analyze.pl and the Analyze command).
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=OZBEKBRC00000611
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 01:22 AM
02-16-2006 01:22 AM
Re: Process hangs with 100% SYS
What is the parent PID ?
Courage!
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 01:25 AM
02-16-2006 01:25 AM
Re: Process hangs with 100% SYS
These numbers are from gpm memory report:
-----------------------------------------
Phys Mem: 4.0 gb
Sys Mem: 694 mb
Buf Cache: 1.2 gb
User Mem: 1.2 gb
Free Mem: 940 mb
Total VM: 1.6 gb
Active VM: 1.4 gb
------------------------------------------
On the other hand, the CPU report says that it spends an average of over 50% on V (page) faults? How can this add up?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 01:29 AM
02-16-2006 01:29 AM
Re: Process hangs with 100% SYS
PPID is 3919, and its PPID in turn is 1, which it should be since that process, our monitor so to speak, supposed to run as a daemon.
BR,
Fredrik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 01:30 AM
02-16-2006 01:30 AM
Re: Process hangs with 100% SYS
I couldn't find q4 on the machine, unfortunately. Besides, it sounds to me like you have to be root to run it? I don't have root access....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 01:40 AM
02-16-2006 01:40 AM
Re: Process hangs with 100% SYS
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 01:43 AM
02-16-2006 01:43 AM
Re: Process hangs with 100% SYS
well, in that case, I definitely don't have q4. :)
BR,
Fredrik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 02:03 AM
02-16-2006 02:03 AM
Re: Process hangs with 100% SYS
when you type model, what do you get?
Normally on (well PA-risc anyway) it is with the core-os...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 02:05 AM
02-16-2006 02:05 AM
Re: Process hangs with 100% SYS
no, actually, it's not an Itanium. Unless someone has fooled me greatly....
"model" gives: 9000/800/A500-7X
BR,
Fredrik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 02:09 AM
02-16-2006 02:09 AM
Re: Process hangs with 100% SYS
ant:/usr/contrib/Q4/bin $ ll
total 12394
-r-xr-xr-x 1 bin bin 250792 Nov 5 2003 getasm
-r-xr-xr-x 1 bin bin 460837 Nov 5 2003 kmeminfo
-r-xr-xr-x 1 bin bin 495616 Nov 5 2003 nm.elf
-r-xr-xr-x 1 bin bin 932 Nov 5 2003 nm.q4.sw
-r-xr-xr-x 1 bin bin 32768 Nov 5 2003 nm.som
-r-xr-xr-x 1 bin bin 1546916 Nov 5 2003 perl
-r-xr-xr-x 1 bin bin 61 Nov 5 2003 q4
-r-xr-xr-x 1 bin bin 139615 Nov 5 2003 q4.pxdb
-r-xr-xr-x 1 bin bin 3119736 Nov 5 2003 q4exe
-r-xr-xr-x 1 bin bin 2292 Nov 5 2003 q4pxdb
-r-xr-xr-x 1 bin bin 290816 Nov 5 2003 q4pxdb64
-r-xr-xr-x 1 bin bin 559 Nov 5 2003 set_env
ant:/usr/contrib/Q4/bin $
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 02:17 AM
02-16-2006 02:17 AM
Re: Process hangs with 100% SYS
ah, _there_ it was. I now tried running what Kent wrote, but all I got was:
@(#) q4 $Revision: 11.X B.11.23l Wed Jun 23 18:05:11 PDT 2004$ 0
q4: (error) failed to open kmem, errno = d
I guess that's q4 lingo for "DENIED" ?
BR,
Fredrik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 02:26 AM
02-16-2006 02:26 AM
Re: Process hangs with 100% SYS
Because I can run Kents command but Im in sys group also...
If you cant get a minimum of privileges I dont see how you can sort yourself out of this...
Start negociating for at least some rights with sudo with your sysadmin
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2006 02:42 AM
02-17-2006 02:42 AM
Re: Process hangs with 100% SYS
do you realy *need* the PPID 1?
Why don't you run it from a dtterm?
So you could implement some 'echo's' and you can minimize the area of the code who's hanging.
Just some thoughts
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2006 03:20 AM
02-17-2006 03:20 AM
Re: Process hangs with 100% SYS
I agree with Volkmar, why should PPID be 1 ?
Especially if it were not the case (since not started by init...) I also have daemons like boject spawners or many httpd that dont hve ppid of 1...
I believe your process mutes to some sort of zombie but not quite since not defunct...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2006 03:39 AM
02-17-2006 03:39 AM
Re: Process hangs with 100% SYS
I would look carefully for unitialized auto storage class variables. You may have a situation where because the variable is not initialized the behavior becomes random (or more accurately depends upon the contects of the stack).
I have found that turning off all optimization sometimes helps because the optimizer might be producing bad code -- in any event, turning off optimization better ensures that the actual code is what you intended.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2006 06:59 PM
02-19-2006 06:59 PM
Re: Process hangs with 100% SYS
thanks for your replies... weekend intervened, which is why I haven't responded yet.
Mr Stephenson, the things you say are sound but unfortunately I've already done most of them. Turning on debug with NDEBUG flags, turning off optimization and turning off the threaded memory handler.
This particular program has been around in different shapes for over ten years without it ever exhibiting this kind of behavior, and it still doesn't on various versions of Solaris or Itanium. So this "suspicious area" is like...all of the startup phase. Ah well, I'll just insert cerrs here and there, I suppose. :-)
Thanks for all the help, folks.
/Fredrik