On Fri, 21 Sep 2001, Stas Bekman wrote:

> Doug MacEachern wrote:
>
> > On Fri, 21 Sep 2001, Stas Bekman wrote:
> >
> >
> >>prefork I believe. That's the default, right? here is my build command:
> >>
> >
> > dunno, i always specify --with-mpm, check httpd -V (or
> > build/config.pl) for APACHE_MPM_DIR, which is also reported when t/TEST
> > starts the server.
>
> Server compiled with....
>   -D APACHE_MPM_DIR="server/mpm/prefork"
>
> So the default is correct.
>
> Any other ideas regarding gdb? Or at least some ways to debug the debug?
>   We have pretty much similar systems, I'm surprised that yours is doing
> the right thing, while mine and gozer's not :(

It seems to me like a bug in gdb. What version of gdb do you run, doug?
Mine is GNU gdb 20010813 (MI_OUT).

I've debugged it under strace and all this time that the server doesn't
start, it runs a huge loop of calls like:
ptrace(PTRACE_PEEKTEXT, 14438, 0x401f27d0, [0]) = 0
which according to the ptrace manpage, is gdb trying to read a word from
the text or data segments. when this loop ends, the server is then
listening and we run tests. can you strace your gdb and see what you get?

also watch this, the non-mod_perl httpd doesn't seem to be right.

 % gdb /home/stas/httpd/2.0/bin/httpd
(gdb) run
Starting program: /home/stas/httpd/2.0/bin/httpd
[New Thread 1024 (LWP 14867)]

Program exited normally.
(gdb)

error_log:
[Fri Sep 21 15:13:47 2001] [notice] Apache/2.0.26-dev (Unix) mod_ssl/3.0a0
OpenSSL/0.9.6b DAV/2 configured -- resuming normal operations

why's that?

BTW, while messing with debug I've fixed this code to use writefile(), is
that OK?

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.32
diff -u -r1.32 TestServer.pm
--- Apache-Test/lib/Apache/TestServer.pm        2001/09/19 11:12:06     1.32
+++ Apache-Test/lib/Apache/TestServer.pm        2001/09/21 07:08:55
@@ -153,24 +153,23 @@
     my $args        = $self->args;
     my $one_process = $self->version_of(\%one_process);

-    my $file = catfile $config->{vars}->{serverroot}, '.gdb-test-start';
-    my $fh   = $config->genfile($file);
-
-    print $fh default_gdbinit();
+    my $gdb_init = default_gdbinit();

     if (@breakpoints) {
-        print $fh "b ap_run_pre_config\n";
-        print $fh "run $one_process $args\n";
-        print $fh "finish\n";
+        $gdb_init .= "b ap_run_pre_config\n";
+        $gdb_init .= "run $one_process $args\n";
+        $gdb_init .= "finish\n";
         for (@breakpoints) {
-            print $fh "b $_\n"
+            $gdb_init .= "b $_\n"
         }
-        print $fh "continue\n";
+        $gdb_init .= "continue\n";
     }
     else {
-        print $fh "run $one_process $args\n";
+        $gdb_init .= "run $one_process $args\n";
     }
-    close $fh;
+
+    my $file = catfile $config->{vars}->{serverroot}, '.gdb-test-start';
+    $config->writefile($file, $gdb_init);

     my $command;
     my $httpd = $config->{vars}->{httpd};


_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to