Bug 559675

Summary: phpinfo() crash when both imagick and gmagick installed
Product: [Fedora] Fedora Reporter: Remi Collet <fedora>
Component: php-pecl-gmagickAssignee: Pavel Alexeev <pahan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: fedora, jaywheeler22, jorton, neto.joaobatista, pahan, radualexandrupopescu, rpm
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php-pecl-imagick-3.0.0-5.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-26 11:25:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Remi Collet 2010-01-28 18:06:30 UTC
Description of problem:
phpinfo() or php -i crash 

Version-Release number of selected component (if applicable):
php-pecl-imagick-2.2.2-4.fc12 (also reproduce with 2.3.0)
php-pecl-gmagick-1.0.2b1-3.fc11 (which seems missing in F-12 repo)


How reproducible:
Always

Steps to Reproduce:
1. yum install php-pecl-gmagick php-pecl-imagick
2. php -n -d extension=gmagick.so -d extension=imagick.so -i
  
Actual results:
imagick
php: magick/semaphore.c :385 : RelinquishSemaphoreInfo:  L'assertion « semaphore_info->signature == 0xabacadabUL » a échoué.
Abandon (core dumped)


Expected results:
Standard PHP info

Additional info:
php -n -d extension=gmagick.so  -i => ok, no error
php -n -d extension=imagick.so  -i => ok, no error


Adding a "Conflict" is both package seems a workaround... but really a poor one... I think some servers running various apps could requires both.

Should investigated to see if libraries works fine, and crash only in phpinfo.

Comment 1 Pavel Alexeev 2010-01-29 09:22:26 UTC
If it works separately, I think it is php error. But agree, it needs further investigation.

Comment 2 Joe Orton 2010-01-29 15:16:02 UTC
You need to diagnose a PHP bug if you assign this to PHP.  All that is demonstrated above is an extension crashing.  Given that php-pecl-gmagick doesn't exist in F12 I can't even reproduce it. 

It seems highly likely that this is a symbol collision or similar between the two extensions.

Comment 3 Pavel Alexeev 2010-01-29 18:39:10 UTC
Sorry guys, my error. php-pecl-gmagick now in Fedora 12 - https://admin.fedoraproject.org/updates/php-pecl-gmagick-1.0.2b1-3.fc12

And if both extension work interdependently I think its correct.

Comment 4 Remi Collet 2010-01-30 07:36:47 UTC
Sorry, but if the very common phpinfo() crash, I think this is a bug.


And simple tests provided with imagick doesn't work if gmagick installed


$ LANG=C php watermark.php 

ImagickException: no decode delegate for this image format `/tmp/test.jpg' @ constitute.c/ReadImage/503 in /usr/share/doc/php-pecl-imagick-2.2.2/examples/watermark.php on line 15

Call Stack:
    0.0002     646128   1. {main}() /usr/share/doc/php-pecl-imagick-2.2.2/examples/watermark.php:0
    0.0004     647336   2. Imagick->readimage() /usr/share/doc/php-pecl-imagick-2.2.2/examples/watermark.php:15


At least, a 'Conflicts' in your specs seems necessary.

Comment 5 Pavel Alexeev 2010-01-31 09:46:54 UTC
Can you provide reproduce script?

Comment 6 Remi Collet 2010-01-31 10:08:08 UTC
> Can you provide reproduce script?    
/usr/share/doc/php-pecl-imagick-2.2.2/examples/watermark.php 

+

Comment 7 Pavel Alexeev 2010-01-31 20:45:07 UTC
Reported upstream - http://pecl.php.net/bugs/bug.php?id=17037

Comment 8 Remi Collet 2010-03-11 21:26:49 UTC
*** Bug 572698 has been marked as a duplicate of this bug. ***

Comment 9 Bug Zapper 2010-03-15 14:15:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Pavel Alexeev 2010-07-22 12:17:41 UTC
*** Bug 616946 has been marked as a duplicate of this bug. ***

Comment 11 Remi Collet 2010-07-22 13:39:30 UTC
Can you please add a "Conflicts" directive in your spec to avoid extensions to be both installed ?

Comment 12 Pavel Alexeev 2010-07-26 11:25:20 UTC
Additional bugreport: http://pecl.php.net/bugs/bug.php?id=17838

Ok, ready:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2351078
http://koji.fedoraproject.org/koji/taskinfo?taskID=2351086

If all works correctly, I'll push updates in stable branch.

P.S. Remi, you are co-maintainer of php-pecl-imagick, and already could do that :)

Comment 13 Remi Collet 2010-09-22 05:01:57 UTC
*** Bug 636236 has been marked as a duplicate of this bug. ***

Comment 14 Remi Collet 2010-09-22 05:03:35 UTC
*** Bug 635767 has been marked as a duplicate of this bug. ***

Comment 15 Fedora Update System 2010-09-22 12:22:13 UTC
php-pecl-imagick-3.0.0-5.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/php-pecl-imagick-3.0.0-5.fc13

Comment 16 Fedora Update System 2010-09-22 12:43:36 UTC
php-pecl-gmagick-1.0.7b1-7.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/php-pecl-gmagick-1.0.7b1-7.fc13

Comment 17 Fedora Update System 2010-10-11 19:26:20 UTC
php-pecl-gmagick-1.0.7b1-7.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2010-11-05 22:57:19 UTC
php-pecl-imagick-3.0.0-5.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.