Re: [mp2] make test errors w/. threadmutex, push_handlers
[there is no need to cross-post the report, send it only to one of the lists, preferrably dev] Nick Tonkin wrote: Hi all, Using the very latest cvs sources, make test failed with the following: re-arranging the report, to have error_log sections following the test reports. apr/threadmutex..FAILED tests 1-3 Failed 3/3 tests, 0.00% okay [...] > [Sat Jan 18 21:23:17 2003] [error] [client 127.0.0.1] Can't locate > APR/ThreadMutex.pm in @INC (@INC contains: /home/tmp/build/modperl-2.0/t > /home/tmp/build/modperl-2.0/blib/lib/Apache2 it is in this directory, right? [...] > /home/tmp/build/modperl-2.0/t/response/TestAPR/threadmutex.pm line 17. error/push_handlers..# Failed test 1 in error/push_handlers.t at line 14 error/push_handlers..FAILED test 1 Failed 1/1 tests, 0.00% okay [...] > [Sat Jan 18 21:23:27 2003] [error] [client 127.0.0.1] File does not exist: /home/tmp/build/modperl-2.0/t/htdocs/TestError::push_handlers This is a new test I've added recently, unrelated to the original problem. For some reason it wasn't auto-configured. Do you have a Location entry for TestError::push_handlers in t/conf/httpd.conf? Does it appear when you run t/TEST -conf? __ 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]
DBI/mod_perl2 failure
The following is the full report of a problem I'm having. Any pointers
will be appreciated. I'm worried I may have the wrong "mod_perl2"--it's
not clear to me why the version number should be "1.99_08"; I expected
"2.x".
-8<-- Start Bug Report 8<--
1. Problem Description:
DBI doesn't connect to MySQL when running under mod_perl2's perl-script.
The following script works correctly when run from the command line, as
#cgi-bin/dbi.pl,
or as a standard CGI script, i.e.,
http://localhost/cgi-bin/dbi.pl.
But when run as precompiled under mod_perl2, i.e, as
http://localhost/cgi/dbi.pl,
the connection fails with DBI=>errstr() reporting
"Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)".
The last line of error_log is:
DBI connect('people','apache',...) failed: Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (2) at
/usr/local/apache2/perl/dbi.pl line 5
I also installed Apache::DBI and "use"'d it, with the same result.
Script:
#!/usr/bin/perl
use strict;
use DBI;
# connect to the MySQL server
my $dbh = DBI->connect('DBI:mysql:people', 'apache', 'LampIsCool');
print "Content-type: text/plain\n\n";
if ($dbh) {
print "Connected\n";
$dbh->disconnect();
} else {
print "Connection failed\n";
print DBI->errstr();
}
The configuration section from httpd.conf is:
Alias /cgi /usr/local/apache2/perl
SetHandlerperl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
2. Used Components and their Configuration:
Besides the following output from t/REPORT, I have just installed
DBI v1.32 from CPAN. mod_perl2 (1.99_08) was just installed a few days ago.
*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
MP_AP_PREFIX=> /usr/local/apache2
MP_GENERATE_XS => 1
MP_INST_APACHE2 => 1
MP_LIBNAME => mod_perl
MP_USE_DSO => 1
MP_USE_STATIC => 1
*** /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.43
Server built: Dec 11 2002 06:52:03
Server's Module Magic Number: 20020903:0
Architecture: 32-bit
Server compiled with
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6
-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="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
*** /usr/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=linux, osvers=2.4.18-11smp, archname=i386-linux-thread-multi
uname='linux daffy.perf.redhat.com 2.4.18-11smp #1 smp thu aug 15 06:41:59 edt
2002 i686 i686 i386 gnulinux '
config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dmyhostname=localhost
-Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr
-Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib
-Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm
-Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl
-Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr'
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', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2 -march=i386 -mcpu=i686',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm'
ccversion='', gccversion='3.2 20020822 (Red Hat Linux Rawhide 3.2-5)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
libc=/lib/libc-2.2.92.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.2.92'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux
Re: [mp2] make test errors w/. threadmutex, push_handlers
On Mon, 20 Jan 2003, Stas Bekman wrote:
> [there is no need to cross-post the report, send it only to one of the
> lists, preferrably dev]
Alright. I thought it should be archived on the modperl list too.
BTW how many adopters of mp2 are we?
> > apr/threadmutex..FAILED tests 1-3
> > Failed 3/3 tests, 0.00% okay
> [...]
> > [Sat Jan 18 21:23:17 2003] [error] [client 127.0.0.1] Can't locate
> > APR/ThreadMutex.pm in @INC (@INC contains: /home/tmp/build/modperl-2.0/t
> > /home/tmp/build/modperl-2.0/blib/lib/Apache2
>
> it is in this directory, right?
Nope:
nick@fatboy /tmp/build/modperl-2.0>ll /home/tmp/build/modperl-2.0/blib/lib/Apache2
total 24
drwxr-xr-x 2 nick perl - 512 Jan 18 21:22 APR/
-r--r--r-- 1 nick perl - 325 Sep 12 2001 APR.pm
drwxr-xr-x 2 nick perl - 1024 Jan 18 21:22 Apache/
drwxr-xr-x 2 nick perl - 512 Jan 18 21:22 ModPerl/
drwxr-xr-x 6 nick perl - 512 Jan 18 21:22 auto/
-r--r--r-- 1 nick perl -94 Jan 10 20:17 mod_perl.pm
-r--r--r-- 1 nick perl - 11231 Jan 18 21:21 typemap
nick@fatboy /tmp/build/modperl-2.0>ll
/home/tmp/build/modperl-2.0/blib/lib/Apache2/APR
total 34
-r--r--r-- 1 nick perl - 537 Jan 18 21:21 Base64.pm
-r--r--r-- 1 nick perl - 538 Jan 18 21:21 Brigade.pm
-r--r--r-- 1 nick perl - 537 Jan 18 21:21 Bucket.pm
-r--r--r-- 1 nick perl - 160 Apr 11 2001 Const.pm
-r--r--r-- 1 nick perl - 535 Jan 18 21:21 Date.pm
-r--r--r-- 1 nick perl - 537 Jan 18 21:21 NetLib.pm
-r--r--r-- 1 nick perl - 533 Jan 18 21:21 OS.pm
-r--r--r-- 1 nick perl - 191 Dec 17 2001 PerlIO.pm
-r--r--r-- 1 nick perl - 535 Jan 18 21:21 Pool.pm
-r--r--r-- 1 nick perl - 539 Jan 18 21:21 SockAddr.pm
-r--r--r-- 1 nick perl - 537 Jan 18 21:21 Socket.pm
-r--r--r-- 1 nick perl - 537 Jan 18 21:21 String.pm
-r--r--r-- 1 nick perl - 536 Jan 18 21:21 Table.pm
-r--r--r-- 1 nick perl - 534 Jan 18 21:21 URI.pm
-r--r--r-- 1 nick perl - 535 Jan 18 21:21 UUID.pm
-r--r--r-- 1 nick perl - 535 Jan 18 21:21 Util.pm
-r--r--r-- 1 nick perl - 248 May 23 2002 XSLoader.pm
nick@fatboy /tmp/build/modperl-2.0>sudo find / -name 'ThreadMutex.pm' -print
/home/tmp/build/modperl-2.0/WrapXS/APR/ThreadMutex/ThreadMutex.pm
> > error/push_handlers..# Failed test 1 in error/push_handlers.t at
> > line 14
> > error/push_handlers..FAILED test 1
> > Failed 1/1 tests, 0.00% okay
> [...]
> > [Sat Jan 18 21:23:27 2003] [error] [client 127.0.0.1] File does not
> exist: /home/tmp/build/modperl-2.0/t/htdocs/TestError::push_handlers
>
> This is a new test I've added recently, unrelated to the original problem.
> For some reason it wasn't auto-configured. Do you have a Location entry
> for TestError::push_handlers in t/conf/httpd.conf?i
Yep:
SetHandler modperl
PerlResponseHandler TestError::push_handlers
> Does it appear when you
> run t/TEST -conf?
Nope:
nick@fatboy /tmp/build/modperl-2.0>t/TEST -conf
*** cleaning out current configuration
*** reconfiguration done
nick@fatboy /tmp/build/modperl-2.0>ll
/home/tmp/build/modperl-2.0/t/htdocs/TestError::push_handlers
ls: /home/tmp/build/modperl-2.0/t/htdocs/TestError::push_handlers: No such file or
directory
- nick
Nick Tonkin {|8^)>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Re: [mp2] make test errors w/. threadmutex, push_handlers
Nick Tonkin wrote:
BTW how many adopters of mp2 are we?
Just a few folks so far very reporting problems. Though it's possible that
there are many others that don't have problems.
apr/threadmutex..FAILED tests 1-3
Failed 3/3 tests, 0.00% okay
[...]
> [Sat Jan 18 21:23:17 2003] [error] [client 127.0.0.1] Can't locate
> APR/ThreadMutex.pm in @INC (@INC contains: /home/tmp/build/modperl-2.0/t
> /home/tmp/build/modperl-2.0/blib/lib/Apache2
it is in this directory, right?
Nope:
nick@fatboy /tmp/build/modperl-2.0>ll /home/tmp/build/modperl-2.0/blib/lib/Apache2
total 24
drwxr-xr-x 2 nick perl - 512 Jan 18 21:22 APR/
-r--r--r-- 1 nick perl - 325 Sep 12 2001 APR.pm
drwxr-xr-x 2 nick perl - 1024 Jan 18 21:22 Apache/
drwxr-xr-x 2 nick perl - 512 Jan 18 21:22 ModPerl/
drwxr-xr-x 6 nick perl - 512 Jan 18 21:22 auto/
-r--r--r-- 1 nick perl -94 Jan 10 20:17 mod_perl.pm
-r--r--r-- 1 nick perl - 11231 Jan 18 21:21 typemap
nick@fatboy /tmp/build/modperl-2.0>ll
/home/tmp/build/modperl-2.0/blib/lib/Apache2/APR
total 34
-r--r--r-- 1 nick perl - 537 Jan 18 21:21 Base64.pm
-r--r--r-- 1 nick perl - 538 Jan 18 21:21 Brigade.pm
-r--r--r-- 1 nick perl - 537 Jan 18 21:21 Bucket.pm
-r--r--r-- 1 nick perl - 160 Apr 11 2001 Const.pm
-r--r--r-- 1 nick perl - 535 Jan 18 21:21 Date.pm
-r--r--r-- 1 nick perl - 537 Jan 18 21:21 NetLib.pm
-r--r--r-- 1 nick perl - 533 Jan 18 21:21 OS.pm
-r--r--r-- 1 nick perl - 191 Dec 17 2001 PerlIO.pm
-r--r--r-- 1 nick perl - 535 Jan 18 21:21 Pool.pm
-r--r--r-- 1 nick perl - 539 Jan 18 21:21 SockAddr.pm
-r--r--r-- 1 nick perl - 537 Jan 18 21:21 Socket.pm
-r--r--r-- 1 nick perl - 537 Jan 18 21:21 String.pm
-r--r--r-- 1 nick perl - 536 Jan 18 21:21 Table.pm
-r--r--r-- 1 nick perl - 534 Jan 18 21:21 URI.pm
-r--r--r-- 1 nick perl - 535 Jan 18 21:21 UUID.pm
-r--r--r-- 1 nick perl - 535 Jan 18 21:21 Util.pm
-r--r--r-- 1 nick perl - 248 May 23 2002 XSLoader.pm
nick@fatboy /tmp/build/modperl-2.0>sudo find / -name 'ThreadMutex.pm' -print
/home/tmp/build/modperl-2.0/WrapXS/APR/ThreadMutex/ThreadMutex.pm
So you don't have APR/ThreadMutex.pm in blib and the error was correct.
And what's your WrapXS/APR/ThreadMutex/Makefile's pm_to_blib target says?
Mine says:
pm_to_blib: $(TO_INST_PM)
@$(PERLRUNINST) "-MExtUtils::Install" \
-e "pm_to_blib({qw{ThreadMutex.pm
../../../blib/lib/Apache2/APR/ThreadMute
x.pm}},'$(INST_LIB)/auto','$(PM_FILTER)')"
@$(TOUCH) $@
Also I get:
% grep HAS_THREADS lib/Apache/BuildConfig.pm
'HAS_THREADS' => '1',
you probably have 0, right? If so:
Also, I'm not sure why an undef is returned here, I'd think it should be:
Index: lib/ModPerl/MM.pm
===
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v
retrieving revision 1.21
diff -u -r1.21 MM.pm
--- lib/ModPerl/MM.pm 23 Jun 2002 21:46:54 - 1.21
+++ lib/ModPerl/MM.pm 20 Jan 2003 05:06:53 -
@@ -178,7 +178,7 @@
my $apr_config = build_config()->get_apr_config();
if ($path =~ m/(Thread|Global)Mutex/) {
-return unless $apr_config->{HAS_THREADS};
+return '' unless $apr_config->{HAS_THREADS};
}
return '' if $path =~ m/\.(pl|cvsignore)$/;
error/push_handlers..# Failed test 1 in error/push_handlers.t at
line 14
error/push_handlers..FAILED test 1
Failed 1/1 tests, 0.00% okay
[...]
> [Sat Jan 18 21:23:27 2003] [error] [client 127.0.0.1] File does not
exist: /home/tmp/build/modperl-2.0/t/htdocs/TestError::push_handlers
This is a new test I've added recently, unrelated to the original problem.
For some reason it wasn't auto-configured. Do you have a Location entry
for TestError::push_handlers in t/conf/httpd.conf?i
Yep:
SetHandler modperl
PerlResponseHandler TestError::push_handlers
Does it appear when you
run t/TEST -conf?
Nope:
nick@fatboy /tmp/build/modperl-2.0>t/TEST -conf
*** cleaning out current configuration
*** reconfiguration done
nick@fatboy /tmp/build/modperl-2.0>ll /home/tmp/build/modperl-2.0/t/htdocs/TestError::push_handlers
ls: /home/tmp/build/modperl-2.0/t/htdocs/TestError::push_handlers: No such file or directory
Of course the file doesn't exist, it's a location target. What happens if
you run this test:
t/TEST -v error/push_handlers
__
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
Re: [mp2] make test errors w/. threadmutex, push_handlers
On Sun, 19 Jan 2003, Nick Tonkin wrote: > On Mon, 20 Jan 2003, Stas Bekman wrote: ... > > nick@fatboy /tmp/build/modperl-2.0>sudo find / -name 'ThreadMutex.pm' -print > /home/tmp/build/modperl-2.0/WrapXS/APR/ThreadMutex/ThreadMutex.pm > I'm also running on FreeBSD and I'm seeing the same problem. On my system I'm not getting a Makefile written in WrapXS/APR/ThreadMutex . So the module is not being copied over into the test environment. I'm not quite sure how to include this module in the make, I'm not even sure if I should be using it if I have threads disabled (which I do). > > > > error/push_handlers..# Failed test 1 in error/push_handlers.t at > > > line 14 > > > error/push_handlers..FAILED test 1 > > > Failed 1/1 tests, 0.00% okay > > [...] > > > [Sat Jan 18 21:23:27 2003] [error] [client 127.0.0.1] File does not > > exist: /home/tmp/build/modperl-2.0/t/htdocs/TestError::push_handlers > > > > This is a new test I've added recently, unrelated to the original problem. > > For some reason it wasn't auto-configured. Do you have a Location entry > > for TestError::push_handlers in t/conf/httpd.conf?i > > Yep: > > > SetHandler modperl > PerlResponseHandler TestError::push_handlers > > > > > Does it appear when you > > run t/TEST -conf? > > Nope: > > nick@fatboy /tmp/build/modperl-2.0>t/TEST -conf > *** cleaning out current configuration > *** reconfiguration done > > nick@fatboy /tmp/build/modperl-2.0>ll >/home/tmp/build/modperl-2.0/t/htdocs/TestError::push_handlers > ls: /home/tmp/build/modperl-2.0/t/htdocs/TestError::push_handlers: No such file or >directory I'm also seeing this test fail. The Location is in the httpd.conf file, but it's not picking it up for some reason. andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
