Stas Bekman wrote:

Steve, Randy, please try the current cvs (just cvs up + make, no need to rebuild from scratch). I have finally been able to solve the segfault with the short config Steve presented. I hope that it solves the problem for you as well. If it does, please try again with the vhost patch that was failing before.

I moved quite a few things in mod_perl.c, but the only real change was adding:

  +#ifdef USE_ITHREADS
  +    /* after other parent perls were started in vhosts, make sure that
  +     * the context is set to the base_perl */
  +    PERL_SET_CONTEXT(base_perl);
  +#endif

after setting up vhosts, without which, PerlLoadModule in the main server was segfaulting for me.

The good news: The short configuration file that I posted now works for me too (both the -t test and actually starting up the server).


The bad news: The vhost tests still fail as before :(

Here's a backtrace of the crash:

=====
VMem::Free(void * 0x0123d68c) line 208 + 3 bytes
CPerlHost::Free(void * 0x0123d68c) line 59 + 34 bytes
PerlMemFree(IPerlMem * 0x012916e4, void * 0x0123d68c) line 302
Perl_safesysfree(void * 0x0123d68c) line 143 + 26 bytes
Perl_sv_clear(interpreter * 0x002644c4, sv * 0x009244c0) line 5198 + 13 bytes
Perl_sv_replace(interpreter * 0x002644c4, sv * 0x009244c0, sv * 0x012845d4) line 5046 + 13 bytes
Perl_leave_scope(interpreter * 0x002644c4, long 290) line 699 + 17 bytes
Perl_newATTRSUB(interpreter * 0x002644c4, long 290, op * 0x012b6558, op * 0x00000000, op * 0x00000000, op * 0x012b6578) line 4402 + 24 bytes
Perl_utilize(interpreter * 0x002644c4, int 1, long 290, op * 0x00000000, op * 0x012b6714, op * 0x00000000) line 2983 + 173 bytes
Perl_yyparse(interpreter * 0x002644c4) line 414 + 44 bytes
S_doeval(interpreter * 0x002644c4, int 0, op * * 0x00000000, cv * 0x00000000, unsigned long 6796) line 2802 + 9 bytes
Perl_pp_require(interpreter * 0x002644c4) line 3298 + 102 bytes
modperl_pp_require(interpreter * 0x002644c4) line 54 + 10 bytes
Perl_runops_debug(interpreter * 0x002644c4) line 1434 + 13 bytes
S_call_body(interpreter * 0x002644c4, op * 0x0006f8b0, int 1) line 2193 + 13 bytes
Perl_eval_sv(interpreter * 0x002644c4, sv * 0x0128e3e0, long 2) line 2253 + 15 bytes
modperl_require_module(interpreter * 0x002644c4, const char * 0x008ae700, int 0) line 13 + 15 bytes
modperl_cmd_modules(cmd_parms_struct * 0x0006f9fc, void * 0x00854768, const char * 0x008ae700) line 122 + 15 bytes
invoke_cmd(const command_struct * 0x10025038, cmd_parms_struct * 0x0006f9fc, void * 0x00854768, const char * 0x008ae590) line 800 + 18 bytes
ap_walk_config_sub(const ap_directive_t * 0x008ae560, cmd_parms_struct * 0x0006f9fc, ap_conf_vector_t * 0x0082caa8) line 1082 + 24 bytes
ap_walk_config(ap_directive_t * 0x008ae560, cmd_parms_struct * 0x0006f9fc, ap_conf_vector_t * 0x0082caa8) line 1121 + 17 bytes
modperl_config_insert(interpreter * 0x012ba014, server_rec * 0x0082c4d8, apr_pool_t * 0x0028acb0, apr_pool_t * 0x00000000, int 150, char * 0x00000000, ap_conf_vector_t * 0x0082caa8, sv * 0x013a22d0) line 446 + 18 bytes
modperl_config_insert_server(interpreter * 0x012ba014, server_rec * 0x0082c4d8, sv * 0x013a22d0) line 464 + 36 bytes
XS_Apache__Server_add_config(interpreter * 0x012ba014, cv * 0x01304364) line 99 + 17 bytes
Perl_pp_entersub(interpreter * 0x012ba014) line 2817 + 16 bytes
Perl_runops_debug(interpreter * 0x012ba014) line 1434 + 13 bytes
S_call_body(interpreter * 0x012ba014, op * 0x0006fbe0, int 1) line 2193 + 13 bytes
Perl_eval_sv(interpreter * 0x012ba014, sv * 0x012c7af8, long 2) line 2253 + 15 bytes
Perl_require_pv(interpreter * 0x012ba014, const char * 0x0088ca80) line 2351 + 15 bytes
modperl_require_file(interpreter * 0x012ba014, const char * 0x0088ca80, int 1) line 30 + 13 bytes
modperl_config_apply_PerlRequire(server_rec * 0x0088bb88, modperl_config_srv_t * 0x0088c5a8, interpreter * 0x012ba014, apr_pool_t * 0x0028acb0) line 360 + 21 bytes
modperl_startup(server_rec * 0x0088bb88, apr_pool_t * 0x0028acb0) line 320 + 21 bytes
modperl_init_vhost(server_rec * 0x0088bb88, apr_pool_t * 0x0028acb0, server_rec * 0x0082c4d8) line 393 + 13 bytes
modperl_init(server_rec * 0x0082c4d8, apr_pool_t * 0x0028acb0) line 457 + 17 bytes
modperl_hook_init(apr_pool_t * 0x0028acb0, apr_pool_t * 0x00000000, apr_pool_t * 0x00000000, server_rec * 0x0082c4d8) line 589 + 13 bytes
modperl_run() line 603 + 21 bytes
modperl_cmd_load_module(cmd_parms_struct * 0x0006fec8, void * 0x00854768, const char * 0x00864db0) line 503
invoke_cmd(const command_struct * 0x100251b8, cmd_parms_struct * 0x0006fec8, void * 0x00854768, const char * 0x00864db0) line 713 + 18 bytes
ap_walk_config_sub(const ap_directive_t * 0x00864d90, cmd_parms_struct * 0x0006fec8, ap_conf_vector_t * 0x0082caa8) line 1082 + 24 bytes
ap_walk_config(ap_directive_t * 0x00864d90, cmd_parms_struct * 0x0006fec8, ap_conf_vector_t * 0x0082caa8) line 1121 + 17 bytes
ap_process_config_tree(server_rec * 0x0082c4d8, ap_directive_t * 0x00854a38, apr_pool_t * 0x0028acb0, apr_pool_t * 0x0084c550) line 1594 + 20 bytes
main(int 8, const char * const * 0x00282918) line 582
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e814c7()
=====


and here's the end of the MOD_PERL_TRACE=cdghimos output:

=====
[...]
mod_perl.c:239: starting the parent perl for vhost localhost:8530

modperl_config_srv_argv_init =>

0 = Apache.exe

1 = -IC:/Temp/modperl-2.0/t

2 = -e;0

modperl_interp.c:232: server=localhost:8530

modperl_interp.c:107: 0x12c8908

mod_perl.c:304: constructed interpreter=0x12b0c34

modperl_config.c:361: loaded Perl file: C:/Temp/modperl-2.0/t/conf/modperl_inc.pl for server localhost:8530

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

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

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

Free to wrong pool 1291f38 not 262880.
=====

I'll try to cut down the conf file to the minimum that still crashes, and post a full trace then.

- Steve


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



Reply via email to