You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Rodent of Unusual Size <Ke...@Golux.Com> on 2002/01/03 05:47:55 UTC
Recent perl-frameworks broke 1.3 testing..?
Maybe it's because of all the attention on 2.0, but suddenly
t/TEST is hanging when run against a 1.3 server. This is
new behaviour since 2 December 2001, when it was working
fine.
What I get now is:
% t/TEST
setting ulimit to allow core files
ulimit -c unlimited
exec t/TEST -v apache/etags
/tmp/ap1/bin/httpd -X -d /home/coar/httpd-test/perl-framework/t -f /home/coar/httpd-test/perl-framework/t/conf/httpd.conf -DAPACHE1
using Apache/1.3.23-dev
waiting for server to start: ok (waited 0 secs)
server localhost:8529 started
server localhost:8530 listening (mod_headers)
server localhost:8531 listening (mod_proxy)
server localhost:8532 listening (mod_vhost_alias)
and there it sits. It sat there for longer than ten minutes.
This is repeatable, and I don't know what it's waiting for --
I can telnet to localhost:8529 and 'HEAD / HTTP/1.0' just
fine.
This is with a completely vanilla checkout of the test
framework, and a slightly patched server. I *believe*
I tested it with a completely vanilla server, too, but
I'm not positive.
Sorry I'm not using that bug_report.pl (or whatever it
was) script, Stas, but it doesn't appear to be part of
the httpd-test repository. Apologies also for not being
much help in debugging these things, but I just can't
trace my way through the Deep Magic variety of Perl
used here..
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Stas Bekman wrote:
>
> Nope, they don't get compiled unless I go to src/support and
> run make from there, here is the transcript:
>
> % cd apache-1.3
>
> % make clean
> % CFLAGS="-g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow" \
> ./configure --enable-shared=max --enable-module=most --with-layout=Apache \
> --prefix=/home/stas/httpd/1.3
> % make
> make: Nothing to be done for `all'.
> % cd src
> % make
That's very very screwy right there. A 'make' in src/.. should
build everything. *That's* why you have to cd to src/support;
the src/../Makefile does that.
There should have been a bunch o' output from the ./configure.
Somehow the top-level Makefile is bogus.
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Stas Bekman <st...@stason.org>.
Rodent of Unusual Size wrote:
> Stas Bekman wrote:
>
>>That's weird, I've to run this weird sequence and move around dirs.
>>
>>make clean
>>CFLAGS="-g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow" \
>>./configure --enable-shared=max --enable-module=most --with-layout=Apache \
>>--prefix=/home/stas/httpd/1.3
>>make
>>cd support
>>make
>>cd ../..
>>make install
>>
>
> What happens if you just do
>
> make
> make install
>
> Don't the support apps show up in /home/stas/httpd/1.3/bin/ ?
Nope, they don't get compiled unless I go to src/support and run make from there, here is the transcript:
% cd apache-1.3
% make clean
% CFLAGS="-g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow" \
./configure --enable-shared=max --enable-module=most --with-layout=Apache \
--prefix=/home/stas/httpd/1.3
% make
make: Nothing to be done for `all'.
% cd src
% make
...
% cd ..
% make install
(doesn't install any support stuff because it wasn't built)
% cd src/support
% make
% cd ../..
% make install
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Stas Bekman wrote:
>
> That's weird, I've to run this weird sequence and move around dirs.
>
> make clean
> CFLAGS="-g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow" \
> ./configure --enable-shared=max --enable-module=most --with-layout=Apache \
> --prefix=/home/stas/httpd/1.3
> make
> cd support
> make
> cd ../..
> make install
What happens if you just do
make
make install
Don't the support apps show up in /home/stas/httpd/1.3/bin/ ?
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Stas Bekman <st...@stason.org>.
Rodent of Unusual Size wrote:
> Stas Bekman wrote:
>
>>>The utils are built by 'make install' not by 'make', ISTR.
>>>
>>well they don't seem to get built for me. I have to do it manually. Could
>>be some libtool problem. So what are you build args so I can try them?
>>
>
> I thought you went to bed! :-)
Almost :)
> libtool isn't an issue on 1.3, because 1.3 doesn't use it.
>
> I use
>
> CFLAGS="-g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow" \
> ./configure --enable-shared=max --enable-module=most --with-layout=Apache \
> --prefix=(wherever)
That's weird, I've to run this weird sequence and move around dirs.
make clean
CFLAGS="-g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow" \
./configure --enable-shared=max --enable-module=most --with-layout=Apache \
--prefix=/home/stas/httpd/1.3
make
cd support
make
cd ../..
make install
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Stas Bekman wrote:
>
> > The utils are built by 'make install' not by 'make', ISTR.
>
> well they don't seem to get built for me. I have to do it manually. Could
> be some libtool problem. So what are you build args so I can try them?
I thought you went to bed! :-)
libtool isn't an issue on 1.3, because 1.3 doesn't use it.
I use
CFLAGS="-g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow" \
./configure --enable-shared=max --enable-module=most --with-layout=Apache \
--prefix=(wherever)
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Stas Bekman <st...@stason.org>.
On Thu, 3 Jan 2002, Rodent of Unusual Size wrote:
> Stas Bekman wrote:
> >
> > Found the problem, temporary replace
> >
> > $child_pid = open $child_in_pipe, "|$cmd";
> >
> > with:
> >
> > system "$cmd &";
> >
> > in Apache-Test/lib/Apache/TestServer.pm
>
> Thanks, I'll try that..
>
> > Any ideas why this doesn't work with 1.3? Something goes wrong
> > with the spawned process.
>
> Not at the moment; I lack context (like the value of $cmd).
the value of $cmd is what get printed, e.g. with 1.3:
/home/stas/httpd/1.3/bin/httpd -X -d
/home/stas/apache.org/httpd-test/perl-framework/t -f
/home/stas/apache.org/httpd-test/perl-framework/t/conf/httpd.conf
-DAPACHE1 -DPERL_USEITHREADS
now you have the context :) , also see my last email, there is a
difference between how apache restarts with 1.x and 2.x.
> > BTW, how do you build your 1.3? For some reason I don't get support
> > utils built with 'make' have to cd to support and make again.
>
> The utils are built by 'make install' not by 'make', ISTR.
well they don't seem to get built for me. I have to do it manually. Could
be some libtool problem. So what are you build args so I can try them?
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Stas Bekman wrote:
>
> Found the problem, temporary replace
>
> $child_pid = open $child_in_pipe, "|$cmd";
>
> with:
>
> system "$cmd &";
>
> in Apache-Test/lib/Apache/TestServer.pm
Thanks, I'll try that..
> Any ideas why this doesn't work with 1.3? Something goes wrong
> with the spawned process.
Not at the moment; I lack context (like the value of $cmd).
> BTW, how do you build your 1.3? For some reason I don't get support
> utils built with 'make' have to cd to support and make again.
The utils are built by 'make install' not by 'make', ISTR.
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Stas Bekman <st...@stason.org>.
Rodent of Unusual Size wrote:
> Stas Bekman wrote:
>
>>please test this patch (against current cvs) and if it's good
>>I'll commit it. (it includes all my latest status propagation work,
>>which is not committed)
>>
>
> Worked for me testing 1.3. Haven't tried against 2.0.
I've already committed the fix to the original problem with the fork.
I'll wait for Doug's comments on my earlier patch that handles all the
exit calls.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Stas Bekman wrote:
>
> please test this patch (against current cvs) and if it's good
> I'll commit it. (it includes all my latest status propagation work,
> which is not committed)
Worked for me testing 1.3. Haven't tried against 2.0.
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Stas Bekman <st...@stason.org>.
On Fri, 4 Jan 2002, Stas Bekman wrote:
> Found the problem, temporary replace
>
> $child_pid = open $child_in_pipe, "|$cmd";
>
> with:
>
> system "$cmd &";
>
> in Apache-Test/lib/Apache/TestServer.pm
>
> the way it was before (well sort of, it's not good in failure cases, but
> at least it starts)
>
> this is because of my latest patch to make t/TEST immediately detect
> failures. Any ideas why this doesn't work with 1.3? Something goes wrong
> with the spawned process.
This seems to work with 1.3 and 2.0:
my $pid = fork();
unless ($pid) {
my $status = system "$cmd";
if ($status) {
$status = $? >> 8;
error "httpd didn't start! $status";
}
CORE::exit $status;
}
instead of system "$cmd &" as it was originally. In this case I can get to
the return status' value with CHLD sighandler.
Surprisingly for 2.0 it's enough to say:
$status = system "httpd ...";
and everything is cool, since system returns almost immediately. Not with
1.3, though it restarts the same way (I guess not exactly the same).
please test this patch (against current cvs) and if it's good I'll commit
it. (it includes all my latest status propagation work, which is not
committed)
Index: Apache-Test/lib/Apache/TestRun.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.80
diff -u -r1.80 TestRun.pm
--- Apache-Test/lib/Apache/TestRun.pm 31 Dec 2001 09:09:43 -0000 1.80
+++ Apache-Test/lib/Apache/TestRun.pm 3 Jan 2002 19:14:55 -0000
@@ -17,6 +17,7 @@
use Config;
use constant STARTUP_TIMEOUT => 300; # secs (good for extreme debug cases)
+use subs qw(exit_shell exit_perl);
my %core_files = ();
@@ -137,7 +138,7 @@
my @invalid_argv = @{ $self->{argv} };
if (@invalid_argv) {
error "unknown opts or test names: @invalid_argv";
- exit;
+ exit_perl 0;
}
}
@@ -258,16 +259,17 @@
return unless $_[0] =~ /^Failed/i; #dont catch Test::ok failures
$server->stop(1) if $opts->{'start-httpd'};
$server->failed_msg("error running tests");
+ exit_perl 0;
};
$SIG{INT} = sub {
if ($caught_sig_int++) {
warning "\ncaught SIGINT";
- exit;
+ exit_perl 0;
}
warning "\nhalting tests";
$server->stop if $opts->{'start-httpd'};
- exit;
+ exit_perl 0;
};
#try to make sure we scan for core no matter what happens
@@ -383,17 +385,19 @@
for (@exit_opts) {
next unless exists $self->{opts}->{$_};
my $method = "opt_$_";
- exit if $self->$method();
+ exit_perl $self->$method();
}
if ($self->{opts}->{'stop-httpd'}) {
+ my $ok = 1;
if ($self->{server}->ping) {
- $self->{server}->stop;
+ $ok = $self->{server}->stop;
+ $ok = $ok < 0 ? 0 : 1; # adjust to 0/1 logic
}
else {
warning "server $self->{server}->{name} is not running";
}
- exit;
+ exit_perl $ok ;
}
}
@@ -407,7 +411,7 @@
($test_config->{APXS} ?
"an apxs other than $test_config->{APXS}" : "apxs").
" or put either in your PATH";
- exit 1;
+ exit_perl 0;
}
my $opts = $self->{opts};
@@ -427,7 +431,8 @@
}
if ($opts->{'start-httpd'}) {
- exit 1 unless $server->start;
+ my $status = $server->start;
+ exit_perl 0 unless $status;
}
elsif ($opts->{'run-tests'}) {
my $is_up = $server->ping
@@ -436,7 +441,7 @@
&& $server->wait_till_is_up(STARTUP_TIMEOUT));
unless ($is_up) {
error "server is not ready yet, try again.";
- exit;
+ exit_perl 0;
}
}
}
@@ -464,7 +469,7 @@
sub stop {
my $self = shift;
- $self->{server}->stop if $self->{opts}->{'stop-httpd'};
+ return $self->{server}->stop if $self->{opts}->{'stop-httpd'};
}
sub new_test_config {
@@ -491,13 +496,10 @@
}
close $sh;
- open $sh, "|$binsh" or die;
- my @cmd = ("ulimit -c unlimited\n",
- "exec $0 @ARGV");
- warning "setting ulimit to allow core files\n@cmd";
- print $sh @cmd;
- close $sh;
- exit; #exec above will take over
+ my $command = "ulimit -c unlimited; $0 @ARGV";
+ warning "setting ulimit to allow core files\n$command";
+ exec $command;
+ die "exec $command has failed"; # shouldn't be reached
}
sub set_ulimit {
@@ -548,13 +550,13 @@
warning "forcing Apache::TestConfig object save";
$self->{test_config}->save;
warning "run 't/TEST -clean' to clean up before continuing";
- exit 1;
+ exit_perl 0;
}
}
if ($self->{opts}->{configure}) {
warning "reconfiguration done";
- exit;
+ exit_perl 1;
}
$self->try_exit_opts;
@@ -770,5 +772,18 @@
}
+# in idiomatic perl functions return 1 on success 0 on
+# failure. Shell expects the opposite behavior. So this function
+# reverses the status.
+sub exit_perl {
+ exit_shell $_[0] ? 0 : 1;
+}
+
+# expects shell's exit status values (0==success)
+sub exit_shell {
+# require Carp;
+# Carp::cluck('exiting');
+ CORE::exit $_[0];
+}
1;
Index: Apache-Test/lib/Apache/TestServer.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm,v
retrieving revision 1.47
diff -u -r1.47 TestServer.pm
--- Apache-Test/lib/Apache/TestServer.pm 31 Dec 2001 10:58:22 -0000 1.47
+++ Apache-Test/lib/Apache/TestServer.pm 3 Jan 2002 19:14:55 -0000
@@ -427,13 +427,23 @@
$SIG{CHLD} = sub {
while ((my $child = waitpid(-1, POSIX::WNOHANG())) > 0) {
my $status = $? >> 8;
+ #error "got child exit $status";
if ($status) {
$self->failed_msg("\nserver has died with status $status");
kill SIGTERM => $$;
}
}
};
- $child_pid = open $child_in_pipe, "|$cmd";
+
+ my $pid = fork();
+ unless ($pid) {
+ my $status = system "$cmd";
+ if ($status) {
+ $status = $? >> 8;
+ error "httpd didn't start! $status";
+ }
+ CORE::exit $status;
+ }
}
while ($old_pid and $old_pid == $self->pid) {
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Stas Bekman <st...@stason.org>.
Found the problem, temporary replace
$child_pid = open $child_in_pipe, "|$cmd";
with:
system "$cmd &";
in Apache-Test/lib/Apache/TestServer.pm
the way it was before (well sort of, it's not good in failure cases, but
at least it starts)
this is because of my latest patch to make t/TEST immediately detect
failures. Any ideas why this doesn't work with 1.3? Something goes wrong
with the spawned process.
Tomorrow I'll work on it again, good night :)
BTW, how do you build your 1.3? For some reason I don't get support
utils built with 'make' have to cd to support and make again.
To answer your question I can reproduce the problem with 1.3 now.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Stas Bekman wrote:
>
> it says that the code hangs on line 570 in
> Apache-Test/lib/Apache/TestRun.pm. But sometimes compiler get confused
> by a few lines, so I'm not sure where exactly the problem is. Can you
> please check if it hangs after $self->start()? e.g. add die() after it:
>
> $self->start;
>
> $self->run_tests;
>
> or put the compiler line counter hint before $self->start():
>
> #line 568
> $self->start;
>
> $self->run_tests;
Did this (the #line), and applied your exit-fix patch to TestRun.pm as well.
(Exit status after the SIGUSR2 was 255.) Here's what it says:
using Apache/1.3.23-dev
waiting for server to start: ok (waited 0 secs)
server localhost:8529 started
server localhost:8530 listening (mod_headers)
server localhost:8531 listening (mod_vhost_alias)
caught SIGUSR2! at t/TEST line 19
main::__ANON__('USR2') called at /home/coar/httpd-test/perl-framework/t/../Apache-Test/lib/Apache/TestRun.pm line 570
Apache::TestRun::run('Apache::TestRun=HASH(0x8588ef0)', '-v', 'modules/access') called at t/TEST line 22
> probably need to add an alarm or see if we need to supply a timeout for
> UserAgent calls.
Tell me what you want me to add. Can you reproduce this with
your own vanilla framework and Apache 1.3 server?
> Also can you please try again with the patch I've sent in a few
> hours ago?
That was included in this.
> > BTW, it hung all night last night -- like for over 7 hours. I
> > started it before I went to bed.
>
> well, once it hangs it hangs :)
I thought there might be a timeout I was too impatient to be
hitting..
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Stas Bekman <st...@stason.org>.
Rodent of Unusual Size wrote:
> * On 2002-01-03 at 08:07,
> Stas Bekman <st...@stason.org> excited the electrons to say:
>
>>Whenever you have a hanging problem in Perl, the solution is very
>>simple. Put into your code this:
>>
> :
>
>>and then kill the process with:
>>
>>% kill -USR2 PID
>>
>>And the printed trace will tell you exactly where the code hangs.
>>
>
> Okey, I'll try it -- but I'm not sure which of this
> frickin' modules to put it in.. so I'll put it in t/TEST.
That's fine. this is a global sighandler.
> Here's what it shows (the bogus ETag value is part of what I'm
> trying to test):
>
> server localhost:8530 listening (mod_headers)
> server localhost:8531 listening (mod_proxy)
> server localhost:8532 listening (mod_vhost_alias)
> GET http://localhost:8529/index.html:
> User-Agent: libwww-perl/5.62
>
> HTTP/1.1 200 OK
> Connection: close
> Date: Thu, 03 Jan 2002 13:31:37 GMT
> Accept-Ranges: bytes
> ETag: ""
> Server: Apache/1.3.23-dev (Unix)
> Content-Length: 26
> Content-Type: text/html
> Last-Modified: Mon, 30 Jul 2001 19:37:14 GMT
> Client-Date: Thu, 03 Jan 2002 13:31:38 GMT
> Client-Peer: 127.0.0.1:8529
>
> caught SIGUSR2! at /tmp/httpd-test/perl-framework/t/TEST line 19
> main::__ANON__('USR2') called at /tmp/httpd-test/perl-framework/t/../Apache-Test/lib/Apache/TestRun.pm line 570
> Apache::TestRun::run('Apache::TestRun=HASH(0x85e5ff8)', '-d=lwp', 2, 'apache/limits') called at /tmp/httpd-test/perl-framework/t/TEST line 22
>
>
> Not very revealing to me..
it says that the code hangs on line 570 in
Apache-Test/lib/Apache/TestRun.pm. But sometimes compiler get confused
by a few lines, so I'm not sure where exactly the problem is. Can you
please check if it hangs after $self->start()? e.g. add die() after it:
$self->start;
$self->run_tests;
or put the compiler line counter hint before $self->start():
#line 568
$self->start;
$self->run_tests;
probably need to add an alarm or see if we need to supply a timeout for
UserAgent calls.
Also can you please try again with the patch I've sent in a few hours ago?
> BTW, it hung all night last night -- like for over 7 hours. I started
> it before I went to bed.
well, once it hangs it hangs :)
--
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
* On 2002-01-03 at 08:07,
Stas Bekman <st...@stason.org> excited the electrons to say:
>
> Whenever you have a hanging problem in Perl, the solution is very
> simple. Put into your code this:
:
> and then kill the process with:
>
> % kill -USR2 PID
>
> And the printed trace will tell you exactly where the code hangs.
Okey, I'll try it -- but I'm not sure which of this
frickin' modules to put it in.. so I'll put it in t/TEST.
Here's what it shows (the bogus ETag value is part of what I'm
trying to test):
server localhost:8530 listening (mod_headers)
server localhost:8531 listening (mod_proxy)
server localhost:8532 listening (mod_vhost_alias)
GET http://localhost:8529/index.html:
User-Agent: libwww-perl/5.62
HTTP/1.1 200 OK
Connection: close
Date: Thu, 03 Jan 2002 13:31:37 GMT
Accept-Ranges: bytes
ETag: ""
Server: Apache/1.3.23-dev (Unix)
Content-Length: 26
Content-Type: text/html
Last-Modified: Mon, 30 Jul 2001 19:37:14 GMT
Client-Date: Thu, 03 Jan 2002 13:31:38 GMT
Client-Peer: 127.0.0.1:8529
caught SIGUSR2! at /tmp/httpd-test/perl-framework/t/TEST line 19
main::__ANON__('USR2') called at /tmp/httpd-test/perl-framework/t/../Apache-Test/lib/Apache/TestRun.pm line 570
Apache::TestRun::run('Apache::TestRun=HASH(0x85e5ff8)', '-d=lwp', 2, 'apache/limits') called at /tmp/httpd-test/perl-framework/t/TEST line 22
Not very revealing to me..
BTW, it hung all night last night -- like for over 7 hours. I started
it before I went to bed.
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Stas Bekman <st...@stason.org>.
> Sorry I'm not using that bug_report.pl (or whatever it
> was) script, Stas, but it doesn't appear to be part of
> the httpd-test repository. Apologies also for not being
> much help in debugging these things, but I just can't
> trace my way through the Deep Magic variety of Perl
> used here..
It's moved. Now it's autogenerated and named t/REPORT.
Whenever you have a hanging problem in Perl, the solution is very
simple. Put into your code this:
use Carp ();
$SIG{'USR2'} = sub {
Carp::confess("caught SIGUSR2!");
};
and then kill the process with:
% kill -USR2 PID
And the printed trace will tell you exactly where the code hangs.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Stas Bekman <st...@stason.org>.
Rodent of Unusual Size wrote:
> * On 2002-01-03 at 08:07,
> William A. Rowe, Jr. <wr...@covalent.net> excited the electrons to say:
>
>>t/TEST -d=lwp 2
>>
>>should show you where things stall, in a bit more detail.
>>
>
> Tried that, not very revealing; it just shows the GET of /index.html
> after the fragment of output I reported earlier.
so it hangs while testing whether the server is ready to serve.
Can you try to issue some requests with a different user agent to the
test server? e.g.
lynx --dump http://localhost:8529/index.html
does it respond? if could be a server problem.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
* On 2002-01-03 at 08:07,
William A. Rowe, Jr. <wr...@covalent.net> excited the electrons to say:
>
> t/TEST -d=lwp 2
>
> should show you where things stall, in a bit more detail.
Tried that, not very revealing; it just shows the GET of /index.html
after the fragment of output I reported earlier.
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: Recent perl-frameworks broke 1.3 testing..?
Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Rodent of Unusual Size" <Ke...@Golux.Com>
Sent: Wednesday, January 02, 2002 10:47 PM
> Maybe it's because of all the attention on 2.0, but suddenly
> t/TEST is hanging when run against a 1.3 server. This is
> new behaviour since 2 December 2001, when it was working
> fine.
t/TEST -d=lwp 2
should show you where things stall, in a bit more detail.