Bug #51372 [NEW]: php5-ffmpeg extension causes php to coredump

From: Date: Tue, 23 Mar 2010 19:55:10 +0000
Subject: Bug #51372 [NEW]: php5-ffmpeg extension causes php to coredump
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-148908@lists.php.net to get a copy of this message
From:             
Operating system: FreeBSD-7.3
PHP version:      5.2.13
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:php5-ffmpeg extension causes php to coredump

Description:
------------
server2# php -v
PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Mar 23 2010 12:15:19) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Segmentation fault (core dumped)

(There is no newer port for FreeBSD than 5.2.12)

server2# cat distinfo
MD5 (ffmpeg-php-0.6.0.tbz2) = f779c0dbffda9dac54729d60c0e04c05
SHA256 (ffmpeg-php-0.6.0.tbz2) =
ec8a9847e0f4d5101a5afedb7dac318e9a13f099865215ae99d08d56add9b141
SIZE (ffmpeg-php-0.6.0.tbz2) = 275557
server2# 

I've tried using FreeBSD-6.4, 7.2 and 7.3 - all fresh installs. From the
ports tree install php5-ffmpeg, which installs ffmpeg from ports as well.
No errors during compilation. After installation is complete simply
executing php -v will result in a core dump, doing php -m clearly shows the
module loaded. Tried re-ordering modules in extensions.ini file as well.
Running ffmpeg via cli works fine. If you're using Apache22 it will restart
ok, if using Apache-1.3.x it will fail to restart - yet leaves no error
messages in logs or running thru gdb httpd -X.



Actual result:
--------------
server2# gdb /usr/local/bin/php php.core
GNU gdb 6.1.1 [FreeBSD]
This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols
found)...
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.4...(no debugging symbols
found)...done.
Loaded symbols for /lib/libcrypt.so.4
Reading symbols from /usr/lib/librt.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libxml2.so.5...(no debugging symbols
found)...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /lib/libz.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.4
Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols
found)...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols
found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x29bb2480 in ?? ()
(gdb) bt
#0  0x29bb2480 in ?? ()
#1  0x285c215b in pthread_once () from /lib/libc.so.7
#2  0x28350092 in xmlIsMainThread () from /usr/local/lib/libxml2.so.5
#3  0x2834f647 in __xmlLastError () from /usr/local/lib/libxml2.so.5
#4  0x282db847 in xmlResetLastError () from /usr/local/lib/libxml2.so.5
#5  0x282e282f in xmlCleanupParser () from /usr/local/lib/libxml2.so.5
#6  0x080847eb in php_libxml_shutdown ()
#7  0x0808481b in zm_shutdown_libxml ()
#8  0x0814c04e in module_destructor ()
#9  0x081523b4 in zend_hash_apply_deleter ()
#10 0x081525f8 in zend_hash_graceful_reverse_destroy ()
#11 0x081488ce in zend_shutdown ()
#12 0x0810642f in php_module_shutdown ()
#13 0x081c5a60 in main ()
(gdb)

server2# gdb /usr/local/bin/php
GNU gdb 6.1.1 [FreeBSD]
This GDB was configured as "i386-marcel-freebsd"...
(gdb) run -v
Starting program: /usr/local/bin/php -v
(no debugging symbols found)...[snipped repetitive]
[New Thread 0x286be040 (LWP 100081)]
PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Mar 23 2010 12:15:19) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
[New LWP 100081]
suspend error: generic error
[Switching to LWP 100081]
Stopped due to shared library event
(gdb) Quit

(All other modules removed in extensions.ini except ffmpeg.so)
server2# php -m
[PHP Modules]
date
ffmpeg
libxml
Reflection
standard

[Zend Modules]

Segmentation fault (core dumped)
server2#

server2# ffmpeg -version
FFmpeg version 0.5.1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --prefix=/usr/local --mandir=/usr/local/man
--enable-shared --enable-gpl --enable-swscale --enable-postproc
--enable-avfilter --enable-avfilter-lavf --enable-pthreads
--enable-memalign-hack --cc=cc --extra-cflags=-I/usr/local/include/vorbis
-I/usr/local/include --extra-ldflags=-L/usr/local/lib 
--extra-libs=-pthread --disable-debug --disable-sse --disable-mmx
--disable-libamr-nb --disable-libamr-wb --disable-libdirac --enable-libfaac
--enable-nonfree --enable-libfaad --enable-libfaadbin --disable-ffserver
--disable-libgsm --disable-vhook --disable-ipv6 --enable-libmp3lame
--disable-libopenjpeg --enable-libschroedinger --disable-ffplay
--disable-libspeex --enable-libtheora --enable-libvorbis --disable-x11grab
--enable-libx264 --enable-libxvid
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Mar 23 2010 15:05:42, gcc: 4.2.1 20070719  [FreeBSD]
FFmpeg 0.5.1
libavutil     49.15. 0 / 49.15. 0
libavcodec    52.20. 1 / 52.20. 1
libavformat   52.31. 0 / 52.31. 0
libavdevice   52. 1. 0 / 52. 1. 0
libavfilter    0. 4. 0 /  0. 4. 0
libswscale     0. 7. 1 /  0. 7. 1
libpostproc   51. 2. 0 / 51. 2. 0
server2# 


-- 
Edit bug report at http://bugs.php.net/bug.php?id=51372&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=51372&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=51372&r=trysnapshot53
Try a snapshot (PHP 6.0):            http://bugs.php.net/fix.php?id=51372&r=trysnapshot60
Fixed in SVN:                        http://bugs.php.net/fix.php?id=51372&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51372&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=51372&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=51372&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=51372&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=51372&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=51372&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=51372&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=51372&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=51372&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=51372&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51372&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51372&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=51372&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=51372&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=51372&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=51372&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=51372&r=mysqlcfg



Thread (5 messages)

« previous php.bugs (#148908) next »