[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Segfaults with File::LibMagic
From:       Rolf Schaufelberger <rs () plusw ! de>
Date:       2016-10-02 11:50:42
Message-ID: 996954AC-E698-431A-83F7-04B3CF073B7E () plusw ! de
[Download RAW message or body]

Hello, 

I've an Ubuntu 16.04 LTS , build my own perl5.20 with mod_perl-2.0.9

When I configure my app i get "Status OK " when running  'apache2ctl  configtest' , \
but when I call  'apache2ctl restart' it segfaults, sometimes just with writing  \
"segmentation fault' :

sudo apache2ctl_BE restart
httpd not running, trying to start
Segmentation fault (core dumped)


sometimes it dumps more info :

plus-w@j295020:~$ sudo apache2ctl_BE restart
httpd not running, trying to start
*** Error in `/usr/sbin/apache2': free(): invalid pointer: 0x000055a8c9475be8 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7f24225f8725]
/lib/x86_64-linux-gnu/libc.so.6(+0x7ff4a)[0x7f2422600f4a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f2422604abc]
/usr/lib/x86_64-linux-gnu/libmagic.so.1(+0x7a8c)[0x7f24164f9a8c]
/serv/cpan/lib/perl5/x86_64-linux-thread-multi/auto/File/LibMagic/LibMagic.so(+0x2d71)[0x7f2416714d71]
                
/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_pp_entersub+0x49b)[0x7f241e31533b]
                
/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_runops_standard+0x16)[0x7f241e30dd66]
                
/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_call_sv+0x556)[0x7f241e297ad6]
                
/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(+0xd4d60)[0x7f241e31ed60]
                
/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_clear+0x790)[0x7f241e31f800]
                
/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_free2+0x5a)[0x7f241e31fbba]
                
/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(+0xcc89b)[0x7f241e31689b]
                
/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_clean_objs+0x26)[0x7f241e31fff6]
                
/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(perl_destruct+0x19a)[0x7f241e29a14a]
                
/usr/lib/apache2/modules/mod_perl.so(modperl_perl_destruct+0x5f)[0x7f241e62749f]
/usr/lib/apache2/modules/mod_perl.so(modperl_interp_destroy+0x36)[0x7f241e616406]
/usr/lib/apache2/modules/mod_perl.so(modperl_tipool_destroy+0x35)[0x7f241e616e95]
/usr/lib/apache2/modules/mod_perl.so(modperl_interp_pool_destroy+0x12)[0x7f241e616452]
                
/usr/lib/x86_64-linux-gnu/libapr-1.so.0(apr_pool_destroy+0x6e)[0x7f2422b81e3e]
/usr/lib/x86_64-linux-gnu/libapr-1.so.0(apr_pool_clear+0x55)[0x7f2422b820e5]
/usr/sbin/apache2(main+0x814)[0x55a8b4c52fc4]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f24225a1830]
/usr/sbin/apache2(_start+0x29)[0x55a8b4c53259]
======= Memory map: ========

I assume it has to do with File::LibMagic,  which I don't t use directly in my app, \
however I user Courriel , and this uses File::LibMagic.  when I comment the  "use \
Courriel::Builder "   line in my code apache starts and everything (besides sending \
mail ) seems to work fine. 

Any ideas what goes wrong and how I can fix that ? 

Rolf  Schaufelberger


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html \
charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: \
space; -webkit-line-break: after-white-space;" class="">Hello,&nbsp;<div class=""><br \
class=""></div><div class="">I've an Ubuntu 16.04 LTS , build my own perl5.20 with \
mod_perl-2.0.9</div><div class=""><br class=""></div><div class="">When I configure \
my app i get "Status OK " when running &nbsp;'apache2ctl &nbsp;configtest' , but when \
I call &nbsp;'apache2ctl restart' it segfaults, sometimes just with \
writing&nbsp;</div><div class="">"segmentation fault' :</div><div class=""><br \
class=""></div><div class=""> <div style="margin: 0px; font-size: 11px; line-height: \
normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: \
no-common-ligatures" class="">sudo apache2ctl_BE restart</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class="">httpd not running, trying to start</div><div style="margin: 0px; font-size: \
11px; line-height: normal; font-family: Menlo;" class=""><span \
style="font-variant-ligatures: no-common-ligatures" class="">Segmentation fault (core \
dumped)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; \
font-family: Menlo;" class=""><span style="font-variant-ligatures: \
no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; \
font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span \
style="font-variant-ligatures: no-common-ligatures" class=""><br \
class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; \
font-family: Menlo;" class=""><span style="font-variant-ligatures: \
no-common-ligatures" class="">sometimes it dumps more info :</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br \
class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; \
font-family: Menlo;" class="">plus-w@j295020:~$ sudo apache2ctl_BE restart</div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class="">httpd not running, trying to start</div><div style="margin: 0px; font-size: \
11px; line-height: normal; font-family: Menlo;" class=""><span \
style="font-variant-ligatures: no-common-ligatures" class="">*** Error in \
`/usr/sbin/apache2': free(): invalid pointer: 0x000055a8c9475be8 ***</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" class="">======= \
Backtrace: =========</span></div><div style="margin: 0px; font-size: 11px; \
line-height: normal; font-family: Menlo;" class=""><span \
style="font-variant-ligatures: no-common-ligatures" \
class="">/lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7f24225f8725]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/lib/x86_64-linux-gnu/libc.so.6(+0x7ff4a)[0x7f2422600f4a]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f2422604abc]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/usr/lib/x86_64-linux-gnu/libmagic.so.1(+0x7a8c)[0x7f24164f9a8c]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/serv/cpan/lib/perl5/x86_64-linux-thread-multi/auto/File/LibMagic/LibMagic.so(+0x2d71)[0x7f2416714d71]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_pp_entersub+0x49b)[0x7f241e31533b]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_runops_standard+0x16)[0x7f241e30dd66]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_call_sv+0x556)[0x7f241e297ad6]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(+0xd4d60)[0x7f241e31ed60]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_clear+0x790)[0x7f241e31f800]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_free2+0x5a)[0x7f241e31fbba]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(+0xcc89b)[0x7f241e31689b]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_clean_objs+0x26)[0x7f241e31fff6]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/opt/perl520/lib/5.20.3/x86_64-linux-thread-multi/CORE/libperl.so(perl_destruct+0x19a)[0x7f241e29a14a]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/usr/lib/apache2/modules/mod_perl.so(modperl_perl_destruct+0x5f)[0x7f241e62749f]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/usr/lib/apache2/modules/mod_perl.so(modperl_interp_destroy+0x36)[0x7f241e616406]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/usr/lib/apache2/modules/mod_perl.so(modperl_tipool_destroy+0x35)[0x7f241e616e95]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/usr/lib/apache2/modules/mod_perl.so(modperl_interp_pool_destroy+0x12)[0x7f241e616452]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/usr/lib/x86_64-linux-gnu/libapr-1.so.0(apr_pool_destroy+0x6e)[0x7f2422b81e3e]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/usr/lib/x86_64-linux-gnu/libapr-1.so.0(apr_pool_clear+0x55)[0x7f2422b820e5]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/usr/sbin/apache2(main+0x814)[0x55a8b4c52fc4]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f24225a1830]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" \
class="">/usr/sbin/apache2(_start+0x29)[0x55a8b4c53259]</span></div><div \
style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" \
class=""><span style="font-variant-ligatures: no-common-ligatures" class="">======= \
Memory map: ========</span></div></div><div class=""><span \
style="font-variant-ligatures: no-common-ligatures" class=""><br \
class=""></span></div><div class="">I assume it has to do with File::LibMagic, \
&nbsp;which I don't t use directly in my app, however I user Courriel , and this uses \
File::LibMagic. &nbsp;when I comment the &nbsp;"use Courriel::Builder " &nbsp; line \
in my code apache starts and everything (besides sending mail ) seems to work \
fine.&nbsp;</div><div class=""><br class=""></div><div class="">Any ideas what goes \
wrong and how I can fix that ?&nbsp;</div><div class=""><br class=""></div><div \
class="">Rolf &nbsp;Schaufelberger</div><div class=""><br class=""></div><div \
class=""><br class=""></div><div class=""><br class=""></div><div class=""><span \
style="font-variant-ligatures: no-common-ligatures" class=""><br \
class=""></span></div><div class=""><span style="font-variant-ligatures: \
no-common-ligatures" class=""><br class=""></span></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic