Re: [mp2] mod_perl test suite fails

2003-12-05 Thread Volker Kroll
On Fri, 2003-12-05 at 02:16, Stas Bekman wrote:

> > -8<-- Start Bug Report 8<--
> > 1. Problem Description:
> > 
> > mod_perl compiles fine but all tests seem to fail.
> > 
> > in the error log I do find:
> > 
> > **03 14:42:34 2003] [error] failed to resolve handler `TestHooks::trans'
> > [Wed Dec 03 14:42:34 2003] [error] [client 127.0.0.1] Can't locate
> > TestHooks/trans.pm in @INC (@INC contains:
> 
> My favorite bug report. Can you please rebuild mp with MP_TRACE=1
> 
> perl Makefile.PL ... MP_TRACE=1
> 
> and post the output of run
> 
> % rm t/logs/error_log
> % MOD_PERL_TRACE=gh t/TEST
> 
> and t/logs/error_log itself

Hi,

it seems, that the tests are working on my workcomputer where I work as
a normal user but not on one of my servers, where I only work as root.
Here is the log running as root (shortened a little).

Hope it helps.

Regards
Volker

%---
[Fri Dec 05 10:43:31 2003] [info] mod_unique_id: using ip addr
192.168.0.121
END in modperl_extra.pl, pid=13138
[Fri Dec 05 10:43:32 2003] [info] mod_unique_id: using ip addr
192.168.0.121
[Fri Dec 05 10:43:33 2003] [notice] Apache/2.0.48 (Unix)
mod_perl/1.99_11 Perl/v5.8.2 configured -- resuming normal operations
[Fri Dec 05 10:43:33 2003] [info] Server built: Dec  3 2003 14:06:59
[Fri Dec 05 10:43:33 2003] [debug] prefork.c(1037): AcceptMutex: sysvsem
(default: sysvsem)
[Fri Dec 05 10:43:33 2003] [error] failed to resolve handler
`TestHooks::trans'
[Fri Dec 05 10:43:33 2003] [error] [client 127.0.0.1] Can't locate
TestHooks/trans.pm in @INC (@INC contains:
/root/mod_perl-1.99_11/Apache-Test/lib /root/mod_perl-1.99_11/t/response
/root/mod_perl-1.99_11/t/protocol /root/mod_perl-1.99_11/t/preconnection
/root/mod_perl-1.99_11/t/hooks /root/mod_perl-1.99_11/t/filter
/root/mod_perl-1.99_11/t
/root/mod_perl-1.99_11/t/htdocs/testdirective/perlmodule-vh
/root/mod_perl-1.99_11/t/htdocs/testdirective/main
/root/mod_perl-1.99_11/t/ /root/mod_perl-1.99_11/t/lib/perl
/root/mod_perl-1.99_11/blib/lib /root/mod_perl-1.99_11/blib/arch
/usr/lib/perl5/5.8.2/i686-linux-thread-multi /usr/lib/perl5/5.8.2
/usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl) at (eval 70)
line 3.

[Fri Dec 05 10:43:33 2003] [error] failed to resolve handler
`TestHooks::trans'
[Fri Dec 05 10:43:34 2003] [error] failed to resolve handler
`TestHooks::trans'
[Fri Dec 05 10:43:34 2003] [error] [client 127.0.0.1] Can't locate
TestHooks/trans.pm in @INC (@INC contains:
/root/mod_perl-1.99_11/Apache-Test/lib /root/mod_perl-1.99_11/t/response
/root/mod_perl-1.99_11/t/protocol /root/mod_perl-1.99_11/t/preconnection
/root/mod_perl-1.99_11/t/hooks /root/mod_perl-1.99_11/t/filter
/root/mod_perl-1.99_11/t
/root/mod_perl-1.99_11/t/htdocs/testdirective/perlmodule-vh
/root/mod_perl-1.99_11/t/htdocs/testdirective/main
/root/mod_perl-1.99_11/t/ /root/mod_perl-1.99_11/t/lib/perl
/root/mod_perl-1.99_11/blib/lib /root/mod_perl-1.99_11/blib/arch
/usr/lib/perl5/5.8.2/i686-linux-thread-multi /usr/lib/perl5/5.8.2
/usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl) at (eval 70)
line 3.

[Fri Dec 05 10:43:34 2003] [error] failed to resolve handler
`TestHooks::trans'
[Fri Dec 05 10:43:34 2003] [error] failed to resolve handler
`TestHooks::trans'
[Fri Dec 05 10:43:35 2003] [error] server reached MaxClients setting,
consider raising the MaxClients setting
[Fri Dec 05 10:43:35 2003] [error] failed to resolve handler
`TestHooks::trans'
.. MANY MORE OF THIS 
[Fri Dec 05 10:44:01 2003] [error] Can't locate TestHooks/init.pm in
@INC (@INC contains: /root/mod_perl-1.99_11/Apache-Test/lib
/root/mod_perl-1.99_11/blib/lib /root/mod_perl-1.99_11/blib/arch
/root/mod_perl-1.99_11/t/response /root/mod_perl-1.99_11/t/protocol
/root/mod_perl-1.99_11/t/preconnection /root/mod_perl-1.99_11/t/hooks
/root/mod_perl-1.99_11/t/filter /root/mod_perl-1.99_11/t
/root/mod_perl-1.99_11/t/htdocs/testdirective/vh
/usr/lib/perl5/5.8.2/i686-linux-thread-multi /usr/lib/perl5/5.8.2
/usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .
/root/mod_perl-1.99_11/t/ /root/mod_perl-1.99_11/t/lib/perl) at (eval 4)
line 3.

[Fri Dec 05 10:44:01 2003] [error] lookup of 'TestHooks::init::first'
failed

[Fri Dec 05 10:44:01 2003] [error] [client 127.0.0.1] Can't locate
TestHooks/init.pm in @INC (@INC contains:
/root/mod_perl-1.99_11/Apache-Test/lib /root/mod_perl-1.99_11/blib/lib
/root/mod_perl-1.99_11/blib/arch /root/mod_perl-1.99_11/t/response
/root/mod_perl-1.99_11/t/protocol /root/mod_perl-1.99_11/t/preconnection
/root/mod_perl-1.99_11/t/hooks /root/mod_perl-1.99_11/t/filter
/root/mod_perl-1

Re: [mp2] mod_perl test suite fails

2003-12-05 Thread Stas Bekman
Volker Kroll wrote:
On Fri, 2003-12-05 at 02:16, Stas Bekman wrote:


-8<-- Start Bug Report 8<--
1. Problem Description:
mod_perl compiles fine but all tests seem to fail.

in the error log I do find:

**03 14:42:34 2003] [error] failed to resolve handler `TestHooks::trans'
[Wed Dec 03 14:42:34 2003] [error] [client 127.0.0.1] Can't locate
TestHooks/trans.pm in @INC (@INC contains:
My favorite bug report. Can you please rebuild mp with MP_TRACE=1

perl Makefile.PL ... MP_TRACE=1

and post the output of run

% rm t/logs/error_log
% MOD_PERL_TRACE=gh t/TEST
and t/logs/error_log itself


Hi,

it seems, that the tests are working on my workcomputer where I work as
a normal user but not on one of my servers, where I only work as root.
Here is the log running as root (shortened a little).
Hope it helps.
You probably didn't rebuild mod_perl as I've asked you to. since your 
error_log doesn't show the trace I was after.

But, since it seems to be related to 'root' vs. non-root,  can you move
/root/mod_perl-1.99_11/ to /tmp/mod_perl-1.99_11 and try again?
I also want to see the console messages (not error_log) when you run from 
under /root/mod_perl-1.99_11/ as you did it in first place.

Thanks.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [MP2] failed to resolve handler `Apache::PerlSections'

2003-12-05 Thread Stas Bekman
Stas Bekman wrote:
Stas Bekman wrote:
[...]
The problem seems to be as following: Apache::Status somehow 
autovivifies Apache::PerlSections stash, while Apache/PerlSections.pm 
wasn't loaded yet. That's why preloading Apache::PerlSections solves 
the problem. Our code does not attempt to load packages whose stashes 
exist, which is obviously wrong. I'll post a patch soonish. I think 
instead of checking for the stash, we need to check %INC.


It was a bit trickier than I thought, but now the code is even simpler 
to follow. This should solve your problem Enrico. 'make test' pass 100% 
with this patch.
So what do you think? Should we go with this change (checking %INC) or not? 
The only drawback I can think of is that if you define a handler without 
loading its package you may need to mess with %INC as in the example below:

httpd.conf
--
PerlModule Loaded
PerlWhateverHandler Loaded::handler
PerlWhateverHandler NotLoaded::handler
Loaded.pm (which contains Loaded and also NotLoaded packages)
-
package Loaded;
...
sub handler {...}
...
package NotLoaded;
$INC{'NotLoaded.pm'} = __FILE__;
sub handler {...}
1;
if %INC is not updated to include the key 'NotLoaded.pm', mp2 will try to load 
NotLoaded.pm, which doesn't exist.

I think it at least gives users more control, rather than having obscure 
problems when an autovivified stash will prevent the package loading. Like in 
the case posted by Enrico.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [MP2] failed to resolve handler `Apache::PerlSections'

2003-12-05 Thread Stas Bekman
Stas Bekman wrote:
Stas Bekman wrote:

Stas Bekman wrote:
[...]
The problem seems to be as following: Apache::Status somehow 
autovivifies Apache::PerlSections stash, while Apache/PerlSections.pm 
wasn't loaded yet. That's why preloading Apache::PerlSections solves 
the problem. Our code does not attempt to load packages whose stashes 
exist, which is obviously wrong. I'll post a patch soonish. I think 
instead of checking for the stash, we need to check %INC.


It was a bit trickier than I thought, but now the code is even simpler 
to follow. This should solve your problem Enrico. 'make test' pass 
100% with this patch.


So what do you think? Should we go with this change (checking %INC) or 
not? The only drawback I can think of is that if you define a handler 
without loading its package you may need to mess with %INC as in the 
example below:

httpd.conf
--
PerlModule Loaded
PerlWhateverHandler Loaded::handler
PerlWhateverHandler NotLoaded::handler
Loaded.pm (which contains Loaded and also NotLoaded packages)
-
package Loaded;
...
sub handler {...}
...
package NotLoaded;
$INC{'NotLoaded.pm'} = __FILE__;
sub handler {...}
1;
if %INC is not updated to include the key 'NotLoaded.pm', mp2 will try 
to load NotLoaded.pm, which doesn't exist.

I think it at least gives users more control, rather than having obscure 
problems when an autovivified stash will prevent the package loading. 
Like in the case posted by Enrico.
Or may be we should do the following:

If the package is not loaded (not in %INC), try to load it, but don't bail out 
if it fails (like in the case with Unloaded). Next try to lookup the stash, if 
it's found (which should be the case with Unloaded, since Loaded will load it) 
, then move on, and only if the stash is not found bail out with the loading 
failure error?

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]