Page 1 of 1

segfault with modperl

Posted: 2011-02-24T08:46:35-07:00
by qwerty
Hi,

I'm getting a segfault when using ImageMagick with my modperl application. The segfault happens at server startup, after all of the perl initialization code has been run. If I comment out the "use Image::Magick" line, the application starts up.

Versions:
- perl 5.12.2
- httpd-2.2.17
- mod-perl 2.0.4
- ImageMagick-6.6.1-10
- Ubuntu 10.10 - 32 bit - 2.6.35-25-generic-pae - i686

Here is a stack trace from a core file:

#0 0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xb660bba6 in std::ios_base::Init::~Init() () from /usr/lib/libstdc++.so.6
#2 0xb763d69e in ?? () from /lib/libc.so.6
#3 0xb763d70f in exit () from /lib/libc.so.6
#4 0x080667ab in destroy_and_exit_process (process=0x9c6b130, process_exit_value=-1216971552)
at main.c:272
#5 0x080678a7 in main (argc=4, argv=0xbfb75854) at main.c:746

Let me know if I can provide any more information.

Re: segfault with modperl

Posted: 2011-02-24T08:53:18-07:00
by magick
Notice your stack trace does not include a path to ImageMagick.

Does your version of ImageMagick include support for RSVG (convert -list format)? If so, remove the support and try again. RSVG includes an atexit() method which causes problems when unwinding an ImageMagick program at exit. Otherwise we're clueless why its failing. You can always try again with the latest ImageMagick, 6.6.7-9.

Re: segfault with modperl

Posted: 2011-02-24T13:27:44-07:00
by qwerty
It is helps, here is another typical backtrace I was getting with ImageMagick loaded:

http://www.gossamer-threads.com/lists/m ... dev/102657

I'll try removing RSVG support.

Re: segfault with modperl

Posted: 2011-02-24T13:46:09-07:00
by magick
Remove support for OpenEXR as well. Now try modperl again.