Skip Menu |

This queue is for tickets about the Perlbal CPAN distribution.

Report information
The Basics
Id: 33065
Status: resolved
Priority: 0/
Queue: Perlbal

People
Owner: Nobody in particular
Requestors: tcallawa [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.60
Fixed in: (no value)



Subject: Broken in 5.10.0
Perlbal fails most of its tests on perl 5.10.0. + cd Perlbal-1.60 + make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-use.................ok t/10-testharness.........Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132. Child process (webserver) died. # Looks like your test died before it could output anything. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/10-testharness.t line 163. dubious Test returned status 111 (wstat 28416, 0x6f00) t/12-headers.............ok t/15-webserver...........Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132. Child process (webserver) died. # Looks like your test died before it could output anything. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/15-webserver.t line 163. dubious Test returned status 111 (wstat 28416, 0x6f00) DIED. FAILED tests 1-15 Failed 15/15 tests, 0.00% okay t/17-webserver-concat....Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132. Child process (webserver) died. # Looks like your test died before it could output anything. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/17-webserver-concat.t line 163. dubious Test returned status 111 (wstat 28416, 0x6f00) DIED. FAILED tests 1-20 Failed 20/20 tests, 0.00% okay t/20-put.................Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132. Child process (webserver) died. # Looks like your test died before it could output anything. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/20-put.t line 163. dubious Test returned status 111 (wstat 28416, 0x6f00) t/22-chunked-put.........Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132. Child process (webserver) died. # Looks like your test died before it could output anything. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/22-chunked-put.t line 163. dubious Test returned status 111 (wstat 28416, 0x6f00) t/30-reverseproxy........Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132, <GEN3> line 1. Child process (webserver) died. # Looks like you planned 26 tests but only ran 1. # Looks like your test died just after 1. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/30-reverseproxy.t line 163. dubious Test returned status 29 (wstat 7424, 0x1d00) DIED. FAILED tests 2-26 Failed 25/26 tests, 3.85% okay t/31-realworld...........Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132, <GEN2> line 1. Child process (webserver) died. # Looks like you planned 106 tests but only ran 1. # Looks like your test died just after 1. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/31-realworld.t line 163. dubious Test returned status 29 (wstat 7424, 0x1d00) DIED. FAILED tests 2-106 Failed 105/106 tests, 0.94% okay t/32-pipelining..........Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132, <GEN0> line 1. Child process (webserver) died. # Looks like you planned 12 tests but only ran 1. # Looks like your test died just after 1. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/32-pipelining.t line 163. dubious Test returned status 29 (wstat 7424, 0x1d00) DIED. FAILED tests 2-12 Failed 11/12 tests, 8.33% okay t/32-selector............Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132, <GEN1> line 1. Child process (webserver) died. # Looks like you planned 38 tests but only ran 1. # Looks like your test died just after 1. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/32-selector.t line 163. dubious Test returned status 29 (wstat 7424, 0x1d00) DIED. FAILED tests 2-38 Failed 37/38 tests, 2.63% okay t/35-reproxy.............Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132, <GEN1> line 1. Child process (webserver) died. # Looks like your test died just after 1. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/35-reproxy.t line 163. dubious Test returned status 29 (wstat 7424, 0x1d00) after all the subtests completed successfully t/40-ranges..............Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132, <GEN0> line 1. Child process (webserver) died. # Looks like your test died before it could output anything. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/40-ranges.t line 163. dubious Test returned status 29 (wstat 7424, 0x1d00) DIED. FAILED tests 1-35 Failed 35/35 tests, 0.00% okay t/45-buffereduploads.....Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132, <GEN0> line 1. Child process (webserver) died. # Looks like your test died just after 1. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/45-buffereduploads.t line 163. dubious Test returned status 29 (wstat 7424, 0x1d00) after all the subtests completed successfully t/50-plugins.............ok t/52-chunked-upload......Configuration error at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 132, <GEN0> line 1. Child process (webserver) died. # Looks like your test died just after 1. Can't use an undefined value as a symbol reference at /builddir/build/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test.pm line 74. END failed--call queue aborted at t/52-chunked-upload.t line 163. dubious Test returned status 29 (wstat 7424, 0x1d00) after all the subtests completed successfully t/60-child-httpd.........skipped all skipped: Alpha feature; test skipped without $ENV{PERLBAL_TEST_ALPHA} Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/10-testharness.t 111 28416 ?? ?? ?? t/15-webserver.t 111 28416 15 30 1-15 t/17-webserver-concat.t 111 28416 20 40 1-20 t/20-put.t 111 28416 ?? ?? ?? t/22-chunked-put.t 111 28416 ?? ?? ?? t/30-reverseproxy.t 29 7424 26 50 2-26 t/31-realworld.t 29 7424 106 210 2-106 t/32-pipelining.t 29 7424 12 22 2-12 t/32-selector.t 29 7424 38 74 2-38 t/35-reproxy.t 29 7424 1 0 ?? t/40-ranges.t 29 7424 35 70 1-35 t/45-buffereduploads.t 29 7424 1 0 ?? t/52-chunked-upload.t 29 7424 1 0 ?? 1 test skipped. Failed 13/17 test scripts. 248/267 subtests failed. Files=17, Tests=267, 6 wallclock secs ( 2.74 cusr + 0.36 csys = 3.10 CPU) Failed 13/17 test programs. 248/267 subtests failed. make: *** [test_dynamic] Error 255 error: Bad exit status from /var/tmp/rpm-tmp.24313 (%check)
5.10 has removed pseudo hashes from the core and replaced with restricted hashes which have a stricter semantic. I've stepped through this in the debugger: % make testdb TEST_FILE=t/10-testharness.t PERL_DL_NONLAZY=1 /home/src/perl/repoperls/installed-perls/perl/pVNtS9N/perl-5.8.0@32642/bin/perl -d "-Iblib/lib" "-Iblib/arch" t/10-testharness.t Loading DB routines from perl5db.pl version 1.3 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(t/10-testharness.t:7): my $msock = start_server(""); DB<9> n ERROR: Modification of a read-only value attempted at blib/lib/Perlbal/TCPListener.pm line 52. Configuration error at blib/lib/Perlbal/Test.pm line 132. The TCPListener.pm line 52 code is: 52 bless $self, ref $class || $class; rebless on restricted hashes is not as easy as with pseudohashes due to the enforced locking of the fields. See also my bugreport on Danga-Socket http://rt.cpan.org/Ticket/Display.html?id=20668 for a possible way out. I have tried it but gave up when it got too entangled.
From: tcallawa [...] redhat.com
On Sun Feb 10 01:12:40 2008, ANDK wrote: Show quoted text
> See also my bugreport on Danga-Socket > http://rt.cpan.org/Ticket/Display.html?id=20668 for a possible way > out. > I have tried it but gave up when it got too entangled.
OK, this seems to fix most of the issues, but there is still this remaining: + make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-use.................ok t/10-testharness.........ok t/12-headers.............ok t/15-webserver...........ok t/17-webserver-concat....ok t/20-put.................ok t/22-chunked-put.........ok 1/0# Writing: 500 # Writing: 5 # Writing: 5 # Writing: 5 # Writing: 100000 # Writing: 60000 # Writing: 1000 # Writing: 338485 t/22-chunked-put.........ok t/30-reverseproxy........ok t/31-realworld...........ok t/32-pipelining..........ok 2/12# separator length 2 t/32-pipelining..........ok 7/12# separator length 0 500 response! t/32-pipelining..........ok t/32-selector............ok 1/38Didn't get a firstline in HTTP response. Can't call method "header" on an undefined value at /usr/src/redhat/BUILD/Perlbal-1.60/blib/lib/Perlbal/Test/WebClient.pm line 166. # Looks like you planned 38 tests but only ran 2. # Looks like your test died just after 2. t/32-selector............dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 3-38 Failed 36/38 tests, 5.26% okay t/35-reproxy.............ok t/40-ranges..............ok t/45-buffereduploads.....ok t/50-plugins.............ok t/52-chunked-upload......ok t/60-child-httpd.........skipped all skipped: Alpha feature; test skipped without $ENV{PERLBAL_TEST_ALPHA} Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/32-selector.t 255 65280 38 72 3-38 1 test skipped. Failed 1/17 test scripts. 36/406 subtests failed. Files=17, Tests=406, 39 wallclock secs ( 2.54 cusr + 1.08 csys = 3.62 CPU) Failed 1/17 test programs. 36/406 subtests failed. make: *** [test_dynamic] Error 255
diff -up Perlbal-1.60/Makefile.PL.BAD Perlbal-1.60/Makefile.PL --- Perlbal-1.60/Makefile.PL.BAD 2008-02-11 01:21:31.000000000 -0500 +++ Perlbal-1.60/Makefile.PL 2008-02-11 01:21:50.000000000 -0500 @@ -32,6 +32,7 @@ WriteMakefile( 'Test::More' => 0, 'File::Find' => 0, 'Time::HiRes' => 0, + 'Hash::Util' => 0, #'IO::AIO' => 1.6, # recommened. }, diff -up Perlbal-1.60/lib/Perlbal.pm.BAD Perlbal-1.60/lib/Perlbal.pm --- Perlbal-1.60/lib/Perlbal.pm.BAD 2008-02-11 01:22:53.000000000 -0500 +++ Perlbal-1.60/lib/Perlbal.pm 2008-02-11 01:23:52.000000000 -0500 @@ -1281,6 +1281,17 @@ sub run { return $clean_exit; } +sub rebless { + my ($self, $newclass) = @_; + my $oldclass = ref $self; + require Hash::Util; # caveat; prototype does not work because of this + &Hash::Util::unlock_hash(\%$self); + bless $self, $newclass; + no strict 'refs'; + &Hash::Util::lock_keys(\%$self, keys %{$oldclass.'::FIELDS'}); + return $self; +} + sub log { # simple logging functionality if ($foreground) { diff -up Perlbal-1.60/lib/Perlbal/ClientHTTPBase.pm.BAD Perlbal-1.60/lib/Perlbal/ClientHTTPBase.pm --- Perlbal-1.60/lib/Perlbal/ClientHTTPBase.pm.BAD 2008-02-11 01:31:07.000000000 -0500 +++ Perlbal-1.60/lib/Perlbal/ClientHTTPBase.pm 2008-02-11 01:31:21.000000000 -0500 @@ -79,7 +79,7 @@ sub new { $self->state('reading_headers'); - bless $self, ref $class || $class; + Perlbal::rebless($self, ref $class || $class); $self->watch_read(1); return $self; } diff -up Perlbal-1.60/lib/Perlbal/ClientManage.pm.BAD Perlbal-1.60/lib/Perlbal/ClientManage.pm --- Perlbal-1.60/lib/Perlbal/ClientManage.pm.BAD 2008-02-11 01:25:48.000000000 -0500 +++ Perlbal-1.60/lib/Perlbal/ClientManage.pm 2008-02-11 01:27:49.000000000 -0500 @@ -24,7 +24,7 @@ sub new { $self->{ctx} = Perlbal::CommandContext->new; $self->{ctx}->verbose(1); - bless $self, ref $class || $class; + Perlbal::rebless($self, ref $class || $class); $self->watch_read(1); return $self; } diff -up Perlbal-1.60/lib/Perlbal/Plugin/EchoService.pm.BAD Perlbal-1.60/lib/Perlbal/Plugin/EchoService.pm --- Perlbal-1.60/lib/Perlbal/Plugin/EchoService.pm.BAD 2008-02-11 01:29:08.000000000 -0500 +++ Perlbal-1.60/lib/Perlbal/Plugin/EchoService.pm 2008-02-11 01:29:36.000000000 -0500 @@ -64,7 +64,7 @@ sub new { $self->{service} = $service; $self->{buf} = ""; # what we've read so far, not forming a complete line - bless $self, ref $class || $class; + Perlbal::rebless($self, ref $class || $class); $self->watch_read(1); return $self; } diff -up Perlbal-1.60/lib/Perlbal/BackendHTTP.pm.BAD Perlbal-1.60/lib/Perlbal/BackendHTTP.pm --- Perlbal-1.60/lib/Perlbal/BackendHTTP.pm.BAD 2008-02-11 01:29:45.000000000 -0500 +++ Perlbal-1.60/lib/Perlbal/BackendHTTP.pm 2008-02-11 01:30:13.000000000 -0500 @@ -109,7 +109,7 @@ sub new { # for header reading: $self->init; - bless $self, ref $class || $class; + Perlbal::rebless($self, ref $class || $class); $self->watch_write(1); return $self; } @@ -171,7 +171,7 @@ sub new_process { $self->state("connecting"); $self->init; - bless $self, ref $class || $class; + Perlbal::rebless($self, ref $class || $class); $self->watch_write(1); return $self; } diff -up Perlbal-1.60/lib/Perlbal/TCPListener.pm.BAD Perlbal-1.60/lib/Perlbal/TCPListener.pm --- Perlbal-1.60/lib/Perlbal/TCPListener.pm.BAD 2008-02-11 01:31:29.000000000 -0500 +++ Perlbal-1.60/lib/Perlbal/TCPListener.pm 2008-02-11 01:31:50.000000000 -0500 @@ -49,7 +49,7 @@ sub new { $self->{service} = $service; $self->{hostport} = $hostport; $self->{sslopts} = $opts->{ssl}; - bless $self, ref $class || $class; + Perlbal::rebless($self, ref $class || $class); $self->watch_read(1); return $self; } diff -up Perlbal-1.60/lib/Perlbal/ClientProxy.pm.BAD Perlbal-1.60/lib/Perlbal/ClientProxy.pm --- Perlbal-1.60/lib/Perlbal/ClientProxy.pm.BAD 2008-02-11 01:30:22.000000000 -0500 +++ Perlbal-1.60/lib/Perlbal/ClientProxy.pm 2008-02-11 01:30:37.000000000 -0500 @@ -66,7 +66,7 @@ sub new { $self->SUPER::new($service, $sock); # init base fields Perlbal::objctor($self); - bless $self, ref $class || $class; + Perlbal::rebless($self, ref $class || $class); $self->init; $self->watch_read(1); diff -up Perlbal-1.60/lib/Perlbal/UploadListener.pm.BAD Perlbal-1.60/lib/Perlbal/UploadListener.pm --- Perlbal-1.60/lib/Perlbal/UploadListener.pm.BAD 2008-02-11 01:28:10.000000000 -0500 +++ Perlbal-1.60/lib/Perlbal/UploadListener.pm 2008-02-11 01:28:55.000000000 -0500 @@ -30,7 +30,7 @@ sub new { my $self = $class->SUPER::new($sock); $self->{service} = $service; $self->{hostport} = $hostport; - bless $self, ref $class || $class; + Perlbal::rebless($self, ref $class || $class); $self->watch_read(1); return $self; }
From: brad [...] danga.com
fixed in 1.70