perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Malcolm <mjhlists-modperl-20060...@liminalflux.net>
Subject Re: help about Apache::Scoreboard
Date Fri, 14 Dec 2007 14:47:23 GMT
On Thursday 13 December 2007 10:00:30 am Jeff Pang wrote:

> right now I got these exceptions in error_log:
>
> [Thu Dec 13 21:53:49 2007] [notice] child pid 4660 exit signal
> Segmentation fault (11)

Apache::Scoreboard is basically just a wrapper around the apache scoreboard 
api, so we're dealing with the C layer for the most part not the perl layer. 
The seg faults suggests we're wandering off a bad pointer somewhere. :-(

Did you try running apache under a debugger to see where it's segfaulting?

> This is my full code (the key string for generating md5 is replaced
> here for privacy reasons):

Can you cut this down to just the Apache::Scoreboard using code? That way we 
can be sure that's what is causing the problem.


Try this:

> use strict;
> use warnings;
> use Apache::Constants qw(OK FORBIDDEN DECLINED);
> use Apache::Request ();
> use Apache::Scoreboard ();
> use Apache qw(exit);
>
> sub handler {
>
>     my $r = shift;

>     my $image = Apache::Scoreboard->image;
>
>     for (my $parent = $image->parent; $parent; $parent = $parent->next) {

warn "parent pid: " . $parent->pid;

>         my $server = $parent->server;
warn "server: " . $server;	# just to prove we're not undef here
warn "- status: " . $server->status;
warn "- client: " . $server->client;

>         }
>     }
>
>     return OK;
> }
>
> 1;

and see what's in the logs.


Did you do any of the following from my previous email?

> I got many warnings in error_log:
>
> Use of uninitialized value in string eq at /opt/apache1.3/run/DLAuth.pm
> line 42. at /opt/apache1.3/run/DLAuth.pm line 42
>         DLAuth::handler('Apache=SCALAR(0x91cbe8c)') called at /dev/null
> line 0 eval {...} called at /dev/null line 0
>
> The line 42 is:
> if (($ip eq $server->client) or ($host eq $server->client)) {

What are the values of $ip, $host and $server->client at that point? 
The "uninitialised value" could be any of the above.

> And the handler (PerlAccessHandler) seems work not correctly.

Does it work as a perl request handler? (PerlHandler for mp1).
Can you get any values at all out of the ServerScore instance?


Mime
View raw message