You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by E R <pc...@gmail.com> on 2011/02/09 23:40:36 UTC

modperl_shutdown question

Hi all,

In my large modperl app I am getting a segfault with this back trace:

gdb) bt
#0  0x00000000 in ?? ()
#1  0xb5a5aba6 in std::ios_base::Init::~Init() () from /usr/lib/libstdc++.so.6
#2  0xb753aa68 in __cxa_finalize () from /lib/libc.so.6
#3  0xb4b41854 in ?? () from /usr/lib/libHalf.so.6
#4  0xb4b41da0 in _fini () from /usr/lib/libHalf.so.6
#5  0xb7793256 in ?? () from /lib/ld-linux.so.2
#6  0xb7793d17 in ?? () from /lib/ld-linux.so.2
#7  0xb7668ca4 in ?? () from /lib/libdl.so.2
#8  0xb778e306 in ?? () from /lib/ld-linux.so.2
#9  0xb766909c in ?? () from /lib/libdl.so.2
#10 0xb7668cda in dlclose () from /lib/libdl.so.2
#11 0xb73e57ed in modperl_sys_dlclose ()
   from /home/erantapaa/rn/apps/2011-02-02/apache/modules/mod_perl.so
#12 0xb73dbd10 in modperl_xs_dl_handles_close ()
   from /home/erantapaa/rn/apps/2011-02-02/apache/modules/mod_perl.so
#13 0xb73d6327 in modperl_shutdown ()
   from /home/erantapaa/rn/apps/2011-02-02/apache/modules/mod_perl.so
#14 0xb76d8a6e in run_cleanups (pool=0xce98698) at memory/unix/apr_pools.c:2308
#15 apr_pool_destroy (pool=0xce98698) at memory/unix/apr_pools.c:779
#16 0xb76d8d20 in apr_pool_clear (pool=0x934e0a8) at memory/unix/apr_pools.c:734
#17 0x0806771d in main (argc=4, argv=0xbfaaa624) at main.c:689

This is happening right after my perl init code completes but before
any children have been spawned (as far as I can tell.)

Questions:

1. Is is normal for modperl_shutdown to be called this early? The code
at main.c line 689 in httpd looks like:

    for (;;) {
        apr_hook_deregister_all();
        apr_pool_clear(pconf);   // <--- segfault is happening in here

        for (mod = ap_prelinked_modules; *mod != NULL; mod++) {
            ap_register_hooks(*mod, pconf);
        }

2. It is possible to determine which dl handle is being closed in
modperl_sys_dlclose (i.e. a path name to the dynamic library)?

3. Is there a way to enable the MP_TRACE facility with mod perl's
Makefile.PL command? To build mod perl I am using:

  perl Makefile.PL MP_APXS=...
  make
  make install

Versions:
  httpd: 2.2.17
  mod_perl: 2.0.4
  perl: 5.12.2

Thanks,
ER

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: modperl_shutdown question

Posted by E R <pc...@gmail.com>.
On Wed, Feb 9, 2011 at 4:43 PM, Fred Moyer <fr...@redhotpenguin.com> wrote:
>> Versions:
>>  httpd: 2.2.17
>>  mod_perl: 2.0.4
>>  perl: 5.12.2
>
> Can you try 2.0.5 which was released a couple days ago?

fyi - I've tracked this down to a problem in ImageMagick.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: modperl_shutdown question

Posted by Fred Moyer <fr...@redhotpenguin.com>.
> Versions:
>  httpd: 2.2.17
>  mod_perl: 2.0.4
>  perl: 5.12.2

Can you try 2.0.5 which was released a couple days ago?

http://perl.apache.org/download/index.html



On Wed, Feb 9, 2011 at 2:40 PM, E R <pc...@gmail.com> wrote:
> Hi all,
>
> In my large modperl app I am getting a segfault with this back trace:
>
> gdb) bt
> #0  0x00000000 in ?? ()
> #1  0xb5a5aba6 in std::ios_base::Init::~Init() () from /usr/lib/libstdc++.so.6
> #2  0xb753aa68 in __cxa_finalize () from /lib/libc.so.6
> #3  0xb4b41854 in ?? () from /usr/lib/libHalf.so.6
> #4  0xb4b41da0 in _fini () from /usr/lib/libHalf.so.6
> #5  0xb7793256 in ?? () from /lib/ld-linux.so.2
> #6  0xb7793d17 in ?? () from /lib/ld-linux.so.2
> #7  0xb7668ca4 in ?? () from /lib/libdl.so.2
> #8  0xb778e306 in ?? () from /lib/ld-linux.so.2
> #9  0xb766909c in ?? () from /lib/libdl.so.2
> #10 0xb7668cda in dlclose () from /lib/libdl.so.2
> #11 0xb73e57ed in modperl_sys_dlclose ()
>   from /home/erantapaa/rn/apps/2011-02-02/apache/modules/mod_perl.so
> #12 0xb73dbd10 in modperl_xs_dl_handles_close ()
>   from /home/erantapaa/rn/apps/2011-02-02/apache/modules/mod_perl.so
> #13 0xb73d6327 in modperl_shutdown ()
>   from /home/erantapaa/rn/apps/2011-02-02/apache/modules/mod_perl.so
> #14 0xb76d8a6e in run_cleanups (pool=0xce98698) at memory/unix/apr_pools.c:2308
> #15 apr_pool_destroy (pool=0xce98698) at memory/unix/apr_pools.c:779
> #16 0xb76d8d20 in apr_pool_clear (pool=0x934e0a8) at memory/unix/apr_pools.c:734
> #17 0x0806771d in main (argc=4, argv=0xbfaaa624) at main.c:689
>
> This is happening right after my perl init code completes but before
> any children have been spawned (as far as I can tell.)
>
> Questions:
>
> 1. Is is normal for modperl_shutdown to be called this early? The code
> at main.c line 689 in httpd looks like:
>
>    for (;;) {
>        apr_hook_deregister_all();
>        apr_pool_clear(pconf);   // <--- segfault is happening in here
>
>        for (mod = ap_prelinked_modules; *mod != NULL; mod++) {
>            ap_register_hooks(*mod, pconf);
>        }
>
> 2. It is possible to determine which dl handle is being closed in
> modperl_sys_dlclose (i.e. a path name to the dynamic library)?
>
> 3. Is there a way to enable the MP_TRACE facility with mod perl's
> Makefile.PL command? To build mod perl I am using:
>
>  perl Makefile.PL MP_APXS=...
>  make
>  make install
>
> Versions:
>  httpd: 2.2.17
>  mod_perl: 2.0.4
>  perl: 5.12.2
>
> Thanks,
> ER
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org