Bug 116857

Summary: lang/php5 and php-cgi executables segfault in spl.so during its unloading
Product: Ports & Packages Reporter: Václav Haisman <v.haisman>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Václav Haisman 2007-10-03 09:40:21 UTC
Both CLI and CGI PHP5 executables are segfaulting while they are exiting inside spl.so extension. The backtrace is the following:

#0  0x00000000 in ?? ()
#1  0x2944469c in __do_global_dtors_aux () from /usr/local/lib/php/20060613-debug/spl.so
#2  0x2945c2dc in _fini () from /usr/local/lib/php/20060613-debug/spl.so
#3  0x282b03c0 in ?? () from /libexec/ld-elf.so.1
#4  0x282b0278 in ?? () from /libexec/ld-elf.so.1
#5  0xbfbfca78 in ?? ()
#6  0x2828fa9e in ?? () from /libexec/ld-elf.so.1
#7  0x28292fbf in ?? () from /libexec/ld-elf.so.1
#8  0x282b0278 in ?? () from /libexec/ld-elf.so.1
#9  0xbfbfca78 in ?? ()
#10 0x2829317d in wlock_release () from /libexec/ld-elf.so.1
#11 0x28292883 in dlclose () from /libexec/ld-elf.so.1
#12 0x0819389b in module_destructor (module=0x8379180) at /usr/ports/lang/php5/work/php-5.2.4/Zend/zend_API.c:1918
#13 0x08198a9e in zend_hash_apply_deleter (ht=0x82a2ae0, p=0x838e000) at /usr/ports/lang/php5/work/php-5.2.4/Zend/zend_hash.c:611
#14 0x08198c22 in zend_hash_graceful_reverse_destroy (ht=0x82a2ae0) at /usr/ports/lang/php5/work/php-5.2.4/Zend/zend_hash.c:646
#15 0x0818c62c in zend_shutdown () at /usr/ports/lang/php5/work/php-5.2.4/Zend/zend.c:733
#16 0x0813bf0c in php_module_shutdown () at /usr/ports/lang/php5/work/php-5.2.4/main/main.c:1865
#17 0x0820363f in main (argc=1, argv=0xbfbfed34) at /usr/ports/lang/php5/work/php-5.2.4/sapi/cgi/cgi_main.c:1894


The port is php5-5.2.4_1.

How-To-Repeat: Run php-cgi and press ^D or run php --help. Both segfault with the same backtrace.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-10-03 11:18:49 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2007-10-03 11:21:17 UTC
State Changed
From-To: open->closed

Workaround: try changing extensions order in extensions.ini.