php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59400 core dump
Submitted: 2010-09-06 16:06 UTC Modified: 2012-03-07 17:44 UTC
From: ken73 dot chen at gmail dot com Assigned: andrei (profile)
Status: Closed Package: memcached (PECL)
PHP Version: 5.3.2 OS: FreeBSD 7.2
Private report: No CVE-ID: None
 [2010-09-06 16:06 UTC] ken73 dot chen at gmail dot com
Description:
------------
core dump on FreeBSD 7.2-RELEASE-p3

Install with FreeBSD ports:

#cd /usr/ports/lang/php5
#make all install
#cd /usr/ports/database/pecl-memcached
#make all install

#php -m

[PHP Modules]
Core
date
ereg
json
libxml
memcached
pcre
Reflection
session
SPL
standard
xml

[Zend Modules]

Segmentation fault (core dumped)

I try on some machines, there are no problem on FreeBSD 6.3 and 8.0.


Actual result:
--------------
db4# php -v
PHP 5.3.3 (cli) (built: Sep  7 2010 03:45:59) (DEBUG)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
Segmentation fault (core dumped)
db4# gdb /usr/local/bin/php php.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.4...done.
Loaded symbols for /lib/libcrypt.so.4
Reading symbols from /usr/local/lib/libpcre.so.0...done.
Loaded symbols for /usr/local/lib/libpcre.so.0
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /lib/libz.so.4...done.
Loaded symbols for /lib/libz.so.4
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x000000007b5647b0 in ?? ()
(gdb) frame 4
#4  0x000000000045f2e8 in php_libxml_shutdown () at /usr/ports/lang/php5/work/php-5.3.3/ext/libxml/libxml.c:583
583			xmlCleanupParser();
(gdb) 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-06 16:09 UTC] ken73 dot chen at gmail dot com
This problem happened on my 3 FreeBSD 7 machines.
 [2010-09-06 23:13 UTC] andrei@php.net
Why do you think this is a memcached extension issue? The 
backtrace shows the problem is in the libxml.
 [2010-09-07 03:43 UTC] ken73 dot chen at gmail dot com
It does confuse me. The problem only occur when memcached 
extension is loaded. I should also do a bug report to libxml.
 [2010-09-07 18:59 UTC] ken73 dot chen at gmail dot com
http://bugs.php.net/bug.php?id=52792

They say I should report the bug here.
 [2010-12-01 22:02 UTC] eyecue at gmail dot com
Confirming on:

FreeBSD 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 07:18:07 UTC 2009     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

With:

php-suhosin-0.9.32.1                =   up-to-date with port
php-xdebug-2.1.0                    =   up-to-date with port
php5-5.3.3_2                        =   up-to-date with port
php5-ctype-5.3.3_2                  =   up-to-date with port
php5-curl-5.3.3_2                   =   up-to-date with port
php5-dom-5.3.3_2                    =   up-to-date with port
php5-extensions-1.4                 =   up-to-date with port
php5-filter-5.3.3_2                 =   up-to-date with port
php5-ftp-5.3.3_2                    =   up-to-date with port
php5-gd-5.3.3_2                     =   up-to-date with port
php5-hash-5.3.3_2                   =   up-to-date with port
php5-iconv-5.3.3_2                  =   up-to-date with port
php5-json-5.3.3_2                   =   up-to-date with port
php5-mysql-5.3.3_2                  =   up-to-date with port
php5-openssl-5.3.3_2                =   up-to-date with port
php5-session-5.3.3_2                =   up-to-date with port
php5-simplexml-5.3.3_2              =   up-to-date with port
php5-soap-5.3.3_2                   =   up-to-date with port
php5-tokenizer-5.3.3_2              =   up-to-date with port
php5-xml-5.3.3_2                    =   up-to-date with port
php5-zlib-5.3.3_2                   =   up-to-date with port

and:

libmemcached-0.44                   =   up-to-date with port
memcached-1.4.5_1                   =   up-to-date with port
pecl-memcache-3.0.5                 =   up-to-date with port
pecl-memcached-1.0.2                =   up-to-date with port

Identical symptoms as original report:

extension=memcached.so BEFORE extension=session.so:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/memcached.so' - /usr/local/lib/php/20090626/memcached.so: Undefined symbol "php_session_create_id" in Unknown on line 0

extension=memcached.so AFTER extension=session.so:

Program terminated with signal 11, Segmentation fault.

gdb reports a different 'responsible' extension each time, even after disabling them one by one in extensions.ini.

First attempted to portmaster -f 'php5-*' to rebuild all extensions with no success.

Happy to provide more information if you can offer direction on how to acquire it.

We are currently blocked migrating from pecl-memcache -> pecl-memcached on this issue, happy to help fix it.
 [2011-03-27 09:37 UTC] acrismaru at gmail dot com
Problem solved after rebuilding php with option LINKTHR:
LINKTHR=off (default) "Link thread lib (for threaded extensions)"
pecl-memcached is threaded extension...
 [2011-07-05 23:25 UTC] zvkccdih at dyolnvbi dot com
Well put, sir, well put. I'll cretailny make note of that.
 [2012-03-07 17:44 UTC] andrei@php.net
-Status: Analyzed +Status: Closed -Assigned To: +Assigned To: andrei
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 15:01:23 2020 UTC