Steve Hay wrote:

>>>The Bad News:  The vhost test that originally didn't work way back at 
>>>the start of this thread (excuse the pun) still doesn't work.
>>>   
>>>
>>>      
>>>
>>can't you pin-point which part of 
>>that patch causes the problem? I assume the problem is the same, right?
>>
>>    
>>
>It is indeed the usual problem.  I'll try produce another shortened 
>.conf file which reproduces the bug that's still lurking.  Oh joy.
>
OK, here's another short conf file which does now break again:

=====
LoadModule   perl_module C:\Temp\modperl-2.0\src\modules\perl\mod_perl.so
ServerName   localhost:8529
Listen       8529
ServerRoot   C:/Temp/modperl-2.0/t
DocumentRoot C:/Temp/modperl-2.0/t/htdocs
LogLevel     debug
Listen       8530
<VirtualHost _default_:8530>
  PerlOptions  +Parent
  PerlSwitches -IC:/Temp/modperl-2.0/Apache-Test/lib
  PerlSwitches -IC:/Temp/modperl-2.0/blib/lib
  PerlSwitches -IC:/Temp/modperl-2.0/blib/arch
  PerlSwitches -IC:/Temp/modperl-2.0/t/response
  PerlModule   Apache::ServerUtil
  <Perl>
    my $s = Apache->server;
    $s->add_config(['PerlModule TestVhost::basic']);
  </Perl>
</VirtualHost>
=====

The add_config() call there is taken from the t/htdocs/vhost/startup.pl, 
part of the vhost test patch that still breaks.  Note that the above 
conf breaks (in the usual way) with seemingly *any* module in place of 
TestVhost::basic -- I tried Apache, File::Spec, CGI, DBI and a few 
others and they all broke.

I'm testing with the latest CVS, plus the first of Stas' recent patches 
(the one here: 
http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=107465681330157&w=2).

With the above conf file, the following "-t" command-line fails with the 
good ol' "free to wrong pool" error:

C:\apache2\bin\Apache.exe -t -d C:/Temp/modperl-2.0/t -f 
C:/Temp/modperl-2.0/t/conf/httpd.conf.short3 -DAPACHE2 -DPERL_USEITHREADS

It can be "fixed" by just commenting-out the add_config() call in the 
<Perl> section.  (Indeed, without that add_config() call the server can 
be started up for real without the "-t" option.)

Here's a stacktrace of the failure:

=====
VMem::Free(void * 0x00a3a01c) line 208 + 3 bytes
CPerlHost::Free(void * 0x00a3a01c) line 59 + 34 bytes
PerlMemFree(IPerlMem * 0x00262434, void * 0x00a3a01c) line 302
Perl_safesysfree(void * 0x00a3a01c) line 140 + 26 bytes
Perl_sv_clear(interpreter * 0x002643fc, sv * 0x002653fc) line 5203 + 13 
bytes
Perl_sv_free(interpreter * 0x002643fc, sv * 0x002653fc) line 5348 + 13 bytes
Perl_free_tmps(interpreter * 0x002643fc) line 189 + 13 bytes
perl_destruct(interpreter * 0x002643fc) line 456 + 23 bytes
modperl_perl_destruct(interpreter * 0x002643fc) line 155 + 9 bytes
modperl_interp_destroy(modperl_interp_t * 0x009272d0) line 143 + 12 bytes
modperl_interp_pool_destroy(void * 0x008515f8) line 199 + 12 bytes
run_cleanups(cleanup_t * * 0x00852608) line 1994 + 13 bytes
apr_pool_destroy(apr_pool_t * 0x008525f8) line 763 + 12 bytes
apr_pool_destroy(apr_pool_t * 0x0028aa98) line 760 + 12 bytes
apr_pool_destroy(apr_pool_t * 0x00288a60) line 760 + 12 bytes
destroy_and_exit_process(process_rec * 0x00288af0, int 0) line 252
main(int 8, const char * const * 0x00282918) line 587 + 11 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e814c7()
=====

Here's the trace output with MOD_PERL_TRACE set to "cdghimos":

=====
C:\Temp\modperl-2.0>C:\apache2\bin\Apache.exe -t -d 
C:/Temp/modperl-2.0/t -f C:/
Temp/modperl-2.0/t/conf/httpd.conf.short3 -DAPACHE2 -DPERL_USEITHREADS
mod_perl trace flags dump:
 a Off (Apache API interaction)
 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:455: 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=0x28ab20, s=0x82c4d8, virtual=0

modperl_options.c:45: opts: 16
modperl_config.c:137: new dcfg: 0x84fd68

modperl_options.c:45: opts: 16
modperl_config.c:137: new dcfg: 0x850cb0

modperl_options.c:45: opts: 33554432
modperl_config.c:121: new scfg: 0x850f70

modperl_config.c:187: p=0x28ab20, s=0x850938, virtual=1

modperl_cmd.c:257: arg = +Parent

modperl_options.c:54: option 'Parent', type: server
modperl_options.c:55: opts_add      0
modperl_options.c:56: opts_remove   0
modperl_options.c:57: opts_override 0
modperl_options.c:58: opts_seen     0
modperl_options.c:59: unset         33554432

modperl_cmd.c:100: arg = -IC:/Temp/modperl-2.0/Apache-Test/lib

modperl_cmd.c:100: arg = -IC:/Temp/modperl-2.0/blib/lib

modperl_cmd.c:100: arg = -IC:/Temp/modperl-2.0/blib/arch

modperl_cmd.c:100: arg = -IC:/Temp/modperl-2.0/t/response

modperl_cmd.c:127: push PerlModule Apache::ServerUtil

MpSrv flags dump (localhost):
 Access On
 Authen On
 Authz On
 Autoload Off
 ChildExit On
 ChildInit On
 Cleanup On
 Clone Off
 Enable On
 Fixup On
 HeaderParser On
 InputFilter On
 Log On
 MapToStorage On
 MergeHandlers Off
 OpenLogs On
 OutputFilter On
 Parent Off
 PostConfig On
 PostReadRequest On
 PreConnection On
 ProcessConnection On
 Response On
 Trans On
 Type On
 Unset On
mod_perl.c:168: starting the parent perl for the base server

modperl_config_srv_argv_init =>
   0 = Apache.exe
   1 = -e;0
modperl_interp.c:247: server=localhost:8529

modperl_interp.c:117: 0x925ce8

mod_perl.c:237: constructed interpreter=0x26441c

mod_perl.c:288: Init vhost (null):8530: s=0x850938, base_s=0x82c4d8

MpSrv flags dump ((null)):
 Access On
 Authen On
 Authz On
 Autoload Off
 ChildExit On
 ChildInit On
 Cleanup On
 Clone Off
 Enable On
 Fixup On
 HeaderParser On
 InputFilter On
 Log On
 MapToStorage On
 MergeHandlers Off
 OpenLogs On
 OutputFilter On
 Parent On
 PostConfig On
 PostReadRequest On
 PreConnection On
 ProcessConnection On
 Response On
 Trans On
 Type On
 Unset On
mod_perl.c:172: starting the parent perl for vhost (null):8530

modperl_config_srv_argv_init =>
   0 = Apache.exe
   1 = -IC:/Temp/modperl-2.0/Apache-Test/lib
   2 = -IC:/Temp/modperl-2.0/blib/lib
   3 = -IC:/Temp/modperl-2.0/blib/arch
   4 = -IC:/Temp/modperl-2.0/t/response
   5 = -e;0
modperl_interp.c:247: server=(null):8530

modperl_interp.c:117: 0x9b68f8

mod_perl.c:237: constructed interpreter=0x9a4154

modperl_config.c:341: loaded Perl module Apache::ServerUtil for server 
(null):85
30

mod_perl.c:327: created parent interpreter for VirtualHost (null):8530

mod_perl.c:288: Init vhost (null):8530: s=0x850938, base_s=0x82c4d8

mod_perl.c:308: server (null):8530 already initialized

modperl_handler.c:23: [940/1936] new handler Apache::PerlSections

mod_perl.c:288: Init vhost localhost:8529: s=0x82c4d8, base_s=0x82c4d8

mod_perl.c:292: base server is not vhost, skipping localhost:8529

modperl_cmd.c:120: load PerlModule TestVhost::basic

modperl_util.c:160: sv_setref_pv(Apache::CmdParms, 0x6fec8)

modperl_handler.c:75: dup handler Apache::PerlSections

modperl_handler.c:23: [940/1936] new handler Apache::PerlSections

MpHandler flags dump (Apache::PerlSections):
 Anon Off
 Autoload Off
 Dynamic Off
 Fake Off
 Method Off
 Object Off
 Parsed Off
modperl_handler.c:52: [940/1936 (null):8530] handler 
Apache::PerlSections was no
t compiled at startup, attempting to resolve using current pool 0x28ab20

modperl_mgv.c:297: package Apache::PerlSections not in %INC, attempting 
to load
'Apache/PerlSections.pm'

modperl_mgv.c:302: loaded Apache::PerlSections package

modperl_mgv.c:341: [940/1936] found `handler' in class 
`Apache::PerlSections' as
 a method

modperl_options.c:45: opts: 33554432
modperl_config.c:121: new scfg: 0x851ca0

modperl_config.c:220: basev==0x84f8a8, addv==0x850f70

modperl_options.c:45: opts: 16
mod_perl.c:288: Init vhost (null):8530: s=0x850938, base_s=0x82c4d8

mod_perl.c:308: server (null):8530 already initialized

modperl_options.c:45: opts: 16
modperl_config.c:137: new dcfg: 0x8524d0

modperl_config.c:63: basev==0x84fd68, addv==0x850cb0

modperl_options.c:45: opts: 16
Syntax OK
modperl_interp.c:196: parent == 0x9b68f8

modperl_interp.c:134: interp == 0x9b68f8, perl == 0x9a4154, 
PERL_GET_CONTEXT ==
0x9a4154

modperl_util.c:352: Apache::ServerUtil dl handle == 0x3a0000

modperl_util.c:352: Apache::CmdParms dl handle == 0x3c0000

modperl_util.c:352: Apache::Directive dl handle == 0x3d0000

modperl_util.c:352: APR::Table dl handle == 0x3e0000

modperl_util.c:352: Apache::Server dl handle == 0x3f0000

modperl_util.c:352: Apache::Const dl handle == 0xc20000

modperl_perl.c:151: perl == 0x9a4154, PERL_GET_CONTEXT == 0x9a4154

modperl_perl.c:169: after: PERL_GET_CONTEXT== 0x9a4154

modperl_util.c:376: close 0x3a0000

modperl_util.c:376: close 0x3c0000

modperl_util.c:376: close 0x3d0000

modperl_util.c:376: close 0x3e0000

modperl_util.c:376: close 0x3f0000

modperl_util.c:376: close 0xc20000

modperl_interp.c:196: parent == 0x925ce8

modperl_interp.c:134: interp == 0x925ce8, perl == 0x26441c, 
PERL_GET_CONTEXT ==
0x26441c

modperl_perl.c:151: perl == 0x26441c, PERL_GET_CONTEXT == 0x26441c

Free to wrong pool 262770 not 953be8.
=====

- Steve



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are 
confidential and intended for the addressee(s) only.  If you have received this 
message in error or there are any problems, please notify the sender immediately.  The 
unauthorized use, disclosure, copying or alteration of this message is strictly 
forbidden.  Note that any views or opinions presented in this email are solely those 
of the author and do not necessarily represent those of Radan Computational Ltd.  The 
recipient(s) of this message should check it and any attached files for viruses: Radan 
Computational will accept no liability for any damage caused by any virus transmitted 
by this email.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to