[lug] C program freezing machine

Zan Lynx zlynx at acm.org
Tue Apr 15 11:49:43 MDT 2008


On Tue, 2008-04-15 at 12:24 -0400, gordongoldin at aim.com wrote:
> I have a programmer with big number cruncher (probably memory
> intensive) programs.
> 
> He submits his program - the machine freezes.
> 
> What are the best items to look at first in trying to track down what
> could be happening.
> 
> He is not submitting as root (so he's not filling up / by pouring junk
> into root home, for example).

I suspect the system isn't really freezing.  It might be going into a
swap storm.  In that situation it can seem frozen when it can take
minutes to respond to input.

Here's something to try:

Log into the system console as root (direct hardware connection not
SSH).  Set your shell into real-time priority.  chrt -p 99 $$ should do
it.  Then mlock the shell.  gdb --pid $$, then "call mlockall(3)", then
exit gdb.

Now run "vmstat 1" and watch it while the number cruncher runs...if it
shows a lot of swap activity then that's probably stopping the machine.
With the real-time, mlocked shell you should be able to kill the
run-away process.
-- 
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20080415/9181fb0d/attachment.pgp>


More information about the LUG mailing list