php Segmentation fault (core dumped) in xmlFreeMutex (how to fix)

Skip to first unread message

Steven Hartland

Jun 16, 2011, 7:58:13 AM6/16/11
Just wanted to share the follow so others can avoid the issues:-

Having just rebuilt a clean install of php 5.3.6 it was crashing
left right and center even a php -m caused it.

The stack looks like the following under gdb

#0 0x0000000103db8600 in ?? ()
#1 0x0000000100ce1a95 in xmlFreeMutex () from /usr/local/lib/
#2 0x0000000100ce14d5 in xmlCleanupGlobals () from /usr/local/lib/
#3 0x0000000100c79f4a in xmlCleanupParser () from /usr/local/lib/
#4 0x000000000044daa8 in php_libxml_shutdown ()
#5 0x000000000044dad9 in zm_shutdown_libxml ()
#6 0x000000000055289f in module_destructor ()
#7 0x0000000000559be4 in zend_hash_apply_deleter ()
#8 0x0000000000559e58 in zend_hash_graceful_reverse_destroy ()
#9 0x000000000054dfc8 in zend_shutdown ()
#10 0x00000000004fbb9a in php_module_shutdown ()
#11 0x00000000005d55e2 in main ()
#12 0x0000000000417125 in _start ()

The problem is being caused by libxml2 under FreeBSD being compiled
as threaded by default where as php isn't.

The fix is simple select the LINKTHR option from make config and
recompile php and its modules to be safe.

Would suggest that the php port is updated to reflect this change
to avoid issues in the future.


This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to

_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply all
Reply to author
0 new messages