in reply to mod_perl go boom, mod_cgi works

Just a thought, but have you tried building apache using the --disable-rule=EXPAT? I know AxKit (using LibXML/LibXSLT) segfaults under mod_perl when EXPAT is compiled into Apache. In fact, it's a known warning/check when compiling/installing AxKit.

Most Apache ports in the ports on FreeBSD have this Makefile option too: WITHOUT_APACHE_EXPAT.

Replies are listed 'Best First'.
Re: mod_perl go boom, mod_cgi works
by hacker (Priest) on Mar 07, 2005 at 11:53 UTC
    Does this remove expat support? Or just rely on the external expat system library/headers instead?

      To be honest, I have no idea. Here's the mention on AxKit:

      There are currently some incompatibilities between the versions of expat loaded by Apache when compiled with RULE_EXPAT=yes (which is a default, unfortunately), and XML::Parser's copy of expat. This can cause sporadic segmentation faults in Apache's httpd processes. The solution is to recompile Apache with RULE_EXPAT=no (later Apache's have implemented this as --disable-rule=expat). If you have a recent mod_perl and use mod_perl's Makefile.PL DO_HTTPD=1 to compile Apache for you, this option will be enabled automatically for you.

        I've tried this on two test boxes, and the segfaults are still happening. They don't happen when I set MaxRequestsPerClient to 2... I haven't tried higher. This value was previously set to 500.

        One odd anomaly, and possibly a clue, is that sometimes when I click on one link, it will give me the content for a previously-clicked link, or tell me that one of the links I clicked previously does not exist. Its very peculiar.

        For example, I click on 'foo', then 'bar', then 'blort', and then when I click on 'quux', it will either show me the content that clicking 'foo' would have shown, or it will report that 'foo' does not exist.

        I think I have globals staying around, but I can't see where this can be happening, unless its deep inside the CGI.pm module, where I'm parsing param() for the form variables passed in.