Practical mod_perl / HTML Book /



previous page: 23.1.1. Getting the Backtrace from Core Dumps
  
page up: HTML Version of the book
  
next page: 23.2. Mailing List Etiquette

23.1.2. Spinning Processes


The gdb attaching to the live process approach is helpful when debugging a spinning process. You can also get a Perl stack trace of a spinning process by installing a $SIG{USR1} handler in your code:

use Carp ( );
$SIG{USR1} = \&Carp::confess;

While the process is spinning, send it a USR1 signal:

panic% kill -USR1 <process id number>

and the Perl stack trace will be printed.

Alternatively, you can use gdb to find which Perl code is causing the spin:

panic% gdb httpd <pid of spinning process>
(gdb) where
(gdb) source mod_perl-x.xx/.gdbinit
(gdb) curinfo

After loading the special macros file (.gdbinit), you can use the curinfo gdb macro to figure out the file and line number in which the code stuck. Chapter 21 talks in more detail about tracing techniques.

Finally, send all these details to modperl@perl.apache.org .

 

Continue to:

  • prev: 23.1.1. Getting the Backtrace from Core Dumps
  • Table of Contents
  • next: 23.2. Mailing List Etiquette







TOP
previous page: 23.1.1. Getting the Backtrace from Core Dumps
  
page up: HTML Version of the book
  
next page: 23.2. Mailing List Etiquette


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com