Steve Hay wrote:
Stas Bekman wrote:
Stas Bekman wrote:
This and your trace proves my suspicion that my solution just happened to work for the particular setup you had the crush with. But I think we are on the right track. We get the crash when the wrong perl is set as the current context. I will try to remove my recent solution and try to see why modperl_cmd_modules doesn't use the correct perl. This is the place where the problem comes from.
Please try this patch:
Trying your patch with the short conf file that I posted a few minutes ago, the -t test now passes "syntax OK", but the server still won't start.
Running "C:\apache2\bin\Apache.exe -d C:/Temp/modperl-2.0/t -f C:/Temp/modperl-2.0/t/conf/httpd.conf -DAPACHE2 -DPERL_USEITHREADS" still crashes at the same "Free to wrong pool" place in the code, although its much earlier and I don't see that error message in the console now. Here's the stack trace:
=====
VMem::Free(void * 0x009fa3ac) line 208 + 3 bytes
CPerlHost::Free(void * 0x009fa3ac) line 59 + 34 bytes
PerlMemFree(IPerlMem * 0x00262434, void * 0x009fa3ac) line 302
Perl_safesysfree(void * 0x009fa3ac) line 143 + 26 bytes
Perl_sv_clear(interpreter * 0x002643cc, sv * 0x002653c4) line 5198 + 13 bytes
Perl_sv_free(interpreter * 0x002643cc, sv * 0x002653c4) line 5342 + 13 bytes
Perl_free_tmps(interpreter * 0x002643cc) line 189 + 13 bytes
perl_destruct(interpreter * 0x002643cc) line 456 + 23 bytes
modperl_perl_destruct(interpreter * 0x002643cc) line 144 + 9 bytes
So here we get perl_destruct calling some functions that rely on the right context. I don't get this problem, but please try this patch:
[...]
Still doesn't work :(
The backtrace and MOD_PERL_TRACE are the same as before (except for a few extra lines in the MOD_PERL_TRACE relating to the new "PerlSwitches -I..." that I've added to this minimal conf file).
The full vhost setup also still fails as before. The backtrace is again the same. I've attached the MOD_PERL_TRACE output since it includes a couple of new lines (from the extra trace call that your patch added).
Using the full vhost test setup I do still see the "Free to wrong pool" message as before, but the stack trace is still shorter.
Just to prove my assumptions I'd try to temporarely patch it as:
Index: src/modules/perl/modperl_util.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v retrieving revision 1.55 diff -u -r1.55 modperl_util.c --- src/modules/perl/modperl_util.c 9 Oct 2003 23:56:52 -0000 1.55 +++ src/modules/perl/modperl_util.c 23 Oct 2003 23:34:32 -0000 @@ -4,6 +4,8 @@ { SV *sv;
+ PERL_SET_CONTEXT(my_perl);
+
dSP;
PUSHSTACKi(PERLSI_REQUIRE);
PUTBACK;
I get errors compiling that:
modperl_util.c(7) : error C2275: 'SV' : illegal use of this type as an expression
C:\apache2\perl5\lib\CORE\perl.h(1772) : see declaration of 'SV'
modperl_util.c(7) : error C2065: 'sp' : undeclared identifier
modperl_util.c(7) : error C2100: illegal indirection
modperl_util.c(8) : error C2113: pointer can only be subtracted from another pointer
It compiles if I put the new PERL_SET_CONTEXT(my_perl) call after the dSP. But it makes no difference either to the short or the full conf file.
- Steve
trace.txt.gz
Description: GNU Zip compressed data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]