SIGSEGV in NewXMLTree ()
Posted: 2007-11-03T13:59:11-07:00
We're using ImageMagick-6.2.4. After we upgraded to this version, we start receiving occasional segmentation faults in our background perl scripts. Turning on perl debugging reveals the following stacktrace:
Core was generated by `perl5.8.8-dbg'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/lib/libutil.so.3...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/List/Util/Util.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Time/HiRes/HiRes.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Sys/Hostname/Hostname.so...done.
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/DBI/DBI.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/IO/IO.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Fcntl/Fcntl.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Socket/Socket.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/MIME/Base64/Base64.so...done.
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/DBD/mysql/mysql.so...done.
Reading symbols from /opt/mysql/lib/mysql/libmysqlclient.so.14...done.
Reading symbols from /usr/lib/libz.so.2...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Storable/Storable.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/POSIX/POSIX.so...done.
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Image/Magick/Magick.so...done.
Reading symbols from /usr/local/lib/libMagick.so.10...done.
Reading symbols from /usr/local/lib/libWand.so.10...done.
Reading symbols from /usr/local/lib/libtiff.so.4...done.
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Reading symbols from /usr/local/lib/libpng.so.5...done.
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Lingua/Stem/Snowball/Snowball.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Encode/Encode.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Digest/MD5/MD5.so...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0 0x48503ac2 in NewXMLTree () from /usr/local/lib/libMagick.so.10
(gdb) bt
#0 0x48503ac2 in NewXMLTree () from /usr/local/lib/libMagick.so.10
#1 0x484b1b77 in FormatImageProperty () from /usr/local/lib/libMagick.so.10
#2 0x484b3238 in GetImageProperty () from /usr/local/lib/libMagick.so.10
#3 0x484b5ce4 in SetImageProfile () from /usr/local/lib/libMagick.so.10
#4 0x4858e891 in UnregisterYUVImage () from /usr/local/lib/libMagick.so.10
#5 0x4877f88a in read_markers () from /usr/local/lib/libjpeg.so.9
#6 0x4877d79b in consume_markers () from /usr/local/lib/libjpeg.so.9
#7 0x4877be37 in jpeg_consume_input () from /usr/local/lib/libjpeg.so.9
#8 0x4877bd53 in jpeg_read_header () from /usr/local/lib/libjpeg.so.9
#9 0x4858ed0e in UnregisterYUVImage () from /usr/local/lib/libMagick.so.10
#10 0x48441ec7 in ReadImage () from /usr/local/lib/libMagick.so.10
#11 0x483df561 in XS_Image__Magick_Read () from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Image/Magick/Magick.so
#12 0x480e2176 in Perl_pp_entersub () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#13 0x480db259 in Perl_runops_standard () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#14 0x48089062 in S_run_body () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#15 0x48088d27 in perl_run () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#16 0x8049094 in main (argc=3, argv=0xbfbff6c0, env=0xbfbff6d0) at perlmain.c:99
(gdb)
This situation is not reproducible with particular images, it just occurs from time to time (frequency is unpredictable).
Core was generated by `perl5.8.8-dbg'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/lib/libutil.so.3...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/List/Util/Util.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Time/HiRes/HiRes.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Sys/Hostname/Hostname.so...done.
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/DBI/DBI.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/IO/IO.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Fcntl/Fcntl.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Socket/Socket.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/MIME/Base64/Base64.so...done.
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/DBD/mysql/mysql.so...done.
Reading symbols from /opt/mysql/lib/mysql/libmysqlclient.so.14...done.
Reading symbols from /usr/lib/libz.so.2...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Storable/Storable.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/POSIX/POSIX.so...done.
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Image/Magick/Magick.so...done.
Reading symbols from /usr/local/lib/libMagick.so.10...done.
Reading symbols from /usr/local/lib/libWand.so.10...done.
Reading symbols from /usr/local/lib/libtiff.so.4...done.
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Reading symbols from /usr/local/lib/libpng.so.5...done.
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Lingua/Stem/Snowball/Snowball.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Encode/Encode.so...done.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Digest/MD5/MD5.so...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0 0x48503ac2 in NewXMLTree () from /usr/local/lib/libMagick.so.10
(gdb) bt
#0 0x48503ac2 in NewXMLTree () from /usr/local/lib/libMagick.so.10
#1 0x484b1b77 in FormatImageProperty () from /usr/local/lib/libMagick.so.10
#2 0x484b3238 in GetImageProperty () from /usr/local/lib/libMagick.so.10
#3 0x484b5ce4 in SetImageProfile () from /usr/local/lib/libMagick.so.10
#4 0x4858e891 in UnregisterYUVImage () from /usr/local/lib/libMagick.so.10
#5 0x4877f88a in read_markers () from /usr/local/lib/libjpeg.so.9
#6 0x4877d79b in consume_markers () from /usr/local/lib/libjpeg.so.9
#7 0x4877be37 in jpeg_consume_input () from /usr/local/lib/libjpeg.so.9
#8 0x4877bd53 in jpeg_read_header () from /usr/local/lib/libjpeg.so.9
#9 0x4858ed0e in UnregisterYUVImage () from /usr/local/lib/libMagick.so.10
#10 0x48441ec7 in ReadImage () from /usr/local/lib/libMagick.so.10
#11 0x483df561 in XS_Image__Magick_Read () from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Image/Magick/Magick.so
#12 0x480e2176 in Perl_pp_entersub () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#13 0x480db259 in Perl_runops_standard () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#14 0x48089062 in S_run_body () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#15 0x48088d27 in perl_run () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#16 0x8049094 in main (argc=3, argv=0xbfbff6c0, env=0xbfbff6d0) at perlmain.c:99
(gdb)
This situation is not reproducible with particular images, it just occurs from time to time (frequency is unpredictable).