On Sat, 2003-06-14 at 04:35, Matthew Pressly wrote:
> I have handler that looks like this:
> 
> sub handler ($$) {
>   my ($class, $apache) =3D @_;
>   Apache::request($apache);
>   $apache->status(200);         # Default
> 
>   #.....
> }

This could be related to a recently discovered bug in
mp_preload_module(), see
http://marc.theaimsgroup.com/?t=105532710700003&r=1&w=2
for the original report.

> The vast majority of the time, this works fine.  Every now
> and then, usually after the apache server has been up
> for a while, and usually under substantial load,
> it appears that the handler in one child process starts
> being called as if it did not have the prototype.
> That is, $apache ($r) is in $_[0] instead of $_[1],
> and I get messages like this:
> 
> [Fri Jun 13 06:00:06 2003] [error] Can't call method "status" on an undefin=
> ed
> +value at Project/Control.pm line 116.

Does this happen only once per child, or does the affected child behaves
like that for each and every request to that handler?

> And things quit working because $apache is not set properly.
> 
> A server restart clears this up.  This is a perl5.6.0
> DSO build of mod_perl/apache (1.27), but I am fairly certain I
> have also seen this occur on a static mod_perl/apache.
> 
> Any ideas on what causes this or a good way to track it down?

One thing that can fix this problem, if it's indeed caused by
mp_preload_module, would be to make sure to preload that module
with a PerlModule My::Class in your httpd.conf

> --
> Matthew Pressly
> 
-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/    F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to