You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Michael G Schwern <sc...@pobox.com> on 2005/08/11 21:41:43 UTC

[mp2] "make test" failure in t/api/access2

-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

t/api/access2....1..6
# Running under perl version 5.008006 for darwin
# Current time local: Thu Aug 11 12:36:04 2005
# Current time GMT:   Thu Aug 11 19:36:04 2005
# Using Test.pm version 1.25
# Using Apache/Test.pm version 1.25
ok 1
# Failed test 2 in t/api/access2.t at line 15
# testing : no credentials passed
# expected: 401
# received: 403
not ok 2
ok 3
ok 4
not ok 5
# Failed test 5 in t/api/access2.t at line 24
not ok 6
# Failed test 6 in t/api/access2.t at line 27
FAILED tests 2, 5-6
        Failed 3/6 tests, 50.00% okay


2. Used Components and their Configuration:

*** mod_perl version 2.000001

*** using /usr/local/src/CPAN/mod_perl-2.0.1/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB     => aprext
  MP_APXS        => /sw/sbin/apxs
  MP_COMPAT_1X   => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_USE_DSO     => 1


*** /sw/sbin/httpd -V
Server version: Apache/2.0.52
Server built:   Mar  5 2005 04:37:37
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/worker"
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/sw/var/apache2"
 -D SUEXEC_BIN="/sw/var/apache2/bin/suexec"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/sw/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/sw/etc/apache2/httpd.conf"


*** (apr|apu)-config linking info

 -L/sw/lib -laprutil-0 -lldap -llber -lgdbm -ldb-4.2 -lexpat -liconv
 -L/sw/lib -lapr-0 -lresolv  -lpthread



*** /sw/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
    osname=darwin, osvers=7.9.0, archname=darwin-thread-multi-2level
    uname='darwin windhund.schwern.org 7.9.0 darwin kernel version 7.9.0: wed mar 30 20:11:17 pst 2005; root:xnuxnu-517.12.7.obj~1release_ppc power macintosh powerpc '
    config_args='-des -Dcc=gcc-3.3 -Dcpp=gcc-3.3 -E -Dprefix=/sw -Dvendorprefix=/sw -Dccflags=-I/sw/include -Dldflags=-L/sw/lib -Dperladmin=none -Uinstallusrbinperl -Dprivlib=/sw/lib/perl5-core/5.8.6 -Dman3dir=/sw/lib/perl5-core/5.8.6/man/man3 -Dman3ext=3pm -Dvendorlib=/sw/lib/perl5/5.8.6 -Dvendorman3dir=/sw/lib/perl5/5.8.6/man/man3 -Duseithreads -Dinc_version_list=5.8.1 5.8.0 5.6.0 -Adefine:startperl=#!/sw/bin/perl5.8.6 -Dotherlibdirs=/Library/Perl'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc-3.3', ccflags ='-I/sw/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe',
    optimize='-Os',
    cppflags='-no-cpp-precomp -I/sw/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe'
    ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc. build 1671)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='-L/sw/lib -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib
    libs=-ldbm -ldl -lm -lc
    perllibs=-ldl -lm -lc
    libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-L/sw/lib -bundle -undefined dynamic_lookup -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Built under darwin
  Compiled at May 10 2005 16:16:08
  %ENV:
    PERL5LIB="/sw/lib/perl5:/sw/lib/perl5/darwin"
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /sw/lib/perl5/5.8.6/darwin-thread-multi-2level
    /sw/lib/perl5/5.8.6
    /sw/lib/perl5/5.8.1
    /sw/lib/perl5
    /sw/lib/perl5/darwin
    /sw/lib/perl5-core/5.8.6/darwin-thread-multi-2level
    /sw/lib/perl5-core/5.8.6
    /sw/lib/perl5/site_perl/5.8.6/darwin-thread-multi-2level
    /sw/lib/perl5/site_perl/5.8.6
    /sw/lib/perl5/site_perl
    /sw/lib/perl5/5.8.6/darwin-thread-multi-2level
    /sw/lib/perl5/5.8.6
    /sw/lib/perl5/5.8.1
    /sw/lib/perl5
    /Library/Perl/5.8.1
    /Library/Perl
    .

*** Packages of interest status:

Apache2            : -
Apache2::Request   : -
CGI                : 3.10
ExtUtils::MakeMaker: 6.30
LWP                : 5.803, 5.803, 5.803
mod_perl           : -
mod_perl2          : -


3. This is the core dump trace: (if you get a core dump):

  [CORE TRACE COMES HERE]

This report was generated by t/REPORT on Thu Aug 11 19:33:47 2005 GMT.

-------------8<---------- End Bug Report --------------8<----------

Re: [mp2] "make test" failure in t/api/access2

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Stas Bekman wrote:
> Or may be we could just:
> 
> Index: t/response/TestAPI/access2.pm
> ===================================================================
> --- t/response/TestAPI/access2.pm       (revision 225490)
> +++ t/response/TestAPI/access2.pm       (working copy)
> @@ -98,9 +98,7 @@
> 
>      <IfModule @ACCESS_MODULE@>
>          # needed to test $r->satisfies
> -        Order Deny,Allow
> -        Deny from all
> -        Allow from @servername@
> +        Allow from All

+1 - as it stands now the setup assumes that the box has no problems with
its dns settings (or other non-mod_perl things that could get in the way),
which is out of our control and not something we ought to be testing for anyway.

--Geoff

Re: [mp2] "make test" failure in t/api/access2

Posted by Stas Bekman <st...@stason.org>.
Or may be we could just:

Index: t/response/TestAPI/access2.pm
===================================================================
--- t/response/TestAPI/access2.pm       (revision 225490)
+++ t/response/TestAPI/access2.pm       (working copy)
@@ -98,9 +98,7 @@

      <IfModule @ACCESS_MODULE@>
          # needed to test $r->satisfies
-        Order Deny,Allow
-        Deny from all
-        Allow from @servername@
+        Allow from All
      </IfModule>
      AuthType Basic
      AuthName "Access"


-- 
__________________________________________________________________
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" failure in t/api/access2

Posted by Michael G Schwern <sc...@pobox.com>.
On Tue, Aug 16, 2005 at 04:05:21PM -0700, Stas Bekman wrote:
> Looks fine. Dunno why it doesn't end up in the right place. Do you load 
> some module that overrides SIG{__WARN__}?

Nope.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
'All anyone gets in a mirror is themselves,' she said. 'But what you
gets in a good gumbo is everything.'
	-- "Witches Abroad" by Terry Prachett

Re: [mp2] "make test" failure in t/api/access2

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Michael G Schwern wrote:
> On Mon, Aug 15, 2005 at 05:54:53PM -0700, Stas Bekman wrote:
> 
>>Where does it go then?  Are you sure you've applied the patch and the warn 
>>statement is there?
> 
> 
> Grepping the source tree the only instance of "myip" is in 
> t/response/TestAPI/access2.pm which I put in there according to your
> instructions.
> 
> 0 windhund /usr/local/src/CPAN/mod_perl-2.0.1$ rgrep 'myip'
> ./t/response/TestAPI/access2.pm:    warn "myip: ", $r->connection->remote_ip, "\n";
> 
> 
> t/response/TestAPI/access2.pm attached.
Doesn't STDERR get redirected (re-tied) to t/error_log by A-T.  I 
believe a print STDOUT will suffice here ?


-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com

Re: [mp2] "make test" failure in t/api/access2

Posted by Stas Bekman <st...@stason.org>.
Michael G Schwern wrote:
> On Mon, Aug 15, 2005 at 05:54:53PM -0700, Stas Bekman wrote:
> 
>>Where does it go then?  Are you sure you've applied the patch and the warn 
>>statement is there?
> 
> 
> Grepping the source tree the only instance of "myip" is in 
> t/response/TestAPI/access2.pm which I put in there according to your
> instructions.
> 
> 0 windhund /usr/local/src/CPAN/mod_perl-2.0.1$ rgrep 'myip'
> ./t/response/TestAPI/access2.pm:    warn "myip: ", $r->connection->remote_ip, "\n";
> 
> 
> t/response/TestAPI/access2.pm attached.

Looks fine. Dunno why it doesn't end up in the right place. Do you load 
some module that overrides SIG{__WARN__}?

In any case I've committed the fix I've posted earlier, so you shouldn't 
have this issue anymore.


-- 
__________________________________________________________________
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" failure in t/api/access2

Posted by Michael G Schwern <sc...@pobox.com>.
On Mon, Aug 15, 2005 at 05:54:53PM -0700, Stas Bekman wrote:
> Where does it go then?  Are you sure you've applied the patch and the warn 
> statement is there?

Grepping the source tree the only instance of "myip" is in 
t/response/TestAPI/access2.pm which I put in there according to your
instructions.

0 windhund /usr/local/src/CPAN/mod_perl-2.0.1$ rgrep 'myip'
./t/response/TestAPI/access2.pm:    warn "myip: ", $r->connection->remote_ip, "\n";


t/response/TestAPI/access2.pm attached.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
'All anyone gets in a mirror is themselves,' she said. 'But what you
gets in a good gumbo is everything.'
	-- "Witches Abroad" by Terry Prachett

Re: [mp2] "make test" failure in t/api/access2

Posted by Stas Bekman <st...@stason.org>.
Michael G Schwern wrote:
> On Fri, Aug 12, 2005 at 09:19:13PM -0700, Stas Bekman wrote:
> 
>>>On Fri, Aug 12, 2005 at 08:47:30PM -0700, Stas Bekman wrote:
>>>
>>>
>>>>e.g. inside a handler t/response/TestAPI/access2.pm
>>>
>>>
>>>Put it in there and didn't see any extra output in STDERR or error.log.
>>
>>what test are you running?
>>
>>t/TEST t/api/access2.t
> 
> 
> That test.

Where does it go then?  Are you sure you've applied the patch and the warn 
statement is there?

-- 
__________________________________________________________________
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" failure in t/api/access2

Posted by Michael G Schwern <sc...@pobox.com>.
On Fri, Aug 12, 2005 at 09:19:13PM -0700, Stas Bekman wrote:
> >On Fri, Aug 12, 2005 at 08:47:30PM -0700, Stas Bekman wrote:
> >
> >>e.g. inside a handler t/response/TestAPI/access2.pm
> >
> >
> >Put it in there and didn't see any extra output in STDERR or error.log.
> 
> what test are you running?
> 
> t/TEST t/api/access2.t

That test.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Reality is that which, when you stop believing in it, doesn't go away.
	-- Phillip K. Dick

Re: [mp2] "make test" failure in t/api/access2

Posted by Stas Bekman <st...@stason.org>.
Michael G Schwern wrote:
> On Fri, Aug 12, 2005 at 08:47:30PM -0700, Stas Bekman wrote:
> 
>>e.g. inside a handler t/response/TestAPI/access2.pm
> 
> 
> Put it in there and didn't see any extra output in STDERR or error.log.

what test are you running?

t/TEST t/api/access2.t

error_log:

myip: 127.0.0.1
myip: 127.0.0.1
myip: 127.0.0.1
myip: 127.0.0.1
myip: 127.0.0.1
myip: 127.0.0.1
myip: 127.0.0.1
myip: 127.0.0.1
myip: 127.0.0.1
myip: 127.0.0.1


-- 
__________________________________________________________________
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" failure in t/api/access2

Posted by Michael G Schwern <sc...@pobox.com>.
On Fri, Aug 12, 2005 at 08:47:30PM -0700, Stas Bekman wrote:
> e.g. inside a handler t/response/TestAPI/access2.pm

Put it in there and didn't see any extra output in STDERR or error.log.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
You know what the chain of command is? It's the chain I go get and beat you 
with 'til you understand who's in ruttin' command here. 
        -- Jayne Cobb, "Firefly"

Re: [mp2] "make test" failure in t/api/access2

Posted by Stas Bekman <st...@stason.org>.
Michael G Schwern wrote:
> On Fri, Aug 12, 2005 at 07:22:34PM -0700, Stas Bekman wrote:
> 
>>>Replacing "Allow from localhost" with "Allow from All" did it.
>>
>>Why the localhost setting doesn't work? 
> 
> 
> Dunno.  localhost looks ok from my end.
> 
> $ host localhost
> localhost has address 127.0.0.1
> $ hostname
> windhund.schwern.org 
> 
> 
> 
>>What localhost gets resolved to 
>>and what your client is seen as on the server side (warn 
>>$r->connection->remote_ip), Michael?
> 
> 
> Where do I put that code?

e.g. inside a handler t/response/TestAPI/access2.pm

Index: t/response/TestAPI/access2.pm
===================================================================
--- t/response/TestAPI/access2.pm       (revision 225490)
+++ t/response/TestAPI/access2.pm       (working copy)
@@ -47,6 +47,10 @@

      die '$r->some_auth_required failed' unless $r->some_auth_required;

+    use Apache2::RequestRec ();
+    use Apache2::Connection ();
+    warn "myip: ", $r->connection->remote_ip, "\n";
+
      my $satisfies = $r->satisfies;
      die "wanted satisfies=" . Apache2::Const::SATISFY_ALL . ", got 
$satisfies"
          unless $r->satisfies() == Apache2::Const::SATISFY_ALL;


-- 
__________________________________________________________________
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" failure in t/api/access2

Posted by Michael G Schwern <sc...@pobox.com>.
On Fri, Aug 12, 2005 at 07:22:34PM -0700, Stas Bekman wrote:
> >Replacing "Allow from localhost" with "Allow from All" did it.
> 
> Why the localhost setting doesn't work? 

Dunno.  localhost looks ok from my end.

$ host localhost
localhost has address 127.0.0.1
$ hostname
windhund.schwern.org 


> What localhost gets resolved to 
> and what your client is seen as on the server side (warn 
> $r->connection->remote_ip), Michael?

Where do I put that code?


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
...they shared one last kiss that left a bitter yet sweet taste in her 
mouth--kind of like throwing up after eating a junior mint.
        -- Dishonorable Mention, 2005 Bulwer-Lytton Fiction Contest 
           by Tami Farmer

Re: [mp2] "make test" failure in t/api/access2

Posted by Stas Bekman <st...@stason.org>.
Michael G Schwern wrote:
> On Thu, Aug 11, 2005 at 11:09:06PM -0500, Randy Kobes wrote:
> 
>>On Thu, 11 Aug 2005, Michael G Schwern wrote:
>>
>>
>>>On Thu, Aug 11, 2005 at 04:21:18PM -0400, Philip M. Gollucci wrote:
>>>
>>>>What was in the t/error_log file?
>>>
>>>Logs for running t/api/access2.t attached.
>>
>>Does the suggestion at
>>   http://marc.theaimsgroup.com/?t=110506540600001&r=1&w=2
>>apply and/or help?
>  
> Replacing "Allow from localhost" with "Allow from All" did it.

Why the localhost setting doesn't work? What localhost gets resolved to 
and what your client is seen as on the server side (warn 
$r->connection->remote_ip), Michael?


-- 
__________________________________________________________________
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" failure in t/api/access2

Posted by Michael G Schwern <sc...@pobox.com>.
On Thu, Aug 11, 2005 at 11:09:06PM -0500, Randy Kobes wrote:
> On Thu, 11 Aug 2005, Michael G Schwern wrote:
> 
> >On Thu, Aug 11, 2005 at 04:21:18PM -0400, Philip M. Gollucci wrote:
> >>What was in the t/error_log file?
> >
> >Logs for running t/api/access2.t attached.
> 
> Does the suggestion at
>    http://marc.theaimsgroup.com/?t=110506540600001&r=1&w=2
> apply and/or help?

Replacing "Allow from localhost" with "Allow from All" did it.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
You know what the chain of command is? It's the chain I go get and beat you 
with 'til you understand who's in ruttin' command here. 
        -- Jayne Cobb, "Firefly"

Re: [mp2] "make test" failure in t/api/access2

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 11 Aug 2005, Michael G Schwern wrote:

> On Thu, Aug 11, 2005 at 04:21:18PM -0400, Philip M. Gollucci wrote:
>> What was in the t/error_log file?
>
> Logs for running t/api/access2.t attached.

Does the suggestion at
    http://marc.theaimsgroup.com/?t=110506540600001&r=1&w=2
apply and/or help?

-- 
best regards,
randy kobes

Re: [mp2] "make test" failure in t/api/access2

Posted by Michael G Schwern <sc...@pobox.com>.
On Thu, Aug 11, 2005 at 04:21:18PM -0400, Philip M. Gollucci wrote:
> What was in the t/error_log file?

Logs for running t/api/access2.t attached.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Don't try the paranormal until you know what's normal.
	-- "Lords and Ladies" by Terry Prachett

Re: [mp2] "make test" failure in t/api/access2

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Michael G Schwern wrote:
> -------------8<---------- Start Bug Report ------------8<----------
> 1. Problem Description:
> 
> t/api/access2....1..6
> # Running under perl version 5.008006 for darwin
> # Current time local: Thu Aug 11 12:36:04 2005
> # Current time GMT:   Thu Aug 11 19:36:04 2005
> # Using Test.pm version 1.25
> # Using Apache/Test.pm version 1.25
> ok 1
> # Failed test 2 in t/api/access2.t at line 15
> # testing : no credentials passed
> # expected: 401
> # received: 403
> not ok 2
> ok 3
> ok 4
> not ok 5
> # Failed test 5 in t/api/access2.t at line 24
> not ok 6
> # Failed test 6 in t/api/access2.t at line 27
> FAILED tests 2, 5-6
>         Failed 3/6 tests, 50.00% okay
What was in the t/error_log file?