perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Moneymaker" <>
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 
>> file to the file and no segfaults are 
>>occurring including even when I change the 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 
I discovered what was causing the problem.  Even though I had used the 
following in the 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 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 
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
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 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/
# Apache2::Reload::handler('Apache2::RequestRec=SCALAR(0xcce5d18)') called 
at /opt/prod/apache/Melior/ line 0
# eval {...} called at /opt/prod/apache/Melior/ line 0
# Apache2::Reload: Checking mtime of
# 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

View raw message