[lug] C program freezing machine

Nate Duehr nate at natetech.com
Tue Apr 15 12:28:07 MDT 2008


Zan Lynx wrote:
> On Tue, 2008-04-15 at 10:49 -0600, Lori Reed wrote:
>> Recompile all code with the -g option to enable debugging info in the 
>> object code, then start the program with a good debugger (I like ddd) 
>> and start setting breakpoints.
>>
>> A good C coder should be able to find the issue within their own code in 
>> less than a day.
> 
> I don't think it's necessarily a problem with the programmer's code that
> debugging can find.  It could be using so much memory in such a random
> pattern that the machine goes into a swap storm or it could be stressing
> the system in such a way as to cause a hardware problem (overheat, not
> enough power, CPU errata like the AMD TLB bug in Phenom, etc).

Someone mentioned how to look at the system at the time he runs the 
program, but old-school tools could help you here too.

"sar" could be used "after the fact" to see if the box was caving in to 
his wiley number-crunching ways, assuming you already have it installed 
and it's tracking.

:-)

Nate



More information about the LUG mailing list