php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51753 Installing PECL extensions Memcached causes segfault.
Submitted: 2010-05-06 09:16 UTC Modified: 2010-05-06 13:53 UTC
From: sa at nkvdteam dot ru Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: Irrelevant OS: FreeBSD 7.2-RELEASE
Private report: No CVE-ID: None
 [2010-05-06 09:16 UTC] sa at nkvdteam dot ru
Description:
------------
After installing and enabling memcached.so extension (pecl install mecached), php segfaults on any action (e.g. php -m or php -v):

[root@node ~]# php -v
PHP 5.3.2 (cli) (built: May  5 2010 20:03:50) (DEBUG)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
Segmentation fault: 11 (core dumped)


Disabling all other modules (excl. memcached and session), recompiling php and libxml2, reinstalling memcached.so does not fixes it.

Actual result:
--------------
Backtrace:

(gdb) bt
#0  0x00000008052a4840 in ?? ()
#1  0x0000000800e7e754 in xmlIsMainThread () from /usr/local/lib/libxml2.so.5
#2  0x0000000800e7ddb9 in __xmlLastError () from /usr/local/lib/libxml2.so.5
#3  0x0000000800e10d89 in xmlResetLastError () from /usr/local/lib/libxml2.so.5
#4  0x0000000800e179cf in xmlCleanupParser () from /usr/local/lib/libxml2.so.5
#5  0x0000000000460078 in php_libxml_shutdown () at /usr/ports/lang/php5/work/php-5.3.2/ext/libxml/libxml.c:583
#6  0x0000000000460593 in zm_shutdown_libxml (type=1, module_number=3) at /usr/ports/lang/php5/work/php-5.3.2/ext/libxml/libxml.c:655
#7  0x00000000005d4906 in module_destructor (module=0x801661270) at /usr/ports/lang/php5/work/php-5.3.2/Zend/zend_API.c:2098
#8  0x00000000005dc490 in zend_hash_apply_deleter (ht=0x8bc2e0, p=0x8016c96a0) at /usr/ports/lang/php5/work/php-5.3.2/Zend/zend_hash.c:611
#9  0x00000000005dc60c in zend_hash_graceful_reverse_destroy (ht=0x8bc2e0) at /usr/ports/lang/php5/work/php-5.3.2/Zend/zend_hash.c:646
#10 0x00000000005ca043 in zend_shutdown () at /usr/ports/lang/php5/work/php-5.3.2/Zend/zend.c:759
#11 0x000000000054c9dd in php_module_shutdown () at /usr/ports/lang/php5/work/php-5.3.2/main/main.c:2138
#12 0x00000000006bf4f6 in main (argc=2, argv=0x7fffffffecb8) at /usr/ports/lang/php5/work/php-5.3.2/sapi/cli/php_cli.c:1387

Patches

fix-php-memcache.libxml2.patch (last revision 2010-05-06 07:31 UTC by sa at nkvdteam dot ru)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-06 09:24 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2010-05-06 09:24 UTC] pajoye@php.net
Does it crash without memcached?
 [2010-05-06 09:30 UTC] sa at nkvdteam dot ru
No.

Solution found and patch proposed. Do I need send it to FreeBSD team, or only in this bug?
 [2010-05-06 09:39 UTC] pajoye@php.net
I wonder if it is really a libxml issue, but if it is the case, to report the issue to the libxml developer would be the right way (or freebsd if it is freebsd specific).
 [2010-05-06 09:39 UTC] pajoye@php.net
-Status: Feedback +Status: Bogus
 [2010-05-06 09:39 UTC] pajoye@php.net
But in any case it is not a php bug > bogus.
 [2010-05-06 13:53 UTC] rrichards@php.net
I would first look at the threading in libmemcache. To get a better idea on what 
is causing the crash, you need to use a debug build of libxml2.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 14:01:29 2024 UTC