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
modperl_interp_destroy(modperl_interp_t * 0x00924e80) line 128 + 12 bytes
modperl_interp_pool_destroy(void * 0x00851230) line 184 + 12 bytes
run_cleanups(cleanup_t * * 0x00852608) line 1979 + 13 bytes
apr_pool_destroy(apr_pool_t * 0x008525f8) line 755 + 12 bytes
apr_pool_clear(apr_pool_t * 0x0028a9e8) line 715 + 12 bytes
main(int 7, const char * const * 0x00282908) line 619
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e814c7()
=====
and the mp2 trace:
=====
C:\Temp\modperl-2.0>C:\apache2\bin\Apache.exe -d C:/Temp/modperl-2.0/t -f C:/Tem
p/modperl-2.0/t/conf/httpd.conf -DAPACHE2 -DPERL_USEITHREADS
mod_perl trace flags dump:
c On (configuration for directive handlers)
d On (directive processing)
e Off (environment variables)
f Off (filters)
g On (Perl runtime interaction)
h On (handlers)
i On (interpreter pool management)
m On (memory allocations)
o On (I/O)
s On (perl sections)
t Off (benchmark-ish timings)
mod_perl.c:515: mod_perl globals are configured
modperl_global.c:88: init pconf
modperl_global.c:88: init threaded_mpm
modperl_global.c:88: init server_rec
modperl_config.c:187: p=0x28aa50, s=0x82c4d8, virtual=0
modperl_config.c:137: 0x84fd38
modperl_config.c:137: 0x8509e8
modperl_config.c:121: 0x850ca8
modperl_config.c:187: p=0x28aa50, s=0x850670, virtual=1
modperl_cmd.c:259: arg = +Parent
MpSrv flags dump (localhost):
Clone Off
Parent Off
Enable On
Autoload Off
MergeHandlers Off
Authz On
Authen On
PostConfig On
ChildExit On
OutputFilter On
Response On
Log On
PostReadRequest On
OpenLogs On
PreConnection On
MapToStorage On
ProcessConnection On
ChildInit On
Fixup On
HeaderParser On
InputFilter On
Type On
Trans On
Cleanup On
Access On
Unset On
mod_perl.c:235: starting the parent perl for the base server
modperl_config_srv_argv_init =>
0 = Apache.exe
1 = -e;0
modperl_interp.c:232: server=localhost:8529
modperl_interp.c:107: 0x928af8
mod_perl.c:304: constructed interpreter=0x2643ec
mod_perl.c:355: Init vhost (null):8530: s=0x850670, base_s=0x82c4d8
MpSrv flags dump ((null)):
Clone Off
Parent On
Enable On
Autoload Off
MergeHandlers Off
Authz On
Authen On
PostConfig On
ChildExit On
OutputFilter On
Response On
Log On
PostReadRequest On
OpenLogs On
PreConnection On
MapToStorage On
ProcessConnection On
ChildInit On
Fixup On
HeaderParser On
InputFilter On
Type On
Trans On
Cleanup On
Access On
Unset On
mod_perl.c:239: starting the parent perl for vhost (null):8530
modperl_config_srv_argv_init =>
0 = Apache.exe
1 = -e;0
modperl_interp.c:232: server=(null):8530
modperl_interp.c:107: 0x93eef0
mod_perl.c:304: constructed interpreter=0x92c25c
mod_perl.c:394: created parent interpreter for VirtualHost (null):8530
mod_perl.c:355: Init vhost (null):8530: s=0x850670, base_s=0x82c4d8
mod_perl.c:375: server (null):8530 already initialized
modperl_handler.c:23: [2644/1936] new handler Apache::PerlSections
modperl_util.c:160: sv_setref_pv(Apache::CmdParms, 0x6fec8)
modperl_handler.c:75: dup handler Apache::PerlSections
modperl_handler.c:23: [2644/1936] new handler Apache::PerlSections
MpHandler flags dump (Apache::PerlSections):
Parsed Off
Method Off
Object Off
Anon Off
Autoload Off
Dynamic Off
Fake Off
modperl_handler.c:52: [2644/1936 (null):8530] handler Apache::PerlSections was n
ot compiled at startup, attempting to resolve using current pool 0x28aa50
modperl_mgv.c:264: package Apache::PerlSections not defined, attempting to load
modperl_mgv.c:268: loaded Apache::PerlSections package
modperl_mgv.c:296: [2644/1936] found `handler' in class `Apache::PerlSections' a
s a method
modperl_config.c:121: 0x851658
modperl_config.c:220: basev==0x84f878, addv==0x850ca8
mod_perl.c:355: Init vhost (null):8530: s=0x850670, base_s=0x82c4d8
mod_perl.c:375: server (null):8530 already initialized
modperl_config.c:137: 0x851e88
modperl_config.c:63: basev==0x84fd38, addv==0x8509e8
modperl_callback.c:156: no PerlOpenLogsHandler handlers configured () =====
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. Here it is:
=====
VMem::Free(void * 0x00acea1c) line 208 + 3 bytes
CPerlHost::Free(void * 0x00acea1c) line 59 + 34 bytes
PerlMemFree(IPerlMem * 0x00262434, void * 0x00acea1c) line 302
Perl_safesysfree(void * 0x00acea1c) line 143 + 26 bytes
Perl_sv_clear(interpreter * 0x012aff6c, sv * 0x013a1b3c) line 5198 + 13 bytes
Perl_sv_free(interpreter * 0x012aff6c, sv * 0x013a1b3c) line 5342 + 13 bytes
Perl_av_undef(interpreter * 0x012aff6c, av * 0x013a1ae8) line 498 + 32 bytes
Perl_sv_clear(interpreter * 0x012aff6c, sv * 0x013a1ae8) line 5161 + 13 bytes
Perl_sv_free(interpreter * 0x012aff6c, sv * 0x013a1ae8) line 5342 + 13 bytes
Perl_free_tmps(interpreter * 0x012aff6c) line 189 + 13 bytes
Perl_pp_nextstate(interpreter * 0x012aff6c) line 41 + 23 bytes
Perl_runops_debug(interpreter * 0x012aff6c) line 1434 + 13 bytes
S_call_body(interpreter * 0x012aff6c, op * 0x0006fbe0, int 1) line 2193 + 13 bytes
Perl_eval_sv(interpreter * 0x012aff6c, sv * 0x012c759c, long 2) line 2253 + 15 bytes
Perl_require_pv(interpreter * 0x012aff6c, const char * 0x0088cec8) line 2351 + 15 bytes
modperl_require_file(interpreter * 0x012aff6c, const char * 0x0088cec8, int 1) line 30 + 13 bytes
modperl_config_apply_PerlRequire(server_rec * 0x0088bfd0, modperl_config_srv_t * 0x0088c9f0, interpreter * 0x012aff6c, apr_pool_t * 0x0028a9e8) line 360 + 21 bytes
modperl_startup(server_rec * 0x0088bfd0, apr_pool_t * 0x0028a9e8) line 320 + 21 bytes
modperl_init_vhost(server_rec * 0x0088bfd0, apr_pool_t * 0x0028a9e8, server_rec * 0x0082c4d8) line 393 + 13 bytes
modperl_init(server_rec * 0x0082c4d8, apr_pool_t * 0x0028a9e8) line 457 + 17 bytes
modperl_hook_init(apr_pool_t * 0x0028a9e8, apr_pool_t * 0x00000000, apr_pool_t * 0x00000000, server_rec * 0x0082c4d8) line 582 + 13 bytes
modperl_run() line 596 + 21 bytes
modperl_cmd_load_module(cmd_parms_struct * 0x0006fec8, void * 0x00854bb8, const char * 0x00865200) line 506
invoke_cmd(const command_struct * 0x100251b8, cmd_parms_struct * 0x0006fec8, void * 0x00854bb8, const char * 0x00865200) line 713 + 18 bytes
ap_walk_config_sub(const ap_directive_t * 0x008651e0, cmd_parms_struct * 0x0006fec8, ap_conf_vector_t * 0x0082caa8) line 1082 + 24 bytes
ap_walk_config(ap_directive_t * 0x008651e0, cmd_parms_struct * 0x0006fec8, ap_conf_vector_t * 0x0082caa8) line 1121 + 17 bytes
ap_process_config_tree(server_rec * 0x0082c4d8, ap_directive_t * 0x00854e88, apr_pool_t * 0x0028a9e8, apr_pool_t * 0x0084c550) line 1594 + 20 bytes
main(int 7, const char * const * 0x00282908) line 582
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e814c7()
=====
- Steve
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
