The problem is that currently we allow PerlOptions +Parent/+Clone in the prefork mpm, so this:
<IfDefine PERL_USEITHREADS> # a new interpreter pool PerlOptions +Parent </IfDefine>
Creates two perl interpreters in the same process (there are no threads). And it actually works (almost), so two developers can share one prefork mpm server, each having a different @INC. Of course your memory usage doubles.
The problem is that the code has different assumptions on when it should handle this situation and when not. e.g. it must duplicate the handler structure for each perl, but currently it does:
#ifdef USE_ITHREADS if (p && !MpHandlerPARSED(handler) && !MpHandlerDYNAMIC(handler)) { MP_dSCFG(s); if (scfg->threaded_mpm) { /* * cannot update the handler structure at request time without * locking, so just copy it */ handler = *handp = modperl_handler_dup(p, handler); duped = 1; } } #endif
so it breaks mp2/prefork mpm on certain tests combinations. one is when a vhost with +Parent happens to load TestHooks::trans first, and when the parent process wants to run it, it thinks it has it loaded (because the handler wasn't dupped) and then we get the now infamous 'not a CODE reference' error.
So there are two paths to go from here, the simplest don't allow more than one perl per process in the prefork mpm and cleanup any redundant code that is currently run for nothing (most of the code within #ifdef USE_ITHREADS .. #endif). Probably should introduce a new define APACHE_THREADED_MPM instead of using USE_ITHREADS.
The second is to go and fix all the places where scfg->threaded_mpm check is done to accomodate the prefork mpm as well.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]