books
Free Books / Computers / Practical mod_perl /

previous page: 23.1.1. Getting the Backtrace from Core Dumps
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 23.2. Mailing List Etiquette

23.1.2. Spinning Processes




Description

This section is from the "Practical mod_perl" book, by Stas Bekman and Eric Cholet. Also available from Amazon: Practical mod_perl

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

Books by Stas Bekman:















TOP
previous page: 23.1.1. Getting the Backtrace from Core Dumps
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 23.2. Mailing List Etiquette

Topics

  • Animals
  • Architecture
  • Arts
  • Business
  • Computers
  • Crafts
  • Fairy Tales
  • Finance
  • Flora and Plants
  • Cooking
  • Gardening
  • Health and Healing
  • History
  • Home Improvements
  • Languages
  • New Age
  • Novels
  • Real Estate
  • Reference
  • Religion
  • Science
  • Society
  • Sports
  • Travel
  • Outdoors


Search

My Books

Headaches Begone! A Systemic Approach To Healing Your Headaches
Don't Let Your Bike Seat Ruin Your Sex Life Book

Discover

  • Answers FAQ

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

© 2007-2021 StasoSphere.com