12c29 PHP 5.3.4 + GD + PNG = Abort trap: 6 (core dumped) - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Ports & Packages > Installation and Maintenance of FreeBSD Ports or Packages

Installation and Maintenance of FreeBSD Ports or Packages Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

Reply
 
Thread Tools Display Modes
  #1  
Old December 21st, 2010, 06:28
actual actual is offline
Junior Member
 
Join Date: Dec 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP 5.3.4 + GD + PNG = Abort trap: 6 (core dumped)

If I try to run following PHP code:

PHP Code:
$image imagecreatefrompng('/path/to/my/png/file'); 
PHP/Apache crashes with:
Code:
Abort trap: 6 (core dumped)
Seems like PNG support is broken, while the rest is ok (jpeg, gif). What the reason may be?
Reply With Quote
  #2  
Old December 21st, 2010, 14:24
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,694
Thanks: 47
Thanked 2,021 Times in 1,860 Posts
Default

How to ask questions the smart way: Be precise and informative about your problem
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #3  
Old December 21st, 2010, 15:57
actual actual is offline
Junior Member
 
Join Date: Dec 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

> Describe the symptoms of your problem or bug carefully and clearly.

If I try to work with PNG images using GD, PHP terminates with
Code:
Abort trap: 6 (core dumped)
> Describe the environment in which it occurs (machine, OS, application, whatever). Provide your vendor's distribution and release level (e.g.: “Fedora Core 7”, “Slackware 9.1”, etc.).

Code:
uname -a
FreeBSD pups 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
Code:
php -v
PHP 5.3.4 with Suhosin-Patch (cli) (built: Dec 21 2010 16:01:02)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with XCache v1.3.1, Copyright (c) 2005-2010, by mOo
Code:
pkg_info | grep php
php5-5.3.4          PHP Scripting Language
php5-bz2-5.3.4      The bz2 shared extension for php
php5-ctype-5.3.4    The ctype shared extension for php
php5-filter-5.3.4   The filter shared extension for php
php5-gd-5.3.4       The gd shared extension for php
php5-json-5.3.4     The json shared extension for php
php5-mbstring-5.3.4 The mbstring shared extension for php
php5-mcrypt-5.3.4   The mcrypt shared extension for php
php5-mysql-5.3.4    The mysql shared extension for php
php5-mysqli-5.3.4   The mysqli shared extension for php
php5-openssl-5.3.4  The openssl shared extension for php
php5-posix-5.3.4    The posix shared extension for php
php5-session-5.3.4  The session shared extension for php
php5-zip-5.3.4      The zip shared extension for php
php5-zlib-5.3.4     The zlib shared extension for php
phpMyAdmin-3.3.8.1  A set of PHP-scripts to manage MySQL over the web
xcache-1.3.1        A fast and stable php opcode cacher
Code:
pkg_info | grep pecl
pecl-imagick-3.0.1  Provides a wrapper to the ImageMagick/GraphicsMagick librar
pecl-pdflib-2.1.8   A PECL extension to create PDF on the fly
Code:
pkg_info | grep png
png-1.4.4           Library for manipulating PNG images
> Describe the research you did to try and understand the problem before you asked the question.
Googled -- no info.

> Describe the diagnostic steps you took to try and pin down the problem yourself before you asked the question.
Updated and reinstalled everything related to PHP and PNG.

> Describe any possibly relevant recent changes in your computer or software configuration.
Yesterday PHP5 update from ports.

> If at all possible, provide a way to reproduce the problem in a controlled environment.

Not sure about this. I have asked my friends to do tests on their machines, no one reported about problems. One reported that he faced up with the same problem yesterday, today he updated PHP from ports and problem has gone. Also, he noted that he had similar problems with GD and PNG in the past.

Code:
mkdir gd-test; cd gd-test
echo "<?php \$image = imagecreatefrompng('test.png'); ?>" > test.php
fetch -o test.png http://upload.wikimedia.org/wikipedi...Basketball.png
php test.php

Last edited by DutchDaemon; December 21st, 2010 at 17:51. Reason: proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #4  
Old December 22nd, 2010, 10:56
ryanaslett ryanaslett is offline
Junior Member
 
Join Date: Dec 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Me too.

Just wanted to chime in that Im having the exact same problem, but Im on an older version of BSD and PHP. - so possibly some other library or extention?

Code:
uname -a 
FreeBSD gaiahost.coop 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan  5 16:02:27 UTC 2010     
root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
Code:
php -v
PHP 5.2.14 with Suhosin-Patch 0.9.7 (cli) (built: Oct 21 2010 02:47:49) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
Code:
#cat foo.php
<?php
  $foo = imagecreatefrompng('/web/magazine.org/www-dev/sites/default/files/imagecache_sample.png');
?>

#php foo.php
Abort
Since this is dying on the command line we can rule out apache (saw your link here as well: http://bugs.php.net/bug.php?id=53585)

The only other thing is that Im on a virtual host.. so perhaps there's some library thats not kosher with the virtualization..

Last edited by DutchDaemon; December 22nd, 2010 at 11:58. Reason: proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #5  
Old December 22nd, 2010, 16:58
Freddie Freddie is offline
Junior Member
 
Join Date: Jan 2010
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I also have this problem after upgrading to the latest version of php 5.3.4. After creating a debug version of php and running a test script with gdb, I get the following stack trace:

Code:
#0  0x00000008015c43cc in kill () from /lib/libc.so.7
#1  0x00000008015c31cb in abort () from /lib/libc.so.7
#2  0x0000000804eee1e2 in png_create_read_struct_2 () from /usr/local/lib/libpng.so.6
#3  0x0000000000000000 in ?? ()
#4  0x0000000000000000 in ?? ()
#5  0x00000008047886cb in php_gd_gdImageCreateFromPngCtx () from /usr/local/lib/php/20090626-debug/gd.so
#6  0x00007fffffffed74 in ?? ()
#7  0x00007fffffffed7d in ?? ()
...
However trying to reproduce the problem on a clean freebsd 8.1 install with the latest version of php fails
Reply With Quote
  #6  
Old December 22nd, 2010, 20:13
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,701
Thanks: 429
Thanked 1,757 Times in 1,456 Posts
Default

I don't use PHP, but a guess would be that png was upgraded after PHP was installed, and not everything that depends on png was rebuilt. If that is the problem,
# portupgrade -rf png
or
# portmaster -r png
would fix it. Just rebuilding graphics/php5-gd might be enough.
Reply With Quote
The Following User Says Thank You to wblock@ For This Useful Post:
Freddie (December 23rd, 2010)
  #7  
Old December 23rd, 2010, 10:24
Freddie Freddie is offline
Junior Member
 
Join Date: Jan 2010
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks, I can confirm that rebuilding with portmaster -r png fixes the issue.

Last edited by DutchDaemon; December 23rd, 2010 at 19:00. Reason: proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #8  
Old December 23rd, 2010, 15:32
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,701
Thanks: 429
Thanked 1,757 Times in 1,456 Posts
Default

Great! Upgrading FreeBSD Ports may be useful for a general overview.
Reply With Quote
  #9  
Old September 11th, 2011, 14:20
kestasjk kestasjk is offline
Junior Member
 
Join Date: May 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just got this myself.. kind of makes you wonder how you're supposed to run a production system off BSD
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Murmur 1.2.2 core dumped on connection R1_Bzh Web & Network Services 3 September 30th, 2010 19:31
Abort trap (core dumped) - apache-2.0.63_8 ervin23 Installation and Maintenance of FreeBSD Ports or Packages 5 May 18th, 2010 15:29
Illegal instruction: 4 (core dumped) varnie Installation and Maintenance of FreeBSD Ports or Packages 11 October 29th, 2009 20:49
[Solved] SAMBA error: Abort trap: 6 fbsd_fuse Web & Network Services 4 October 7th, 2009 09:21
(as) core dumped hansaplast General 3 August 12th, 2009 14:47


All times are GMT +1. The time now is 15:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0