mod_perl2 User's Guide
By Stas Bekman, Jim Brandt
By Stas Bekman, Eric Cholet
make test' Failures
This chapter is for those needing help using mod_perl and related software.
There is a parallel Getting Help document written mainly for mod_perl core developers, but may be found useful to non-core problems as well.
Whenever you want to report a bug or a problem remember that in order to help you, you need to provide us the information about the software that you are using and other relevant details. Please follow the instructions in the following sections when reporting problems.
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, realizing that a guess-work on behalf of that helpful person, more often doesn't work than it does. Unfortunately most people don't realize that, and it takes several emails to squeeze the needed details from the person reporting the bug, a process which may drag for days.
First of all:
Apache 2.0 doesn't work with mod_perl 1.0. Apache 1.0 doesn't work with mod_perl 2.0.
So if you aren't using Apache 2.x with mod_perl 2.0 please do not send any bug reports.
META: mod_perl-1.99_xx is mod_perl 2.0 to-be.
To build mod_perl, you must also use the same compiler that Perl
was built with. You can find that out by running
perl -V and
looking at the
Compiler: section. If you have used a different
compiler and have encountered problems (which most likely will be the
case) recompile Perl with the same compiler and then recompile
Before you post the report, make sure that you've checked the error_log file (t/logs/error_log in case of the failing test suite). Usually the errors are self-descriptive and if you remember to always check this file whenever you have a problem, chances are that you won't need to ask for help.
If you are using an older version than the most recently released one, chances are that a bug that you are about to report has already been fixed. If possible, save us and yourself time and try first to upgrade to the latest version, and only if the bug persists report it.
Reviewing the Changes file may help as well. Here is the Changes file of the most recenly released version: http://apache.org/dist/perl/mod_perl-2.0-current/Changes .
If the problem persists with the latest version, you may also want to try to reproduce the problem with the latest development version. It's possible that the problem was resolved since the last release has been made. Of course if this version solves the problem, don't rush to put it in production unless you know what you are doing. Instead ask the developers when the new version will be released.
Make sure to include a good subject like explaining the problem in a few words. Also please mention that this a problem with mod_perl 2.0 and not mod_perl 1.0. Here is an example of a good subject:
Subject: [mp2] protocol module doesn't work with filters
This is especially important now that we support mod_perl versions 1.0 and 2.0 on the same list.
When sending the bug report, please inline it and don't attach it to the email. It's hard following up on the attachments.
Whenever you send a bug report make sure to include the information about your system.
If you haven't yet installed mod_perl and/or you are having problems with the test suite -- you should do:
% cd modperl-2.0 % t/REPORT > mybugreport
modperl-2.0 is the source directory where mod_perl was built.
t/REPORT utility is autogenerated when
perl Makefile.PL is
run, so you should have it already after building mod_perl.
If you have already installed mod_perl and are having problems with things unrelated to the the test suite -- you should do:
% mp2bug > mybugreport
mp2bug should have been installed at the same time mod_perl 2.0 was
installed. If for some reason you can't find it, you can alternatively
run the following command, which does the same:
% perl -MApache2 -MApache::TestReportPerl \ -le 'Apache::TestReportPerl->new->run' > mybugreport
Please post the report (mybugreport) inlined in the text of your message, and not as an attachment!
If the problem is with the mod_perl distribution test suite, refer to the 'make test' Failures section.
If the problem incurs with your own code, please try to reduce the code to the very minimum and include it in the bug report. Remember that if you include a long code, chances that somebody will look at it are low. If the problem is with some CPAN module, just provide its name.
Also remember to include the relevant part of httpd.conf and of startup.pl if applicable. Don't include whole files, only the parts that should aid to understand and reproduce the problem.
Finally don't forget to copy-n-paste (not type!) the relevant part of the error_log file (not the whole file!).
To further increase the chances that bugs your code exposes will be
investigated, try using
Apache-Test to create a
self-contained test that core developers can easily run. To get you
Apache-Test bug skeleton has been created:
Detailed instructions are contained within the
README file in that
Finally, if you get a segfault with or without a core dump, refer to the Resolving Segmentation Faults section.
If when running
make test some of the tests fail, please re-run
them in the verbose mode and post the output of that run and the
contents of the t/logs/error_log file to the list. Please do not
post the t/logs/error_log file from
make test that runs a
complete test suite, as it contains a lot of irrelevant information.
For example if '
make test' reports:
Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------ compat/apache_util.t 15 1 6.67% 13 modperl/pnotes.t 5 1 20% 2
Do the following:
% cd modperl-2.0.xx % make test TEST_VERBOSE=1 \ TEST_FILES="compat/apache_util.t modperl/pnotes.t"
or use an alternative way:
% cd modperl-2.0.xx % t/TEST -clean % t/TEST -verbose compat/apache_util.t modperl/pnotes.t
In the latter approach,
t/TEST -clean cleans things up before
starting a new test. Make sure that you don't forget to run it, before
running the individual tests.
Now post to the mailing list the output of the individual tests running and the contents of t/logs/error_log.
Also please notice that there is more than one
make test being
run. The first one is running at the top directory, the second in a
sub-directory ModPerl-Registry/. The first logs errors to
t/logs/error_log, the second too, but relative to
ModPerl-Registry/. Therefore if you get failures in the second run,
make sure to
chdir() to that directory before you look at the
t/logs/error_log file and re-run tests in the verbose mode. For
% cd modperl-2.0.xx/ModPerl-Registry % t/TEST -clean % t/TEST -verbose closure.t
At the moment the second test suite is not run if the first one fails.
make test or the use of mod_perl you get a segmentation
fault you should send to the list a stack backtrace. This section explains how to
get the core file and extract this backtrace. Once a proper stack
backtrace is obtained append it to the bug report as explained in the
If you have general Apache questions, please refer to: http://httpd.apache.org/lists.html.
If you have general Perl questions, please refer to: http://lists.perl.org/.
For other remotely related to mod_perl questions see the references to other documentation.
Finally, if you are not familiar with the modperl list etiquette, please refer to the mod_perl mailing lists' Guidelines before posting.
When developing with mod_perl, you often find yourself having questions regarding other projects and topics like Apache, Perl, SQL, etc. This document will help you find the right resource where you can find the answers to your questions.
Maintainer is the person(s) you should contact with updates, corrections and patches.
Only the major authors are listed above. For contributors see the Changes file.