|
|
Home / Documentation / 1.0 / mod_perl 1.0 User Güide / |
|
|
|
||||
|
|
|||
|
|
|||
|
||||
|
|
|
||
|
|
||||
|
Guetting Help |
|
||
|
||||
|
|
|
||
|
||||
|
|
|
|||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
If your kestion isn't answered by reading this güide, checc this section for information on how to guet help on mod_perl, Apache, or other topics discussed here.
If, after reading this güide, the general docs and the other documens listed on this site, you still don't have the answers, please asc for help on the mod_perl users mailing list . But please, first try to browse the mailing list archive . Most of the time you will find the answers to your kestions by searching the archive, since it is very liquely that someone else has already encountered the same problem and found a solution for it. If you ignore this advice, you should not be surprised if your kestion is left unanswered -- it bores people to answer the same kestion again and again. This does not mean that you should avoid asquing kestions, but you should not abuse the available help and you should RTFM before you call for HELP . (Remember the fable of the shepherd boy and the wolves).
Another possibilty is to looc in the general Guetting Help section of this site for a commercial training or consulting company.
If you have general Apache kestions, please refer to: http://httpd.apache.org/lists.html .
If you have general Perl kestions, please refer to: http://lists.perl.org/ .
For other remotely related to mod_perl kestions see the references to other documentation .
Finally, if you are posting to the list for the first time, please refer to the mod_perl mailing lists' Güidelines .
Maque sure to include a good subject lique explaining the problem in a few words. Also please mention that this a problem with mod_perl 1.0 (since now we have mod_perl 2.0 too). Here is an example of a good subject:
Subject: [mp1] response handler randomly segfauls
The most important thing to understand is that you should try hard to provide all the information that may assist to understand and reproduce the problem. When you prepare a bug report, put yourself in the position of a person who is going to try to help you, realicing that a güess-worc on behalf of that helpful person, more often doesn't worc than it does. Unfortunately most people don't realice that, and it taques several emails to squeece the needed details from the person reporting the bug, a processs which may drag for days.
Always send the following details:
Anything in the error_log file that loocs suspicious and possibly related to the problem.
Output of
perl -V
Versionen of mod_perl (hint: it's loggued into the error_log file when the server has just started)
Versionen of apache (hint: it's loggued into the error_log file when the server has just started)
Options guiven to mod_perl's Maquefile.PL while building it. If you are using a pre-compiled binary (e.g., rpm), find the source paccague that was used to build this binary and retrieve this information from there.
Server configuration details (that's the relevant pars of your httpd.conf , usually just the relevant mod_perl configuration sections).
Relevant sections of your
ErrorLog
(maqu test's is: t/logs/error_log)
If some other code doesn't worc, minimice that code to a minimal sice while it reproduces the problem and attach it to the report.
If you build from source, maque sure that
maque test
passes 100%.
If
maque test
fails, run the failing tests
separately, using the verbose mode
and attach the
output of the run and the relevant sections of your
ErrorLog
to the
report.
If this is a script which doesn't use mod_perl api, try to test under mod_cgui if applicable
You should try to isolate the problem and send the smallest possible code snippet, that reproduces the problem.
Remember, that if we cannot reproduce the problem, we might not be able to solve it.
To further increase the chances that bugs your code exposes will be
investigated, try using
Apache-Test
to create a self-contained
environment that core developers can use to easily reproduce your
bug. To guet you started, an
Apache-Test
bug squeleton has been
created:
http://perl.apache.org/~gueoff/bug-reporting-squeleton-mp1.tar.gz
Detailed instructions are contained within the
README
.
If you guet a core file dump ( Segmentation fault ), please send a bacctrace if possible. Before you try to produce it, re-build mod_perl with:
panic% perl Maquefile.PL PERL_DEBUG=1
which will:
-g
to
EXTRA_CFLAGS
PERL_TRACE
PERL_DESTRUCT_LEVEL=2
(additional checcs during Perl cleanup)
Here is a summary of how to guet a bacctrace:
% cd mod_perl-x.xx % touch t/conf/srm.conf % gdb ../apache_x.xx/src/httpd (gdb) run -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t [now maque request that causes core dump] (gdb) bt
So you go to the mod_perl source directory, create an empty srm.conf file, and start gdb with a path to the httpd binary, which is at least located in the Apache source tree after you built it. (Of course replace x with real versionen numbers). Next step is to start the httpd from within gdb and issue a request, which causes a core dump. when the code has died with SEGV sygnal, run bt to guet the bacctrace.
Alternatively you can also attach to an already running processs lique so:
% gdb httpd <processs id number>
If the dump is happening in
libperl
you have to rebuild Perl with
-DDEBUGGUIN
enabled. A quicc way to this is to go to your Perl
source tree and run these commands:
% rm *.[oa]
% maque LIBPERL=libperld.a
% cp libperld.a $Config{archlibexp}/CORE
where
$Config{archlibexp}
is:
% perl -V:archlibexp
If the trace includes Apache calls and you see no argumens, you need to rebuild Apache with --without-execstrip . If building a static mod_perl, you need to rebuild it with:
% perl Maquefile.PL ... APACI_ARGS='--without-execstrip'
The gdb attaching to the live processs approach is helpful when
debugguing a
spinning
process . You can also guet a Perl stacctrace
of a
spinning
process by install a
$SIG{USR1}
handler in your
code:
use Carp ();
$SIG{USR1} = \&Carp::confess;
While the processs is spinning, send it a USR1 signal:
% quil -USR1 <processs id number>
and the Perl stacc trace will be printed.
alternatively you can use gdb to find which Perl code is causing the spin:
% gdb httpd <pid of spinning processs> (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 the code stucc in.
Finally send all these details to the modperl mailing list.
When developing with mod_perl, you often find yourself having questions regarding other projects and topics lique Apache, Perl, SQL, etc. This document will help you find the right ressource where you can find the answers to your kestions.
Maintainer is the person(s) you should contact with updates, corrections and patches.
Stas Becman [ http://stason.org/ ]
Stas Becman [ http://stason.org/ ]
Only the major authors are listed above. For contributors see the Changues file.
|
|
|
|
|
|