perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Moneymaker" <vbmonyma...@hotmail.com>
Subject Re: Apache2::Reload Segmentation Fault
Date Sun, 24 Apr 2005 03:54:22 GMT
Vince Moneymaker wrote:
>>Okay, all of the tests are being passed.  I have added the contents of my 
>>startup.pl file to the modperl_startup.pl file and no segfaults are 
>>occurring including even when I change the Handler.pm file as the tests 
>>are being run on it.  I have also added some items to the conf file to try 
>>and reproduced how my httpd.conf file is set up and again no segfaults.  
>>Should I go the whole way and add the entire contents of my httpd.conf 
>>file to the test conf file?  Or is there some other approach I should take 
>>in order to reproduce the problem?
>
>Stas Bekman wrote
>
>Yes, the easiest approach is to start with everything that you have and you 
>get a segfault. And then follow the "binary search" approach, where you try 
>to cut the stuff to the minimum but trying to remove halves of 
>config/code/whatever.
>
>
I discovered what was causing the problem.  Even though I had used the 
following in the startup.pl file

use Apache2::Const -compile => ':common';

the Apache modules were segfaulting on the straight 'OK' constant 
declarations in them.  So I fixed the problem by replacing the above line 
with the following line in the startup.pl file

use Apache2::Const -compile => qw(OK REDIRECT FORBIDDEN SERVER_ERROR);

I then went through each Apache module and removed the 'use Apache2::Const' 
declarations and  changed all of the 'OK' constants to Apache2::Const::OK .  
I did the same thing for the REDIRECT, FORBIDDEN, etc constants in the 
modules.  The only problem I am still having is with the REMOTE_HOST 
constant which caused a changed module to segfault no matter how I declare 
it.
Otherwise, all of the Apache modules work fine.

However, the other modules I have in the Melior namespace are not getting 
reloaded.  Apparently the reason for this as noted in the following post at
http://forums.devside.net/viewtopic.php?t=671&start=0&postdays=0&postorder=asc&highlight=
is that they are being called from within the Apache2 modules.  In other 
words, because the Melior modules only get requested by modules in the 
Apache2 namespace, they don't get reloaded even though their own separate 
namespace is declared within them, as well as in the Apache2 modules and the 
startup.pl file.

With regard to debugging this problem, the reload debugger shows that the 
Melior modules do get reloaded when they change but the change doesn't show 
up on the page that gets spit out.  Here is a sample from the error_log

#Apache2::Reload: process 24620 reloading Melior::Menus from Melior/Menus.pm
# Apache2::Reload::handler('Apache2::RequestRec=SCALAR(0xcce5d18)') called 
at /opt/prod/apache/Melior/Menus.pm line 0
# eval {...} called at /opt/prod/apache/Melior/Menus.pm line 0
# Apache2::Reload: Checking mtime of CCMckErrno3_2.pm
# Apache2::Reload::handler('Apache2::RequestRec=SCALAR(0xcce5d18)') called 
at -e line 0
# eval {...} called at -e line 0

BTW, as I mentioned last time, I believe this problem first cropped up with 
modperl version 1.99.17.  If you have any suggestions on what I should 
tinker with in order to get modules called by other modules reloaded that 
would be great.

And again thanks for all of your help, Vince



Mime
View raw message