# How to diagnose an unstable system

## LMCBoy

Hello,

Over the past week or so, my system has become really unstable, with apps randomly crashing frequently.  Even while compiling in a vtt, I am seeing random segfaults ("random" in the sense that if I simply restart the build, it will compile...or just as often, fail again, but at a different point).  It has even hard-locked at least once.

At first I suspected the kernel, since I had just upgraded to 2.6.31.  However, the crashes and segfaults persisted even after going back to 2.6.28, which I had been using for a while without these issues.  So now my best guess is a hardware issue.  How can I determine whether the porblem is in the CPU, mobo or RAM?  Are there diagnostic tools available?

----------

## Raniz

What does your CFLAGS and CXXFLAGS look like?

----------

## ppurka

If it is the RAM, you can test it using memtest86. Most of the livecds (ubuntu, for ex) should come with a memtest option in the grub menu.

----------

## LMCBoy

```
CFLAGS="-march=athlon64 -O2 -pipe"

CXXFLAGS="-march=athlon64 -O2 -pipe"

```

Again, the system has been stable for months, it's only in the past week or so that things have started going haywire.  And it seems to be getting worse.  I've tried to emerge xulrunner about 12 times now, it's failed with a segfault or error each time at a different place in the process.

----------

## pappy_mcfae

Check the condition of the CPU fan and heat sink. If it's clogged, clean it out. Then check memory. If errors persist, motherboard. If they persist after that, CPU.

Blessed be!

Pappy

----------

## LMCBoy

Thanks for the help everyone!  I installed memtest86, and it filled the screen with scary-looking hexadecimal numbers, so I reckon that means the RAM is bad.  I'll RMA it on Monday...

----------

## pappy_mcfae

Good luck.

Blessed be!

Pappy

----------

