Re: mp2 bug t/apache/util.t

Re: mp2 bug t/apache/util.t

am 21.03.2009 17:47:59 von Adam Prime

Oliver Block wrote:
> 1. Problem Description:
>
> Failed Test Stat Wstat Total Fail List of Failed
> ------------------------------------------------------------ -------------------
> t/apache/util.t 8 4 1-4
> 8 tests and 1 subtest skipped.
> Failed 1/246 test scripts. 4/2496 subtests failed.
> Files=246, Tests=2496, 141 wallclock secs (94.68 cusr + 17.77 csys = 112.45
> CPU)
> Failed 1/246 test programs. 4/2496 subtests failed.
> [warning] server localhost:8529 shutdown
> [ error] error running tests (please examine t/logs/error_log)
> +--------------------------------------------------------+
> | Please file a bug report: http://perl.apache.org/bugs/ |
> +--------------------------------------------------------+
> make: *** [run_tests] Fehler 1
>
>
> t/apache/util....1..8
> # Running under perl version 5.010000 for linux
> # Current time local: Sat Mar 21 18:08:07 2009
> # Current time GMT: Sat Mar 21 17:08:07 2009
> # Using Test.pm version 1.25
> # Using Apache/Test.pm version 1.31
> # testing : Apache2::Util::ht_time($pool)
> # expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
> # received: Sa, 21 Mär 2009 17:08:08 GMT
> not ok 1
> # testing : Apache2::Util::ht_time($pool, $time)
> # expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
> # received: Sa, 21 Mär 2009 17:08:08 GMT
> not ok 2
> # testing : Apache2::Util::ht_time($pool, $time, $fmt)
> # expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
> # received: Sa, 21 Mär 2009 17:08:08 GMT
> not ok 3
> # testing : Apache2::Util::ht_time($pool, $time, $fmt, $gmt)
> # expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
> # received: Sa, 21 Mär 2009 18:08:08 CET
> not ok 4

This looks like a localization thing to me. I'm guessing that on your
system for some reason ^\w+$ doesn't match against 'Mär'. It fails on
my gentoo box too:

perl -e "print ('Mär' =~ /^\w+$/)"

prints undef.

however,

perl -Mutf8 -e "print ('Mär' =~ /^\w+$/) , qq[\n\n]"

works, so i'm guessing we just need to through a "use utf8" into the
test or something?

In the meantime, that seems like a bug in the test to me, more than a
problem with mod_perl.

mp2 bug t/apache/util.t

am 21.03.2009 18:12:57 von Oliver Block

1. Problem Description:

=46ailed Test Stat Wstat Total Fail List of Failed
=2D--------------------------------------------------------- ---------------=
=2D-----
t/apache/util.t 8 4 1-4
8 tests and 1 subtest skipped.
=46ailed 1/246 test scripts. 4/2496 subtests failed.
=46iles=3D246, Tests=3D2496, 141 wallclock secs (94.68 cusr + 17.77 csys =
=3D 112.45=20
CPU)
=46ailed 1/246 test programs. 4/2496 subtests failed.
[warning] server localhost:8529 shutdown
[ error] error running tests (please examine t/logs/error_log)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
make: *** [run_tests] Fehler 1


t/apache/util....1..8
# Running under perl version 5.010000 for linux
# Current time local: Sat Mar 21 18:08:07 2009
# Current time GMT: Sat Mar 21 17:08:07 2009
# Using Test.pm version 1.25
# Using Apache/Test.pm version 1.31
# testing : Apache2::Util::ht_time($pool)
# expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
# received: Sa, 21 Mär 2009 17:08:08 GMT
not ok 1
# testing : Apache2::Util::ht_time($pool, $time)
# expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
# received: Sa, 21 Mär 2009 17:08:08 GMT
not ok 2
# testing : Apache2::Util::ht_time($pool, $time, $fmt)
# expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
# received: Sa, 21 Mär 2009 17:08:08 GMT
not ok 3
# testing : Apache2::Util::ht_time($pool, $time, $fmt, $gmt)
# expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
# received: Sa, 21 Mär 2009 18:08:08 CET
not ok 4
# testing : Apache2::Util::escape_path / partial=3D1 / default
# expected: a%20'long'%20file%3f.html
# received: a%20'long'%20file%3f.html
ok 5
# testing : Apache2::Util::escape_path / partial=3D1 / explicit
# expected: a%20'long'%20file%3f.html
# received: a%20'long'%20file%3f.html
ok 6
# testing : Apache2::Util::escape_path / partial=3D0
# expected: a%20'long'%20file%3f.html
# received: a%20'long'%20file%3f.html
ok 7
# testing : Apache2::Util::escape_path / partial=3D0 / ./ prefix
# expected: ./a%20'long'%20file%3f.html:
# received: ./a%20'long'%20file%3f.html:
ok 8
=46AILED tests 1-4
Failed 4/8 tests, 50.00% okay
=46ailed Test Stat Wstat Total Fail List of Failed
=2D--------------------------------------------------------- ---------------=
=2D-----
t/apache/util.t 8 4 1-4
=46ailed 1/1 test scripts. 4/8 subtests failed.
=46iles=3D1, Tests=3D8, 0 wallclock secs ( 0.38 cusr + 0.06 csys =3D 0.4=
4 CPU)
=46ailed 1/1 test programs. 4/8 subtests failed.
[warning] server localhost:8529 shutdown
[ error] error running tests (please examine t/logs/error_log)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
make: *** [run_tests] Fehler 1


2. Used Components and their Configuration:

*** mod_perl version 2.000005

*** using /home/oblock/src/mod_perl-2.0/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
MP_APR_LIB =3D> aprext
MP_APXS =3D> /usr/sbin/apxs2
MP_COMPAT_1X =3D> 1
MP_GENERATE_XS =3D> 1
MP_LIBNAME =3D> mod_perl
MP_USE_DSO =3D> 1


*** /usr/sbin/httpd2-prefork -V
Server version: Apache/2.2.11 (Linux/SUSE)
Server built: Mar 18 2009 18:09:34
Server's Module Magic Number: 20051115:21
Server loaded: APR 1.2.12, APR-Util 1.2.12
Compiled using: APR 1.2.12, APR-Util 1.2.12
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR=3D"server/mpm/prefork"
-D APR_HAS_SENDFILE
-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 DYNAMIC_MODULE_LIMIT=3D128
-D HTTPD_ROOT=3D"/srv/www"
-D SUEXEC_BIN=3D"/usr/sbin/suexec2"
-D DEFAULT_PIDLOG=3D"/var/run/httpd2.pid"
-D DEFAULT_SCOREBOARD=3D"logs/apache_runtime_status"
-D DEFAULT_LOCKFILE=3D"/var/run/accept.lock"
-D DEFAULT_ERRORLOG=3D"/var/log/apache2/error_log"
-D AP_TYPES_CONFIG_FILE=3D"/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE=3D"/etc/apache2/httpd.conf"

*** /usr/bin/ldd /usr/sbin/httpd2-prefork
linux-vdso.so.1 =3D> (0x00007fff3dffe000)
libm.so.6 =3D> /lib64/libm.so.6 (0x00007f39359c3000)
libpcre.so.0 =3D> /usr/lib64/libpcre.so.0 (0x00007f393579a000)
libaprutil-1.so.0 =3D> /usr/lib64/libaprutil-1.so.0 (0x00007f393557e000)
libldap-2.4.so.2 =3D> /usr/lib64/libldap-2.4.so.2 (0x00007f393533a000)
liblber-2.4.so.2 =3D> /usr/lib64/liblber-2.4.so.2 (0x00007f393512a000)
libdb-4.5.so =3D> /usr/lib64/libdb-4.5.so (0x00007f3934df2000)
libexpat.so.1 =3D> /lib64/libexpat.so.1 (0x00007f3934bc8000)
libapr-1.so.0 =3D> /usr/lib64/libapr-1.so.0 (0x00007f393499e000)
librt.so.1 =3D> /lib64/librt.so.1 (0x00007f3934795000)
libcrypt.so.1 =3D> /lib64/libcrypt.so.1 (0x00007f3934558000)
libpthread.so.0 =3D> /lib64/libpthread.so.0 (0x00007f393433c000)
libdl.so.2 =3D> /lib64/libdl.so.2 (0x00007f3934138000)
libc.so.6 =3D> /lib64/libc.so.6 (0x00007f3933ddf000)
libresolv.so.2 =3D> /lib64/libresolv.so.2 (0x00007f3933bca000)
libsasl2.so.2 =3D> /usr/lib64/libsasl2.so.2 (0x00007f39339af000)
libssl.so.0.9.8 =3D> /usr/lib64/libssl.so.0.9.8 (0x00007f3933761000)
libcrypto.so.0.9.8 =3D> /usr/lib64/libcrypto.so.0.9.8 (0x00007f39333e0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3935c19000)
libz.so.1 =3D> /lib64/libz.so.1 (0x00007f39331ca000)


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

-L/usr/lib64 -laprutil-1 -lldap -llber -ldb-4.5 -lexpat -lcrypt=20
-L/usr/lib64 -lapr-1 -lrt -lcrypt -lpthread -ldl=20



*** /usr/bin/perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=3Dlinux, osvers=3D2.6.25, archname=3Dx86_64-linux-thread-multi
uname=3D'linux oldfield 2.6.25 #1 smp 2008-12-08 03:55:28 +0100 x86_64=
=20
x86_64 x86_64 gnulinux '
=20
config_args=3D'-ds -e -Dprefix=3D/usr -Dvendorprefix=3D/usr -Dinstallusrbin=
perl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=3Dtrue -Dop=
timize=3D-O2 -fmessage-length=3D0 -Wall -D_FORTIFY_SOURCE=3D2 -fstack-prote=
ctor -g -Wall -pipe -Accflags=3D-DPERL_USE_SAFE_PUTENV'
hint=3Drecommended, useposix=3Dtrue, d_sigaction=3Ddefine
useithreads=3Ddefine, usemultiplicity=3Ddefine
useperlio=3Ddefine, d_sfio=3Dundef, uselargefiles=3Ddefine, usesocks=3D=
undef
use64bitint=3Ddefine, use64bitall=3Ddefine, uselongdouble=3Dundef
usemymalloc=3Dn, bincompat5005=3Dundef
Compiler:
cc=3D'cc', ccflags=20
=3D'-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-stri=
ct-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64',
=20
optimize=3D'-O2 -fmessage-length=3D0 -Wall -D_FORTIFY_SOURCE=3D2 -fstack-pr=
otector -g -Wall -pipe',
=20
cppflags=3D'-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -=
fno-strict-aliasing -pipe'
ccversion=3D'', gccversion=3D'4.3.1 20080507 (prerelease) [gcc-4_3-bran=
ch=20
revision 135036]', gccosandvers=3D''
intsize=3D4, longsize=3D8, ptrsize=3D8, doublesize=3D8, byteorder=3D123=
45678
d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, longdblsize=
=3D16
ivtype=3D'long', ivsize=3D8, nvtype=3D'double', nvsize=3D8, Off_t=3D'of=
f_t',=20
lseeksize=3D8
alignbytes=3D8, prototype=3Ddefine
Linker and Libraries:
ld=3D'cc', ldflags =3D' -L/usr/local/lib64'
libpth=3D/lib64 /usr/lib64 /usr/local/lib64
libs=3D-lm -ldl -lcrypt -lpthread
perllibs=3D-lm -ldl -lcrypt -lpthread
libc=3D/lib64/libc-2.8.so, so=3Dso, useshrplib=3Dtrue, libperl=3Dlibper=
l.so
gnulibc_version=3D'2.8'
Dynamic Linking:
dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef,=20
ccdlflags=3D'-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.10.0/x86_64-linux-thread-mu=
lti/CORE'
cccdlflags=3D'-fPIC', lddlflags=3D'-shared -L/usr/local/lib64'


Characteristics of this binary (from libperl):=20
Compile-time options: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_TRACK_MEMPOOL PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
Built under linux
Compiled at Jan 28 2009 15:28:34
%ENV:
PERL_LWP_USE_HTTP_10=3D"1"
@INC:
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi
/usr/lib/perl5/5.10.0
/usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.10.0
/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.10.0
/usr/lib/perl5/vendor_perl
.

*** Packages of interest status:

Apache2 : -
Apache2::Request : -
CGI : 3.29
ExtUtils::MakeMaker: 6.42
LWP : 5.810, 5.814
mod_perl : -
mod_perl2 : 2.000004


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 Sat Mar 21 17:09:28 2009 GMT.

Re: mp2 bug t/apache/util.t

am 21.03.2009 18:25:02 von Adam Prime

Adam Prime wrote:
> This looks like a localization thing to me. I'm guessing that on your
> system for some reason ^\w+$ doesn't match against 'Mär'. It fails on
> my gentoo box too:
>
> perl -e "print ('Mär' =~ /^\w+$/)"
>
> prints undef.
>
> however,
>
> perl -Mutf8 -e "print ('Mär' =~ /^\w+$/) , qq[\n\n]"
>
> works, so i'm guessing we just need to through a "use utf8" into the
> test or something?
>
> In the meantime, that seems like a bug in the test to me, more than a
> problem with mod_perl.

I just looked at this a bit further, and it would appear that the test
does attempt handle utf8 locals. The actual code for the tests resides
in t/response/TestApache/util.pm. If you want to try to figure out
what's really going on, that's where you should look.

Adam

Re: mp2 bug t/apache/util.t

am 21.03.2009 22:28:26 von Oliver Block

Am Samstag, 21. März 2009 17:47:59 schrieben Sie:
> perl -e "print ('Mär' =3D~ /^\w+$/)"
>
> prints undef.
>
> however,
>
> perl -Mutf8 -e "print ('Mär' =3D~ /^\w+$/) , qq[\n\n]"
>
> works, so i'm guessing we just need to through a "use utf8" into the
> test or something?

Good guess! Everything as predicted.

> In the meantime, that seems like a bug in the test to me, more than a
> problem with mod_perl.

That's right. And that's why I reported the problem with the hanging server=
=20
process -- if the process ever starts existing. That's probably a test=20
problem too, I think.