You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Paul Simon <wr...@yahoo.com> on 2003/04/03 18:10:39 UTC

[mp2] make test errors

Is this something to be worried about? Or can I
continue with make install? Please help.

System: FreeBSD 4.8-RELEASE
Server version: Apache/2.0.45

I received the following summary from make test:

Failed Test       Stat Wstat Total Fail  Failed  List
of Failed
-------------------------------------------------------------------------------
apr/perlio.t                    11   11 100.00%  1-11
apr/threadmutex.t                3    3 100.00%  1-3
4 tests skipped.
*** server localhost:8529 shutdown
!!! error running tests (please examine
t/logs/error_log)
*** Error code 1

The error_log follows:
END in modperl_extra.pl, pid=57443
[Thu Apr 03 19:37:27 2003] [notice] Apache/2.0.45
(Unix) mod_perl/1.99_08 Perl/v5.8.0 configured --
resuming normal operations
[Thu Apr 03 19:37:27 2003] [info] Server built: Apr  3
2003 09:02:09
[Thu Apr 03 19:37:27 2003] [debug] prefork.c(1039):
AcceptMutex: flock (default: flock)
[Thu Apr 03 19:37:28 2003] [error] server reached
MaxClients setting, consider raising the MaxClients
setting
[Thu Apr 03 19:38:37 2003] [info] [client 127.0.0.1]
TestAPI::aplog test in progress
[Thu Apr 03 19:38:37 2003] [debug]
/usr/src/mod_perl-1.99_08/t/response/TestAPI/aplog.pm(43):
log_serror test ok
[Thu Apr 03 19:38:37 2003] [debug]
/usr/src/mod_perl-1.99_08/t/response/TestAPI/aplog.pm(46):
(20007)No time was provided and one was required.:
log_serror test 2 ok
[Thu Apr 03 19:38:37 2003] [debug]
/usr/src/mod_perl-1.99_08/t/response/TestAPI/aplog.pm(49):
[client 127.0.0.1] (20007)No time was provided and one
was required.: log_rerror test ok
[Thu Apr 03 19:38:37 2003] [error] $r->log_error test
ok
[Thu Apr 03 19:38:37 2003] [error] $s->log_error test
ok
[Thu Apr 03 19:38:37 2003] [debug]
/usr/src/mod_perl-1.99_08/t/response/TestAPI/aplog.pm(63):
TestAPI::aplog test done
[Thu Apr 03 19:38:37 2003] [warn] ApacheApache->warn
test ok
[Thu Apr 03 19:38:37 2003] [warn] $s->warn test ok
[Thu Apr 03 19:40:25 2003] [error] [client 127.0.0.1]
mkdir /usr/src/mod_perl-1.99_08/t/htdocs/perlio:
Permission denied at
/usr/src/mod_perl-1.99_08/Apache-Test/lib/Apache/TestUtil.pm
line 128

[Thu Apr 03 19:40:50 2003] [error] [client 127.0.0.1]
Can't locate APR/ThreadMutex.pm in @INC (@INC
contains: /usr/src/mod_perl-1.99_08/t
/usr/src/mod_perl-1.99_08/blib/lib/Apache2
/usr/src/mod_perl-1.99_08/blib/arch/Apache2
/usr/src/mod_perl-1.99_08/Apache-Test/lib
/usr/src/mod_perl-1.99_08/lib
/usr/src/mod_perl-1.99_08/blib/lib
/usr/src/mod_perl-1.99_08/blib/arch
/usr/src/mod_perl-1.99_08/t/response
/usr/src/mod_perl-1.99_08/t/protocol
/usr/src/mod_perl-1.99_08/t/hooks
/usr/src/mod_perl-1.99_08/t/filter
/usr/src/mod_perl-1.99_08/t/htdocs/testdirective/perlmodule-vh
/usr/src/mod_perl-1.99_08/t/htdocs/testdirective/main
/usr/local/lib/perl5/5.8.0/i386-freebsd
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/i386-freebsd
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl) at
/usr/src/mod_perl-1.99_08/t/response/TestAPR/threadmutex.pm
line 17.

[Thu Apr 03 19:41:08 2003] [error] Apache::log_error
test ok
[Thu Apr 03 19:44:29 2003] [error] [client 127.0.0.1]
File does not exist:
/usr/src/mod_perl-1.99_08/t/htdocs/nope
[Thu Apr 03 19:45:57 2003] [error] [client 127.0.0.1]
need AuthName: /TestModperl::setauth
[Thu Apr 03 19:46:40 2003] [info] removed PID file
/usr/src/mod_perl-1.99_08/t/logs/httpd.pid (pid=57444)
[Thu Apr 03 19:46:40 2003] [notice] caught SIGTERM,
shutting down
END in modperl_extra.pl, pid=57444

Thanks
Paul


=====
'Ideals are like stars. We may never reach them, but we use them to chart our course.' -- Unknown

Re: [mp2] make test errors

Posted by Stas Bekman <st...@stason.org>.
> I installed the following:
> modperl-2.0_20030407224456.tar.gz

Can you apply this patch and try again?

Index: Apache-Test/lib/Apache/TestConfig.pm
===================================================================
RCS file: 
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.149
diff -u -r1.149 TestConfig.pm
--- Apache-Test/lib/Apache/TestConfig.pm	4 Apr 2003 00:28:37 -0000	1.149
+++ Apache-Test/lib/Apache/TestConfig.pm	9 Apr 2003 01:36:59 -0000
@@ -448,7 +448,19 @@
      #use only first value if $) contains more than one
      $gid =~ s/^(\d+).*$/$1/;

-    $ENV{APACHE_GROUP} || (getgrgid($gid) || "#$gid");
+    my $group = $ENV{APACHE_GROUP} || (getgrgid($gid) || "#$gid");
+
+    if ($group eq 'root') {
+        # similar to default_user, we want to avoid perms problems,
+        # when the server is started with group 'root'. When running
+        # under group root it may fail to create dirs and files,
+        # writable only by user
+        my $user = default_user();
+        my $gid = $user ? (getpwnam($user))[3] : '';
+        $group = (getgrgid($gid) || "#$gid") if $gid;
+    }
+
+    $group;
  }

  sub default_user {

if after applying the patch and running 'make test', the problem with mkdir 
perms persists, please read on:

>>I've mapped the failures to the error_log entries:
>>
>>
>>>apr/perlio.t                    11   11 100.00% 
>>
>>1-11
>>
>> > mkdir /usr/src/mod_perl-1.99_08/t/htdocs/perlio:
>> > Permission denied at
>> >
>>
> /usr/src/mod_perl-1.99_08/Apache-Test/lib/Apache/TestUtil.pm
> 
>>why do you have a perm problem? Do you run the test
>>as root? What are the 
>>perms of /usr/src/mod_perl-1.99_08/t/htdocs 
>>/usr/src/mod_perl-1.99_08/t/htdocs/perlio
> 
> 
> I ran the test as root. Only the user, 500, had write
> permissions. 

Can I see the real (not interpreted) output of the following commands:

% ls -l /usr/src/mod_perl-1.99_08/t
% ls -l /usr/src/mod_perl-1.99_08/t/htdocs/
% grep User /usr/src/mod_perl-1.99_08/t/conf/httpd.conf
% grep Group /usr/src/mod_perl-1.99_08/t/conf/httpd.conf

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: [mp2] make test errors

Posted by Stas Bekman <st...@stason.org>.
Let's split the issues. Here we handle the TestAPR/threadmutex.pm problem

>>>apr/threadmutex.t                3    3 100.00% 

You get no failure for this test with the latest cvs, instead the test is 
skipped, am I right?

>>>Can't locate APR/ThreadMutex.pm in @INC (@INC
>>>contains: /usr/src/mod_perl-1.99_08/t
>>
>>If you look at t/response/TestAPR/threadmutex.pm. It
>>runs this check:
>>
>>     plan $r, tests => 3, have_threads;

[...]

>>Can you do (adjust the path to the include dir of
>>the httpd server):
>>
>>grep HAS_THREADS ~/httpd/prefork/include/apr.h
> 
> 
> #define APR_HAS_THREADS           0
> 
> 
>>and also run (with the same perl):
>>
>>perl -V:useithreads
> 
> 
> useithreads='undef';

looks good. have_threads should return 0 in this case and the test should be 
skipped.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: [mp2] make test errors

Posted by Paul Simon <wr...@yahoo.com>.
--- Stas Bekman <st...@stason.org> wrote:
> Paul Simon wrote:
> > Is this something to be worried about? Or can I
> > continue with make install? Please help.
> 
> Probably not unless you use APR::PerlIO and
> APR::ThreadMutex, so you can go 
> with 'make install'.
> 
> However let's solve the problems nevertheless.
> 
> Could you first install the latest cvs, so we can
> work with the same version.

I installed the following:
modperl-2.0_20030407224456.tar.gz
 
> I've mapped the failures to the error_log entries:
> 
> > apr/perlio.t                    11   11 100.00% 
> 1-11
> 
>  > mkdir /usr/src/mod_perl-1.99_08/t/htdocs/perlio:
>  > Permission denied at
>  >
>
/usr/src/mod_perl-1.99_08/Apache-Test/lib/Apache/TestUtil.pm
> 
> why do you have a perm problem? Do you run the test
> as root? What are the 
> perms of /usr/src/mod_perl-1.99_08/t/htdocs 
> /usr/src/mod_perl-1.99_08/t/htdocs/perlio

I ran the test as root. Only the user, 500, had write
permissions. 

> > apr/threadmutex.t                3    3 100.00% 
> 1-3
> 
> > [Thu Apr 03 19:40:50 2003] [error] [client
> 127.0.0.1]
> > Can't locate APR/ThreadMutex.pm in @INC (@INC
> > contains: /usr/src/mod_perl-1.99_08/t
> 
> If you look at t/response/TestAPR/threadmutex.pm. It
> runs this check:
> 
>      plan $r, tests => 3, have_threads;
> 
> The have_threads function (which lives in
> Apache-Test/lib/Apache/Test.pm) 
> checks these predicaments:
> 
>      $apr_config->{HAS_THREADS}
>      $Config{useithreads} eq 'define';
> 
> mod_perl build code (which lives in
> lib/ModPerl/BuildMM.pm) skips building 
> APR::ThreadMutex if apr doesn't have HAS_THREADS
> defined.
> 
>      if ($path =~ m/(Thread|Global)Mutex/) {
>          return unless $apr_config->{HAS_THREADS};
>      }
> 
> It's strange that the build saw that apr has no
> HAS_THREADS, while the test 
> saw the opposite.
> 
> Can you do (adjust the path to the include dir of
> the httpd server):
> 
> grep HAS_THREADS ~/httpd/prefork/include/apr.h

#define APR_HAS_THREADS           0

> and also run (with the same perl):
> 
> perl -V:useithreads

useithreads='undef';

Here are the test results using
modperl-2.0_20030407224456:

END in modperl_extra.pl, pid=57036
[Tue Apr 08 05:51:06 2003] [notice] Apache/2.0.45
(Unix) mod_perl/1.99_09-dev Pe
rl/v5.8.0 configured -- resuming normal operations
[Tue Apr 08 05:51:06 2003] [info] Server built: Apr  8
2003 03:45:03
[Tue Apr 08 05:51:06 2003] [debug] prefork.c(1039):
AcceptMutex: flock (default:
 flock)
[Tue Apr 08 05:51:07 2003] [error] server reached
MaxClients setting, consider r
aising the MaxClients setting
[Tue Apr 08 05:52:30 2003] [info] [client 127.0.0.1]
TestAPI::aplog test in prog
ress
[Tue Apr 08 05:52:30 2003] [debug]
/usr/local/src/modperl-2.0/t/response/TestAPI
/aplog.pm(43): log_serror test ok
[Tue Apr 08 05:52:30 2003] [debug]
/usr/local/src/modperl-2.0/t/response/TestAPI
/aplog.pm(46): (20007)No time was provided and one was
required.: log_serror tes
t 2 ok
[Tue Apr 08 05:52:30 2003] [debug]
/usr/local/src/modperl-2.0/t/response/TestAPI
/aplog.pm(49): [client 127.0.0.1] (20007)No time was
provided and one was requir
ed.: log_rerror test ok
[Tue Apr 08 05:52:30 2003] [error] $r->log_error test
ok
[Tue Apr 08 05:52:30 2003] [error] $s->log_error test
ok
[Tue Apr 08 05:52:30 2003] [debug]
/usr/local/src/modperl-2.0/t/response/TestAPI
/aplog.pm(63): TestAPI::aplog test done
[Tue Apr 08 05:52:30 2003] [warn] ApacheApache->warn
test ok
[Tue Apr 08 05:52:30 2003] [warn] $s->warn test ok
[Tue Apr 08 05:55:02 2003] [error] Apache::log_error
test ok

*** The following error entry is expected and it is
harmless ***
[Tue Apr 08 05:57:34 2003] [error] [client 127.0.0.1]
Undefined subroutine &Test
Error::runtime::no_such_func called at
/usr/local/src/modperl-2.0/t/response/Tes
tError/runtime.pm line 19.


*** The following error entry is expected and it is
harmless ***
[Tue Apr 08 05:57:40 2003] [error] failed to resolve
handler `TestError::syntax'
[Tue Apr 08 05:57:40 2003] [error] [client 127.0.0.1]
syntax error at /usr/local
/src/modperl-2.0/t/response/TestError/syntax.pm line
22, near "\;"
Compilation failed in require at (eval 110) line 3.

[echo_filter] get_brigade: Unknown error: 0

*** The following error entry is expected and it is
harmless ***
[Tue Apr 08 06:00:40 2003] [error] [client 127.0.0.1]
File does not exist: /usr/
local/src/modperl-2.0/t/htdocs/nope

*** The following error entry is expected and it is
harmless ***
[Tue Apr 08 06:02:27 2003] [error] [client 127.0.0.1]
need AuthName: /TestModper
l::setauth
[Tue Apr 08 06:03:32 2003] [info] Child process
pid=57038 is exiting
[Tue Apr 08 06:03:32 2003] [info] removed PID file
/usr/local/src/modperl-2.0/t/
logs/httpd.pid (pid=57037)
[Tue Apr 08 06:03:32 2003] [notice] caught SIGTERM,
shutting down
END in modperl_extra.pl, pid=57037

Re: [mp2] make test errors

Posted by Stas Bekman <st...@stason.org>.
Paul Simon wrote:
> Is this something to be worried about? Or can I
> continue with make install? Please help.

Probably not unless you use APR::PerlIO and APR::ThreadMutex, so you can go 
with 'make install'.

However let's solve the problems nevertheless.

Could you first install the latest cvs, so we can work with the same version.

I've mapped the failures to the error_log entries:

> apr/perlio.t                    11   11 100.00%  1-11

 > mkdir /usr/src/mod_perl-1.99_08/t/htdocs/perlio:
 > Permission denied at
 > /usr/src/mod_perl-1.99_08/Apache-Test/lib/Apache/TestUtil.pm

why do you have a perm problem? Do you run the test as root? What are the 
perms of /usr/src/mod_perl-1.99_08/t/htdocs 
/usr/src/mod_perl-1.99_08/t/htdocs/perlio

> apr/threadmutex.t                3    3 100.00%  1-3

> [Thu Apr 03 19:40:50 2003] [error] [client 127.0.0.1]
> Can't locate APR/ThreadMutex.pm in @INC (@INC
> contains: /usr/src/mod_perl-1.99_08/t

If you look at t/response/TestAPR/threadmutex.pm. It runs this check:

     plan $r, tests => 3, have_threads;

The have_threads function (which lives in Apache-Test/lib/Apache/Test.pm) 
checks these predicaments:

     $apr_config->{HAS_THREADS}
     $Config{useithreads} eq 'define';

mod_perl build code (which lives in lib/ModPerl/BuildMM.pm) skips building 
APR::ThreadMutex if apr doesn't have HAS_THREADS defined.

     if ($path =~ m/(Thread|Global)Mutex/) {
         return unless $apr_config->{HAS_THREADS};
     }

It's strange that the build saw that apr has no HAS_THREADS, while the test 
saw the opposite.

Can you do (adjust the path to the include dir of the httpd server):

grep HAS_THREADS ~/httpd/prefork/include/apr.h

and also run (with the same perl):

perl -V:useithreads

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com