Thursday, September 27, 2007

A SEGV Storm Generator

Again, I wrote a stupid program mainly for trouble reproducing. :)

Recently, I've been working on a crash dump of an application server
taken under a heavy CPU load, especially high system activity
(i.e., %system of sar, mpstat or vmstat etc.)

After looking into the crash dump several days (as my after-5 activity :o),
I found that about 10 Java threads out of 3000 under 1 process were waiting for CPU with pending SIGSEGVs.
I'm not sure yet, but after reading source of the Linux exception handler routines,
now I'm feeling we would see a high system activity load like the above
if we had a situation like a segmentation fault storm.

Thus, I tried to write a small program touching invalid addresses repeatedly to reproduce the phenomenon like I saw.

The after-5 activity is still ongoing, and I'm facing with a more strange behaviour of SIGNALs. :(
But anyway, the SEGV storm generator would be public here soon.

No comments: