File: perl.pod

package info (click to toggle)
libapache2-mod-perl2 2.0.9~1624218-2%2Bdeb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 11,912 kB
  • ctags: 4,588
  • sloc: perl: 95,064; ansic: 14,527; makefile: 49; sh: 18
file content (71 lines) | stat: -rw-r--r-- 1,321 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
=head1 NAME

Debugging mod_perl Perl Internals

=head1 Description

This document explains how to debug Perl code under mod_perl.

Most of the L<mod_perl 1.0 debug
documentation|docs::1.0::guide::debug> applies to mod_perl 2.0:





=head2 Detecting Hanging Processes

See L<Hanging Processes: Detection and
Diagnostics|docs::1.0::guide::debug/Hanging_Processes__Detection_and_Diagnostics>
for the explanation, but under mp2 to use signals to detect where the
process is spinning, you can't use C<$SIG{USR2}>, you have to use
POSIX signals. i.e. the code becomes:

  use Carp ();
  use POSIX qw(SIGUSR2);
  my $mask      = POSIX::SigSet->new( SIGUSR2 );
  my $action    = POSIX::SigAction->new(\&tell_where_spinning, $mask);
  my $oldaction = POSIX::SigAction->new();
  POSIX::sigaction(SIGUSR2, $action, $oldaction );
  
  sub tell_where_spinning {
      Carp::confess("caught SIGUSR2!");
  };

and then:

  % kill USR2 <pid_of_the_spinning_process>

and watch for the trace in F<error_log>.





=head1 Maintainers

Maintainer is the person(s) you should contact with updates,
corrections and patches.

=over

=item *

Stas Bekman [http://stason.org/]

=back

=head1 Authors

=over

=item *

Stas Bekman [http://stason.org/]

=back

Only the major authors are listed above. For contributors see the
Changes file.

=cut