php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67940 Imagick crashed.
Submitted: 2014-08-31 04:47 UTC Modified: 2014-12-30 10:42 UTC
From: eglic dot csdn at gmail dot com Assigned:
Status: No Feedback Package: imagick (PECL)
PHP Version: 5.6.0 OS: LinuxMint 17
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
30 + 9 = ?
Subscribe to this entry?

 
 [2014-08-31 04:47 UTC] eglic dot csdn at gmail dot com
Description:
------------
the pecl extension Imagick crashed at php-5.6.0 (no-debug-zts).
but it can run at php-5.6.0 (debug-zts)

code crashed while new ImagickDraw();

--------dumped core-------------------------------

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `php-fpm: pool www    '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000007f078e in zend_parse_va_args (num_args=num_args@entry=1, type_spec=0x7fff8c08dac8 "<\001", 
    va=va@entry=0x7fff8c08d9d8, flags=flags@entry=0, tsrm_ls=tsrm_ls@entry=0x7f27a76c40ea)
    at /data/downloads/develop/php/php-5.6.0/Zend/zend_API.c:790
790						zend_function *active_function = EG(current_execute_data)->function_state.function;
(gdb) bt
#0  0x00000000007f078e in zend_parse_va_args (num_args=num_args@entry=1, type_spec=0x7fff8c08dac8 "<\001", 
    va=va@entry=0x7fff8c08d9d8, flags=flags@entry=0, tsrm_ls=tsrm_ls@entry=0x7f27a76c40ea)
    at /data/downloads/develop/php/php-5.6.0/Zend/zend_API.c:790
#1  0x00000000007f0c8e in zend_parse_parameters (num_args=1, tsrm_ls=tsrm_ls@entry=0x7f27a76c40ea, 
    type_spec=type_spec@entry=0x7fff8c08dac8 "<\001") at /data/downloads/develop/php/php-5.6.0/Zend/zend_API.c:924
#2  0x00007f27a76b80ac in zim_imagickdraw_setfillcolor (ht=<optimized out>, return_value=0x7f27ae99e760, 
    return_value_ptr=<optimized out>, this_ptr=0x7f27ae99e500, return_value_used=<optimized out>)
    at /data/eglic/downloads/php/imagick/imagickdraw_class.c:310
#3  0x00007f27a78f271d in xdebug_execute_internal (current_execute_data=0x7f27aead6a28, fci=0x0, return_value_used=0, 
    tsrm_ls=0x1c880c0) at /home/eglic/下载/develop/php/xdebug/xdebug.c:1581
#4  0x0000000000896284 in zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>, tsrm_ls=0x1c880c0)
    at /data/downloads/develop/php/php-5.6.0/Zend/zend_vm_execute.h:560
#5  0x000000000082479b in execute_ex (execute_data=0x7f27aead6a28, tsrm_ls=0x1c880c0)
    at /data/downloads/develop/php/php-5.6.0/Zend/zend_vm_execute.h:363
#6  0x00007f27a78f1b43 in xdebug_execute_ex (execute_data=0x7f27aead6a28, tsrm_ls=<optimized out>)
    at /home/eglic/下载/develop/php/xdebug/xdebug.c:1465
#7  0x0000000000896a9f in zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>, tsrm_ls=0x1c880c0)
    at /data/downloads/develop/php/php-5.6.0/Zend/zend_vm_execute.h:592
#8  0x000000000082479b in execute_ex (execute_data=0x7f27aead66e8, tsrm_ls=0x1c880c0)
    at /data/downloads/develop/php/php-5.6.0/Zend/zend_vm_execute.h:363
#9  0x00007f27a78f1b43 in xdebug_execute_ex (execute_data=0x7f27aead66e8, tsrm_ls=<optimized out>)
    at /home/eglic/下载/develop/php/xdebug/xdebug.c:1465
#10 0x0000000000896a9f in zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>, tsrm_ls=0x1c880c0)
    at /data/downloads/develop/php/php-5.6.0/Zend/zend_vm_execute.h:592
#11 0x000000000082479b in execute_ex (execute_data=0x7f27aead5178, tsrm_ls=0x1c880c0)
    at /data/downloads/develop/php/php-5.6.0/Zend/zend_vm_execute.h:363
#12 0x00007f27a78f1b43 in xdebug_execute_ex (execute_data=0x7f27aead5178, tsrm_ls=<optimized out>)
    at /home/eglic/下载/develop/php/xdebug/xdebug.c:1465
#13 0x0000000000896a9f in zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>, tsrm_ls=0x1c880c0)
    at /data/downloads/develop/php/php-5.6.0/Zend/zend_vm_execute.h:592
#14 0x000000000082479b in execute_ex (execute_data=0x7f27aead2700, tsrm_ls=0x1c880c0)

--------------------------------------------------------------------
eglic@station ~ $ uname -a
Linux station 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

eglic@station ~ $ php -v
PHP 5.6.0 (cli) (built: Aug 31 2014 11:56:32) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
    with XCache v4.0.0-dev, Copyright (c) 2005-2013, by mOo
    with Xdebug v2.3.0dev, Copyright (c) 2002-2013, by Derick Rethans
    with XCache Cacher v4.0.0-dev, Copyright (c) 2005-2013, by mOo



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-09-01 01:05 UTC] Danack at basereality dot com
Hello,

Please could you check the PHP code you think is triggering this issue. Looking at the call stack I can see a call to imagickdraw::setfillcolor:

"zim_imagickdraw_setfillcolor.../data/eglic/downloads/php/imagick/imagickdraw_class.c:310"

Which isn't listed in your bug report.
 [2014-09-01 05:45 UTC] eglic dot csdn at gmail dot com
code at "zim_imagickdraw_setfillcolor.../data/eglic/downloads/php/imagick/imagickdraw_class.c:310 is:

 310     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &param) == FAILURE) {
 311         return;
 312     }
 [2014-09-01 23:14 UTC] Danack at basereality dot com
Yes, but the PHP code you said to replicate the issue is "code crashed while new ImagickDraw();" which does not include a call to setfillcolor.
 [2014-09-02 04:47 UTC] eglic dot csdn at gmail dot com
@Danack 

I found 2 strange things:

1. run this command at terminal : php -r "echo 'A';new ImagickDraw();echo 'B';"
   then php crashed and core dumped. as you see,it stoped at zim_imagickdraw_setfillcolor

2. I built a debug version with --enable-debug and try again,it's OK?!!!
 [2014-09-02 12:06 UTC] daverandom@php.net
-Status: Open +Status: Feedback
 [2014-09-02 12:06 UTC] daverandom@php.net
Thanks for your report!

I cannot reproduce this under *stable* conditions.

Since the provided trace doesn't look like it could originate from the code you are running, it's likely that the issue lies within the unstable xdebug you have enabled, or the unstable xcache you have enabled. In order to identify if this is the case and which is the culprit, please disable these extensions and verify whether the issue occurs when they are disabled.

If it does not, enable them one at a time to determine which extension is the cause of the problem. If the problem still occurs with these extensions disabled, please provide a new stack trace generated under these conditions.

Thanks
 [2014-12-30 10:42 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC