Debian Bug report logs - #568349
php5-imagick: Segmentation fault when calling Imagick::writeImage() on a read-only file

version graph

Package: php5-imagick; Maintainer for php5-imagick is (unknown);

Reported by: Nick Vahalik <nvahalik@rvos.com>

Date: Thu, 4 Feb 2010 04:36:02 UTC

Severity: important

Tags: help

Found in versions php-imagick/3.0.0~rc1-1, php-imagick/2.1.1RC1-1, php-imagick/3.0.1-1

Done: Bastien ROUCARIES <roucaries.bastien@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Jose Carlos Medeiros <debian@psabs.com.br>:
Bug#568349; Package php5-imagick. (Thu, 04 Feb 2010 04:36:05 GMT) (full text, mbox, link).


Acknowledgement sent to Nick Vahalik <nvahalik@rvos.com>:
New Bug report received and forwarded. Copy sent to Jose Carlos Medeiros <debian@psabs.com.br>. (Thu, 04 Feb 2010 04:36:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Nick Vahalik <nvahalik@rvos.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: php5-imagick: Segmentation fault when calling Imagick::writeImage() on a read-only file
Date: Wed, 03 Feb 2010 19:21:33 -0900
Package: php5-imagick
Version: 2.1.1RC1-1
Severity: important

Take this for example:

nvahalik@intranet:~$ ls -al file.jpg 
-r--r--r-- 1 nvahalik nvahalik 67580 2010-02-03 12:50 file.jpg

<?php
$a = new Imagick('file.jpg');
$a->thumbnailImage(100, 0);
$a->writeImage();

nvahalik@intranet:~# php test.php
Segmentation fault
nvahaliK@intranet:~# 

If the file gets made writable, the command completes as expected.

Only appears to affect the currenct arch.  An i386 version of the script
runs as expected.

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages php5-imagick depends on:
ii  libapache2-mod- 5.2.6.dfsg.1-2+nosuho    server-side, HTML-embedded scripti
ii  libc6           2.7-18lenny2             GNU C Library: Shared libraries
ii  libmagick10     7:6.3.7.9.dfsg2-1~lenny3 image manipulation library
ii  php5-cli [phpap 5.2.6.dfsg.1-2+nosuho    command-line interpreter for the p
ii  php5-common     5.2.6.dfsg.1-2+nosuho    Common files for packages built fr
ii  ucf             3.0016                   Update Configuration File: preserv

php5-imagick recommends no packages.

php5-imagick suggests no packages.

-- no debconf information

NOTICE:  This e-mail and any accompanying attachment may contain
confidential or privileged information.  The information is only for
the use of the recipient intended by the sender as named above.
Such information does not constitute an offer of contract or waiver
of any right of the sender and may not be relied upon by any party
not intended as a recipient by the sender.  If you have received this
e-mail in error, please immediately notify us by telephone at 
(254) 773-2181 or (800) 792-3084.  Please be advised that any
disclosure, copying, distribution or the taking of any action in
reliance on the contents of this e-mail or any accompanying
attachment is strictly prohibited.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#568349; Package php5-imagick. (Tue, 14 Sep 2010 21:18:12 GMT) (full text, mbox, link).


Acknowledgement sent to Guillaume Delacour <gui@iroqwa.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Tue, 14 Sep 2010 21:18:12 GMT) (full text, mbox, link).


Message #10 received at 568349@bugs.debian.org (full text, mbox, reply):

From: Guillaume Delacour <gui@iroqwa.org>
To: 568349@bugs.debian.org
Subject: Re: php5-imagick: Segmentation fault when calling Imagick::writeImage() on a read-only file
Date: Tue, 14 Sep 2010 23:15:24 +0200
[Message part 1 (text/plain, inline)]
Hello,

After some gdb usage and some investigations, i've found that the
problem seems to be in imagemagick when openmp support is enabled at
build time :

http://studio.imagemagick.org/discourse-server/viewtopic.php?f=3&t=14788
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=16453&start=0&hilit=openmp+run+time

Rebuilding the imagemagick package without openmp support fix the
problem (see attachment).

I also noted that when the segfault appear, the image was successfully
written and was not corrupted.
[rules_imagemagick_disable_openmp (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#568349; Package php5-imagick. (Wed, 24 Nov 2010 15:30:06 GMT) (full text, mbox, link).


Acknowledgement sent to Franz Unger <ufx@vivid-planet.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Wed, 24 Nov 2010 15:30:06 GMT) (full text, mbox, link).


Message #15 received at 568349@bugs.debian.org (full text, mbox, reply):

From: Franz Unger <ufx@vivid-planet.com>
To: 568349@bugs.debian.org
Subject: Workaround
Date: Wed, 24 Nov 2010 15:28:12 +0100
We ran into the same problem with current squeeze/sid. Even with 
writable files. Installing imagick from pecl didn't help either.

As a workaround we added this line into /etc/environment:
MAGICK_THREAD_LIMIT=1

We'd appreciate if the above patch could make it into the stable release.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#568349; Package php5-imagick. (Mon, 13 Dec 2010 21:36:03 GMT) (full text, mbox, link).


Acknowledgement sent to Guillaume Delacour <gui@iroqwa.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Mon, 13 Dec 2010 21:36:03 GMT) (full text, mbox, link).


Message #20 received at 568349@bugs.debian.org (full text, mbox, reply):

From: Guillaume Delacour <gui@iroqwa.org>
To: 568349@bugs.debian.org, control@bugs.debian.org
Cc: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>, ufx@vivid-planet.com, nvahalik@rvos.com
Subject: Re: Workaround
Date: Mon, 13 Dec 2010 22:34:15 +0100
[Message part 1 (text/plain, inline)]
tags 568349 +help
thanks

Hi,

I've made some more test today and didn't reproduce the problem at any
time. Sometimes with MAGICK_THREAD_LIMIT set, the crash occured too (see
url i paste earlier in the bug). I think this is mainly a openmp
behavior issue.

I request some help to the Debian PHP Maintainers team (or any other
person who wants to involve on the bug) to determine how to fix this
bug.

[signature.asc (application/pgp-signature, inline)]

Added tag(s) help. Request was from Guillaume Delacour <gui@iroqwa.org> to control@bugs.debian.org. (Mon, 13 Dec 2010 21:36:05 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#568349; Package php5-imagick. (Wed, 09 Nov 2011 20:18:07 GMT) (full text, mbox, link).


Acknowledgement sent to Guillaume Delacour <gui@iroqwa.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Wed, 09 Nov 2011 20:18:07 GMT) (full text, mbox, link).


Message #27 received at 568349@bugs.debian.org (full text, mbox, reply):

From: Guillaume Delacour <gui@iroqwa.org>
To: 638409@bugs.debian.org, control@bugs.debian.org
Cc: 568349@bugs.debian.org
Subject: The openmp support also segfault php5-imagick
Date: Wed, 09 Nov 2011 21:06:36 +0100
[Message part 1 (text/plain, inline)]
affects 638409 +php5-imagick
thanks

Hello,

The openmp support also affects imagemagick php module by segfaulting
the module in specific conditions [1].
After disabling the openmp support in imagemagick, the segfault seems to
never occurs again.

As the problem affects Wheezy too, maybe could you consider disabling
openmp support ?

[1]: http://bugs.debian.org/568349

-- 
Guillaume Delacour <gui@iroqwa.org>
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#568349; Package php5-imagick. (Thu, 10 Nov 2011 09:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to roucaries bastien <roucaries.bastien+debian@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Thu, 10 Nov 2011 09:27:15 GMT) (full text, mbox, link).


Message #32 received at 568349@bugs.debian.org (full text, mbox, reply):

From: roucaries bastien <roucaries.bastien+debian@gmail.com>
To: Guillaume Delacour <gui@iroqwa.org>, 638409@bugs.debian.org
Cc: control@bugs.debian.org, 568349@bugs.debian.org
Subject: Re: [Pkg-gmagick-im-team] Bug#638409: The openmp support also segfault php5-imagick
Date: Thu, 10 Nov 2011 10:23:26 +0100
2011/11/9 Guillaume Delacour <gui@iroqwa.org>:
> affects 638409 +php5-imagick
> thanks
>
> Hello,
>
> The openmp support also affects imagemagick php module by segfaulting
> the module in specific conditions [1].

Ok see a libgomp problem . Why do you report it against imagemagick ?

> After disabling the openmp support in imagemagick, the segfault seems to
> never occurs again.
>
> As the problem affects Wheezy too, maybe could you consider disabling
> openmp support ?

No thanks. This bug is broader than imagemagick, please fix libgomp
and reassign to libgomp with proper gdb trace. And add affect
imagemagick.



Thanks

Bastien

> [1]: http://bugs.debian.org/568349
>
> --
> Guillaume Delacour <gui@iroqwa.org>
>
> _______________________________________________
> Pkg-gmagick-im-team mailing list
> Pkg-gmagick-im-team@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-gmagick-im-team
>




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#568349; Package php5-imagick. (Fri, 11 Nov 2011 17:30:09 GMT) (full text, mbox, link).


Acknowledgement sent to Guillaume Delacour <gui@iroqwa.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Fri, 11 Nov 2011 17:30:10 GMT) (full text, mbox, link).


Message #37 received at 568349@bugs.debian.org (full text, mbox, reply):

From: Guillaume Delacour <gui@iroqwa.org>
To: roucaries bastien <roucaries.bastien+debian@gmail.com>, control@bugs.debian.org
Cc: 638409@bugs.debian.org, 568349@bugs.debian.org
Subject: Re: Bug#638409: The openmp support also segfault php5-imagick
Date: Fri, 11 Nov 2011 18:29:09 +0100
[Message part 1 (text/plain, inline)]
affects 638409 -php5-imagick
thanks

Le jeudi 10 novembre 2011 à 10:23 +0100, roucaries bastien a écrit :
> 2011/11/9 Guillaume Delacour <gui@iroqwa.org>:
> > affects 638409 +php5-imagick
> > thanks
> >
> > Hello,
> >
> > The openmp support also affects imagemagick php module by segfaulting
> > the module in specific conditions [1].
> 
> Ok see a libgomp problem . Why do you report it against imagemagick ?

All backtrace i've collected didn't help me ATM. I saw other users using
other distribution have noted that the openmp support is problematic in
such ways. This is why i've proposed to disable this support.

> 
> > After disabling the openmp support in imagemagick, the segfault seems to
> > never occurs again.
> >
> > As the problem affects Wheezy too, maybe could you consider disabling
> > openmp support ?
> 
> No thanks. This bug is broader than imagemagick, please fix libgomp
> and reassign to libgomp with proper gdb trace. And add affect
> imagemagick.

I've deleted the "affects php5-imagick" on this bug. If i confirm an
issue with libgomp, i'll bug against it.

> 
> 
> 
> Thanks
> 
> Bastien
> 
> > [1]: http://bugs.debian.org/568349
> >
> > --
> > Guillaume Delacour <gui@iroqwa.org>
> >
> > _______________________________________________
> > Pkg-gmagick-im-team mailing list
> > Pkg-gmagick-im-team@lists.alioth.debian.org
> > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-gmagick-im-team
> >

-- 
Guillaume Delacour <gui@iroqwa.org>
[signature.asc (application/pgp-signature, inline)]

Bug Marked as found in versions php-imagick/3.0.0~rc1-1. Request was from Guillaume Delacour <gui@iroqwa.org> to control@bugs.debian.org. (Tue, 15 Nov 2011 18:00:05 GMT) (full text, mbox, link).


Bug Marked as found in versions php-imagick/3.0.1-1. Request was from Guillaume Delacour <gui@iroqwa.org> to control@bugs.debian.org. (Tue, 15 Nov 2011 18:00:07 GMT) (full text, mbox, link).


Added blocking bug(s) of 568349: 652960 Request was from Bastien ROUCARIES <roucaries.bastien@gmail.com> to control@bugs.debian.org. (Thu, 22 Dec 2011 09:51:16 GMT) (full text, mbox, link).


Reply sent to Bastien ROUCARIES <roucaries.bastien@gmail.com>:
You have taken responsibility. (Thu, 12 Jul 2012 08:09:12 GMT) (full text, mbox, link).


Notification sent to Nick Vahalik <nvahalik@rvos.com>:
Bug acknowledged by developer. (Thu, 12 Jul 2012 08:09:12 GMT) (full text, mbox, link).


Message #48 received at 568349-done@bugs.debian.org (full text, mbox, reply):

From: Bastien ROUCARIES <roucaries.bastien@gmail.com>
To: 652960-done@bugs.debian.org, 568349-done@bugs.debian.org
Subject: Fixed by upgrade
Date: Thu, 12 Jul 2012 10:07:19 +0200
Hi,

I have upgraded my package (first message was too fast) and it seems
that upgrade solve this problem. Feel free to reopen if it is does not
work on your side

Bastien




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 10 Aug 2012 07:27:21 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 00:33:50 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.