[Pkg-php-pecl] Bug#854707: php-imagick: Fix autopkgtest segmentation faults

Nishanth Aravamudan nish.aravamudan at canonical.com
Thu Feb 9 18:00:08 UTC 2017


Package: php-imagick
Version: 3.4.3~rc2-2
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu zesty ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:


  * debian/patches/no-openmp-threads.patch: limit the number of openmp
    threads used to 1.

I believe this is the only sane way forward for now. We need to figure
out why parallelism breaks the test-suite, but if the test-suite fails
with parallelism (with segmentation faults!), it feels irresponsible to
let people use parallelism in the field, even if it's a behavioral
change.

  * debian/tests/control:
    - Restore Restriction: needs-recommends since the tests require
      the -extra libmagickcore package

This is a regression from the recent updates to debian & ubuntu
packages.


Accepting this patch would also close 826998, I believe.


Thanks for considering the patch.

*** /tmp/tmpKtrIlw/php-imagick_3.4.3~rc2-2ubuntu2.debdiff
diff -Nru php-imagick-3.4.3~rc2/debian/patches/no-openmp-threads.patch php-imagick-3.4.3~rc2/debian/patches/no-openmp-threads.patch
--- php-imagick-3.4.3~rc2/debian/patches/no-openmp-threads.patch	1969-12-31 16:00:00.000000000 -0800
+++ php-imagick-3.4.3~rc2/debian/patches/no-openmp-threads.patch	2017-02-08 17:35:02.000000000 -0800
@@ -0,0 +1,21 @@
+Description: limit the number of openmp threads used to 1
+ The php-imagick 3.4.0 test suite fails with various segfaults when openmp
+ threads are in use.  Force the openmp thread count to 1 to avoid this
+ problem.
+ .
+ This patch is a workaround only; it is currently unknown if the root bug
+ lies in php-imagick or in imagemagick.
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1549942
+
+--- a/imagick-3.4.3RC2/imagick.c
++++ b/imagick-3.4.3RC2/imagick.c
+@@ -3689,6 +3689,8 @@
+ 		checkImagickVersion();
+ 	}
+ 
++	SetMagickResourceLimit(ThreadResource, 1);
++
+ 	return SUCCESS;
+ }
+ 
diff -Nru php-imagick-3.4.3~rc2/debian/patches/series php-imagick-3.4.3~rc2/debian/patches/series
--- php-imagick-3.4.3~rc2/debian/patches/series	2017-01-24 03:47:41.000000000 -0800
+++ php-imagick-3.4.3~rc2/debian/patches/series	2017-02-08 17:35:02.000000000 -0800
@@ -1,2 +1,3 @@
 0001-Hardcode-path-to-usrsharefontstruetypettf-dejavuDeja.patch
 0002-Skip-version-check-by-default.patch
+no-openmp-threads.patch
diff -Nru php-imagick-3.4.3~rc2/debian/tests/control php-imagick-3.4.3~rc2/debian/tests/control
--- php-imagick-3.4.3~rc2/debian/tests/control	2017-01-24 03:47:41.000000000 -0800
+++ php-imagick-3.4.3~rc2/debian/tests/control	2017-02-08 17:35:02.000000000 -0800
@@ -1,2 +1,5 @@
 Test-Command: cd imagick-*/tests && phpunit --verbose .
 Depends: php-cli, php-imagick, gsfonts, imagemagick-6.q16, phpunit
+# The tests needs the -extra libmagickcore package but it gets
+# renamed on soname bumps. imagemagick-6.q16 recommends it though.
+Restrictions: needs-recommends


-- System Information:
Debian Release: stretch/sid
  APT prefers yakkety-updates
  APT policy: (500, 'yakkety-updates'), (500, 'yakkety-security'), (500, 'yakkety'), (100, 'yakkety-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-37-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd



More information about the Pkg-php-pecl mailing list