Mailing List Archive

Segfaults with File::LibMagic
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