php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70004 PHP segfaults on exit when imagick is loaded
Submitted: 2015-07-07 02:27 UTC Modified: 2015-07-07 12:36 UTC
From: charlie at atechmedia dot com Assigned:
Status: Closed Package: imagick (PECL)
PHP Version: 5.6.10 OS: Linux 3.11.0-26 Ubuntu LXC
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: charlie at atechmedia dot com
New email:
PHP Version: OS:

 

 [2015-07-07 02:27 UTC] charlie at atechmedia dot com
Description:
------------
PHP 5.6.10 (also 5.6.9)
Ubuntu 14.04 running in LXC container
Linux 3.11.0-26-generic #45~precise1-Ubuntu
ImageMagick 6.9.0-10 Q16 x86_64 2015-03-09 http://www.imagemagick.org
imagick 3.1.2 (also 3.1.1, 3.1.0, 3.3.0RC2)

PHP dies with a segmentation fault when it exits.

Stack trace included below. This is possibly a duplicate of #59339 which was closed as a kernel issue.


Test script:
---------------
This bug occurs when executing no code.

Actual result:
--------------
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f76880e38fc in gvFreeContext () from /usr/lib/libgvc.so.6
(gdb) bt
#0  0x00007f76880e38fc in gvFreeContext () from /usr/lib/libgvc.so.6
#1  0x00007f768ad0c27c in UnregisterDOTImage () at coders/dot.c:243
#2  0x00007f768ac9b97f in UnregisterStaticModules () at magick/static.c:384
#3  0x00007f768ac2d51a in MagickCoreTerminus () at magick/magick.c:1389
#4  0x00007f768b2369e2 in MagickWandTerminus () at wand/magick-wand.c:1035
#5  0x00007f768b4ed628 in zm_shutdown_imagick (type=<optimised out>, module_number=52)
    at /tmp/pear/temp/imagick/imagick.c:2772
#6  0x000000000082c4a3 in module_destructor (module=0x305d4a0) at /tmp/php-5.6.10/Zend/zend_API.c:2376
#7  0x0000000000831726 in i_zend_hash_bucket_delete (p=0x307eff0, ht=0x116a740 <module_registry>)
    at /tmp/php-5.6.10/Zend/zend_hash.c:182
#8  zend_hash_bucket_delete (ht=ht@entry=0x116a740 <module_registry>, p=0x307eff0) at /tmp/php-5.6.10/Zend/zend_hash.c:192
#9  0x0000000000832e88 in zend_hash_graceful_reverse_destroy (ht=0x116a740 <module_registry>)
    at /tmp/php-5.6.10/Zend/zend_hash.c:613
#10 0x000000000082adac in zend_destroy_modules () at /tmp/php-5.6.10/Zend/zend_API.c:1894
#11 0x0000000000824fdf in zend_shutdown () at /tmp/php-5.6.10/Zend/zend.c:836
#12 0x00000000007c43fb in php_module_shutdown () at /tmp/php-5.6.10/main/main.c:2461
#13 0x0000000000437c76 in main (argc=1, argv=0x2fbba90) at /tmp/php-5.6.10/sapi/cli/php_cli.c:1393

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-07 02:53 UTC] charlie at atechmedia dot com
Possibly a duplicate of: https://bugs.php.net/bug.php?id=59752

I will try building IM without OpenMP to confirm.
 [2015-07-07 12:35 UTC] charlie at atechmedia dot com
This does not appear to be a bug in PHP or imagick. It is also not a problem with OpenMP.

The crash is reproducible in "convert". It appears to be a bug in gvc and compiling imagemagick --with-gvc=no resolves the problem.
 [2015-07-07 12:36 UTC] charlie at atechmedia dot com
-Status: Open +Status: Closed
 [2015-07-07 12:36 UTC] charlie at atechmedia dot com
I'm closing this as the bug isn't specific to PHP.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 11:01:34 2025 UTC