php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76120 Segmentation fault when set Imagick profileImage
Submitted: 2018-03-20 15:53 UTC Modified: 2018-07-01 04:22 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: michael at goldenplanet dot com Assigned:
Status: No Feedback Package: imagick (PECL)
PHP Version: 7.1.15 OS: Linux CentOS 7 3.10.0-693.21.1.e
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michael at goldenplanet dot com
New email:
PHP Version: OS:

 

 [2018-03-20 15:53 UTC] michael at goldenplanet dot com
Description:
------------
# php --info | grep compile
Imagick compiled with ImageMagick version => ImageMagick 6.9.9-28 Q16 x86_64 2017-12-26 http://www.imagemagick.org

# gdb:
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/php-fpm...Reading symbols from /usr/sbin/php-fpm...(no debugging symbols found)...done.
(no debugging symbols found)...done.
[New LWP 1208]
[New LWP 1209]
[New LWP 1205]
[New LWP 1135]
[New LWP 1206]
[New LWP 1131]
[New LWP 1207]
[New LWP 1123]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `php-fpm: pool xspass-www                                                      '.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f5d70944ddd in ProfileImage._omp_fn.0 () from /lib64/libMagickCore-6.Q16.so.5
Missing separate debuginfos, use: debuginfo-install php-fpm-7.1.15-1.el7.remi.x86_64
(gdb) bt
#0  0x00007f5d70944ddd in ProfileImage._omp_fn.0 () from /lib64/libMagickCore-6.Q16.so.5
#1  0x00007f5d6f345435 in ?? () from /lib64/libgomp.so.1
#2  0x00007f5d8679ee25 in start_thread () from /lib64/libpthread.so.0
#3  0x00007f5d86cae34d in clone () from /lib64/libc.so.6


Test script:
---------------
<?php
$imagick = new \Imagick();

$imagick->readImage('https://raw.githubusercontent.com/GpMichael/examples/master/test.jpg');
$profile = file_get_contents('https://github.com/avalanche123/Imagine/raw/develop/lib/Imagine/resources/color.org/sRGB_IEC61966-2-1_black_scaled.icc');


$imagick->profileImage('icc', $profile);



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-18 10:37 UTC] danack@php.net
-Status: Open +Status: Feedback
 [2018-06-18 10:37 UTC] danack@php.net
It looks like you are using OpenMP.

It appears that although this is relatively safe to use in single process command line programs, it just doesn't seem to play nicely when being used in an environment that has other process managers in place.

Please could you try again with OpenMP disabled, or with the thread resource set to 1.
 [2018-07-01 04:22 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-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 21:03:37 2021 UTC