I wonder if anyone has any light to shed on this peculiar problem?

Last night I rebooted a server that's been running happily for several
months, changing nothing.  When it came up, all my HTML::Mason-based
sites no longer worked, with all requests routed through Mason causing
the child server to seggy-fault with no information in the logs.

Through careful detective work, I traced the problem to an invocation
of $s->dir_config(), where $s is the result of Apache->server().
Although I first ran into this in the context of HTML::Mason, much
simpler test programs also show the same problem:

        #!/usr/bin/perl -w

        use strict;
        use CGI;

        my $cgi = new CGI();
        print $cgi->header(-type => "text/plain");

        my $which = $cgi->param("which");
        if (!defined $which) {
            print "Test what?";
        } else {
            warn "test.pl: checking\n";
            my $request = Apache->request();
            warn "test.pl: request='$request'\n";
            my $server = Apache->server();
            warn "test.pl: server='$server'\n";
            my $config = $server->dir_config();
            warn "test.pl: config='$config'\n";
            my $val = $config->get($which);
            warn "test.pl: val='$val'\n";
            print $val;
        }

This gets as far as writing the following lines to the site error-log:
        test.pl: checking
        test.pl: request='Apache=SCALAR(0x82203bc)'
        test.pl: server='Apache::Server=SCALAR(0x83602cc)'
then quits before writing the "config=" line.  At this point, a single
line is written to the master error-log.
        [Tue Apr 26 15:32:10 2005] [notice] child pid 8777 exit signal 
Segmentation fault (11)

The bizarre thing is that, as I said, _nothing_ has changed since
yesterday, when this worked just fine.

I tried to run httpd under both strace and gdb, but I have not managed
to get any useful information out of it that way.  I am using Apache
1.3.33 with mod_perl 1.29 (the most recent 1.x versions of both, I
believe) both built from source.

Here is the relevant section of my httpd.conf:

        <VirtualHost localhost.localnet>
            ServerName sru.miketaylor.org.uk
            DocumentRoot /usr/local/src/mike/sru/htdocs
            ErrorLog  /usr/local/src/mike/sru/logs/error.log
            CustomLog /usr/local/src/mike/sru/logs/access.log combined
            <FilesMatch "\.pl$">
                Options +ExecCGI
                SetHandler perl-script
                PerlHandler Apache::Registry
            </FilesMatch>
        </VirtualHost>

Pretty vanilla, I think you'll agree.

All suggestions welcome!  Thanks.

 _/|_    ___________________________________________________________________
/o ) \/  Mike Taylor  <[EMAIL PROTECTED]>  http://www.miketaylor.org.uk
)_v__/\  "Everything free in America, for a small fee in America" --
         Steven Sondheim, "West Side Story"

--
Listen to free demos of soundtrack music for film, TV and radio
        http://www.pipedreaming.org.uk/soundtrack/

Reply via email to