Re: Apache2::Reload Segmentation Fault
[prev]
[thread]
[next]
[Date index for 2005/04/25]
Vincent Moneymaker wrote:
> 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.
Vincent, what do you mean by 'declaration' here? You mean you've used it?
> 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.
Well, I'm still not clear on what was your setup like. If you can submit a
tarball that reproduces the problem, I'll look at it.
> 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.
Vincent, please send in a tarball with a minimum setup reproducing the
problem. I don't undestand from your description what's not right.
> 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
Have you looked at this item?
http://perl.apache.org/docs/2.0/api/Apache2/Reload.html#Problems_with_Scripts_Running_with_Registry_Handlers_that_Cache_the_Code
> 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.
The only suggestion I have at the moment is that we need to be able to
reproduce the problem... :)
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
 |
(message missing)
|