php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59339 imagick makes PHP segfault
Submitted: 2010-08-06 07:50 UTC Modified: 2010-08-12 01:22 UTC
From: daniel at produktion203 dot se Assigned:
Status: Closed Package: imagick (PECL)
PHP Version: 5.3.3 OS: FreeBSD 7.2-RELEASE
Private report: No CVE-ID: None
 [2010-08-06 07:50 UTC] daniel at produktion203 dot se
Description:
------------
I just updated to the latest version of php and imagick
Thats PHP 5.3.3 and pecl-imagick 3.0.0

When imagick is activated, it works, but php segfaults when the script is done making it produce error logs.

If i comment imagick in the extensions.ini php no more segfaults.

(This problem only occurs in cli mode, not through apache)

Ive tried commenting all modules except imagick too and php still segfaults

Reproduce code:
---------------
php --version in cli

Expected result:
----------------
Show php version info without producing segfault

Actual result:
--------------
php --version
PHP 5.3.3 with Suhosin-Patch (cli) (built: Aug  5 2010 15:42:35) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
Segmentation fault: 11 (core dumped)

========================================================
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.4...done.
Loaded symbols for /lib/libcrypt.so.4
Reading symbols from /usr/local/lib/libpcre.so.0...done.
Loaded symbols for /usr/local/lib/libpcre.so.0
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libevent-1.4.so.4...done.
Loaded symbols for /usr/local/lib/libevent-1.4.so.4
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /lib/libz.so.4...done.
Loaded symbols for /lib/libz.so.4
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/php/20090626-debug/eaccelerator.so...done.
Loaded symbols for /usr/local/lib/php/20090626-debug/eaccelerator.so
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x29f670a0 in ?? ()




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-06 11:52 UTC] mkoppanen@php.net
Does the same thing happen without eacceletor? I remember there has been bug reports where the crash has been caused when ImageMagick is installed via ports on FreeBSD. Is your installation from ports?
 [2010-08-07 04:00 UTC] daniel at produktion203 dot se
Yes,

Same thing happens without eaccelerator, i also tried downloading and compiling the latest version as ports has 3.0.0 rc1, it now runs with 3.0.0 stable and still segfaults.

Here is a core dump with only imagick enabled in extensions:
Reading symbols from /lib/libcrypt.so.4...done.
Loaded symbols for /lib/libcrypt.so.4
Reading symbols from /usr/local/lib/libpcre.so.0...done.
Loaded symbols for /usr/local/lib/libpcre.so.0
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libevent-1.4.so.4...done.
Loaded symbols for /usr/local/lib/libevent-1.4.so.4
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /lib/libz.so.4...done.
Loaded symbols for /lib/libz.so.4
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x292b40a0 in ?? ()

You can also find a phpinfo here:
http://img802.imageshack.us/img802/3841/segfault.jpg
 [2010-08-07 04:10 UTC] daniel at produktion203 dot se
Here is my ImageMagick version btw:

convert --version
Version: ImageMagick 6.6.2-10 2010-07-26 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features:
 [2010-08-10 03:42 UTC] daniel at produktion203 dot se
Would it help if i provided you with SSH access to the machine?

Its our dev server so there isnt much secret stuff on it.

Send a mail with your IP and i?ll hook you up.

Really need this fixed somehow, because we are using cronjobs with php and im receiving a mail with the segfault message every 5 minutes :P
 [2010-08-12 01:21 UTC] daniel at produktion203 dot se
I updated freebsd to 8.1 and it all works now, im guessing thats the solution :)
 [2010-08-12 01:22 UTC] daniel at produktion203 dot se
Closing
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 21:01:29 2024 UTC