Bug 146349

Summary: textproc/libxml2 causes php with memcached to crash
Product: Ports & Packages Reporter: Nikita <differentlocal>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Nikita 2010-05-06 08:50:03 UTC
http://bugs.php.net/bug.php?id=51753

libXML from /usr/ports/textproc/libxml2 + php from /usr/ports/lang/php5 + memcached from /usr/ports/databases/pecl-memcaced = crash :)

I propose patch to fix it (in attachment), but I dont know is this best way, or my patch may break other software?

Fix: Use a patch in attachment.

Patch attached with submission follows:
How-To-Repeat: 1) Install PHP 5.3.0 from ports.
2) Install pecl-memcached from ports (or directly from PECL, using pecl install memcached) with sessions support.
3) Run any operation, like php -m or php -v.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-05-06 16:11:46 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer(s).
Comment 2 Patrick Proniewski 2010-05-12 19:49:46 UTC
I've the same problem here, on 7.3 Release, no memcached.
I had to remove the last part of /usr/ports/textproc/libxml2/files/ 
patch-configure in order to get a stable PHP.

$ uname -a
FreeBSD mybox 7.3-RELEASE FreeBSD 7.3-RELEASE #0: Sun Mar 21 06:15:01  
UTC 2010     root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC   
i386

$ php -v
PHP 5.3.2 with Suhosin-Patch (cli) (built: May 12 2010 16:56:31)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

related ports:

	libxml2-2.7.7

	pecl-fileinfo-1.0.4
	pecl-pdflib-2.1.7
	perl-5.10.1_1
	php5-5.3.2
	php5-bcmath-5.3.2
	php5-bz2-5.3.2
	php5-calendar-5.3.2
	php5-ctype-5.3.2
	php5-curl-5.3.2
	php5-dom-5.3.2
	php5-exif-5.3.2
	php5-extensions-1.4
	php5-filter-5.3.2
	php5-ftp-5.3.2
	php5-gd-5.3.2
	php5-gettext-5.3.2
	php5-hash-5.3.2
	php5-iconv-5.3.2
	php5-json-5.3.2
	php5-ldap-5.3.2
	php5-mbstring-5.3.2
	php5-mcrypt-5.3.2
	php5-mysql-5.3.2
	php5-mysqli-5.3.2
	php5-openssl-5.3.2
	php5-pdo-5.3.2
	php5-pdo_sqlite-5.3.2
	php5-posix-5.3.2
	php5-readline-5.3.2
	php5-session-5.3.2
	php5-simplexml-5.3.2
	php5-soap-5.3.2
	php5-sockets-5.3.2
	php5-sqlite-5.3.2
	php5-tokenizer-5.3.2
	php5-xml-5.3.2
	php5-xmlreader-5.3.2
	php5-xmlrpc-5.3.2
	php5-xmlwriter-5.3.2
	php5-xsl-5.3.2
	php5-zip-5.3.2
	php5-zlib-5.3.2
Comment 3 sergey 2010-05-21 16:17:52 UTC
Please, commit patch from Nikita. It fixed crash of libxslt for me.


Program terminated with signal 11, Segmentation fault.
.....
(gdb) bt
#0  0x0000000043bb3269 in ?? ()
#1  0x00000000410d5c00 in xmlNewMutex () from /usr/local/lib/libxml2.so.5
#2  0x0000000040f1aaa2 in xsltInitGlobals () from 
/usr/local/lib/libxslt.so.2
#3  0x0000000040f0d580 in xsltParseStylesheetFile () from 
/usr/local/lib/libxslt.so.2

7.2-RELEASE-p6 #6 r203296M: Sun Jan 31 21:38:50 EET 2010 amd64
Comment 4 Jeremy Messenger freebsd_committer freebsd_triage 2010-06-24 20:38:19 UTC
Responsible Changed
From-To: gnome->ale

Change from gnome to ale. Can you help us with this threads issue? I don't 
understand and know what's going on with your change of threads stuff in 
the libxml2 and other PHP modules.
Comment 5 Alex Dupre freebsd_committer freebsd_triage 2010-06-25 08:44:53 UTC
State Changed
From-To: open->feedback

Disabling thread-safety in libxml2 is not the right fix. 
The issue is that libmemcached is a multi-threaded library, 
while PHP is not linked with libthr and call dlopen/dlclose on it. 
Try compiling PHP with the new LINKTHR option.
Comment 6 Alex Dupre freebsd_committer freebsd_triage 2010-08-31 15:35:35 UTC
State Changed
From-To: feedback->closed

No feedback provided, should be fixed anyway.