From root@cyberbotx.com  Mon Feb  5 02:55:38 2007
Return-Path: <root@cyberbotx.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 0BF8F16A400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  5 Feb 2007 02:55:38 +0000 (UTC)
	(envelope-from root@cyberbotx.com)
Received: from samus.cyberbotx.com (c-68-62-97-217.hsd1.mi.comcast.net [68.62.97.217])
	by mx1.freebsd.org (Postfix) with ESMTP id B9BAF13C474
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  5 Feb 2007 02:55:37 +0000 (UTC)
	(envelope-from root@cyberbotx.com)
Received: from localhost (localhost.cyberbotx.com [127.0.0.1])
	by samus.cyberbotx.com (Postfix) with ESMTP id DE22A17231
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  4 Feb 2007 21:35:45 -0500 (EST)
Received: from samus.cyberbotx.com ([127.0.0.1])
	by localhost (samus.cyberbotx.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id ewECKzw34Z2r for <FreeBSD-gnats-submit@freebsd.org>;
	Sun,  4 Feb 2007 21:35:43 -0500 (EST)
Received: from kirby.cyberbotx.com (unknown [192.168.2.2])
	by samus.cyberbotx.com (Postfix) with ESMTP id 4F9731722B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  4 Feb 2007 21:35:43 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
	by kirby.cyberbotx.com (Postfix) with ESMTP id 39A23C2DA
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  4 Feb 2007 21:35:35 -0500 (EST)
Received: from kirby.cyberbotx.com ([127.0.0.1])
	by localhost (kirby.cyberbotx.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 7JRUvlfwSnt9; Sun,  4 Feb 2007 21:34:17 -0500 (EST)
Received: by kirby.cyberbotx.com (Postfix, from userid 0)
	id 3FAE1C159; Sun,  4 Feb 2007 21:34:17 -0500 (EST)
Message-Id: <20070205023417.3FAE1C159@kirby.cyberbotx.com>
Date: Sun,  4 Feb 2007 21:34:17 -0500 (EST)
From: Naram Qashat <cyberbotx@cyberbotx.com>
Reply-To: Naram Qashat <cyberbotx@cyberbotx.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Naram@cyberbotx.com, "Qashat <cyberbotx"@cyberbotx.com
Subject: www/apache22 crashes on graceful reboot, www/php5-session possibly the issue
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         108783
>Category:       ports
>Synopsis:       www/apache22 crashes on graceful reboot, www/php5-session possibly the issue
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    clement
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 05 03:00:50 GMT 2007
>Closed-Date:    Sun Jul 29 13:16:26 GMT 2007
>Last-Modified:  Sun Jul 29 13:16:26 GMT 2007
>Originator:     Naram Qashat
>Release:        FreeBSD 6.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD samus.cyberbotx.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  i386


	
>Description:
	Apache 2.2.4 with PHP 5.2.0 installed crashes when you try to do a graceful reboot.  I was able to get the following gdb stack trace when the crash happened:

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x29269ea8 in __do_global_dtors_aux () from /usr/local/lib/php/20060613/session.so
#2  0x2927033c in _fini () from /usr/local/lib/php/20060613/session.so
#3  0x280b6558 in tls_dtv_generation () from /libexec/ld-elf.so.1
#4  0x280b8558 in ?? () from /libexec/ld-elf.so.1
#5  0xbfbfea58 in ?? ()
#6  0x280997b6 in elf_hash () from /libexec/ld-elf.so.1
#7  0x2809c0a0 in dlclose () from /libexec/ld-elf.so.1
#8  0x28809444 in ?? () from /usr/local/libexec/apache22/libphp5.so
#9  0x28ebcb00 in ?? ()
#10 0xbfbfebdc in ?? ()
#11 0xbfbfeac8 in ?? ()
#12 0x2880939c in ?? () from /usr/local/libexec/apache22/libphp5.so
#13 0x285a1dd3 in sys_nsig () from /lib/libc.so.6
#14 0x28913584 in ?? () from /usr/local/libexec/apache22/libphp5.so
#15 0xbfbfead8 in ?? ()
#16 0x28913e40 in ?? () from /usr/local/libexec/apache22/libphp5.so
#17 0x080ac028 in ?? ()
#18 0xbfbfebdc in ?? ()
#19 0xbfbfead8 in ?? ()
#20 0x288094df in ?? () from /usr/local/libexec/apache22/libphp5.so
#21 0x00000800 in ?? ()
#22 0x284a216c in __JCR_LIST__ () from /usr/local/lib/libapr-1.so.2
#23 0xbfbfeaf8 in ?? ()
#24 0x287fff44 in ?? () from /usr/local/libexec/apache22/libphp5.so
#25 0x28913e40 in ?? () from /usr/local/libexec/apache22/libphp5.so
#26 0x28373e14 in __JCR_LIST__ () from /usr/local/lib/libcrypto.so.5
#27 0x081f1800 in ?? ()
#28 0x282e5db6 in DH_free () from /usr/local/lib/libcrypto.so.5
#29 0x287c8da7 in ?? () from /usr/local/libexec/apache22/libphp5.so
#30 0x081f1800 in ?? ()
#31 0x28643338 in ?? () from /usr/local/libexec/apache22/mod_ssl.so
#32 0xbfbfeb18 in ?? ()
#33 0x287c8e5b in ?? () from /usr/local/libexec/apache22/libphp5.so
#34 0x28643338 in ?? () from /usr/local/libexec/apache22/mod_ssl.so
#35 0x080f2930 in ?? ()
#36 0xbfbfeb38 in ?? ()
#37 0x288798e9 in ?? () from /usr/local/libexec/apache22/libphp5.so
#38 0x289101e0 in php5_module () from /usr/local/libexec/apache22/libphp5.so
#39 0x0809b500 in ?? ()
#40 0x00000000 in ?? ()
#41 0x284a216c in __JCR_LIST__ () from /usr/local/lib/libapr-1.so.2
#42 0x080ac028 in ?? ()
#43 0xbfbfebdc in ?? ()
#44 0xbfbfeb58 in ?? ()
#45 0x28496e69 in run_cleanups () from /usr/local/lib/libapr-1.so.2
Previous frame inner to this frame (corrupt stack?)

This happened on FreeBSD 5.x as well prior to my updating to FreeBSD 6.2.
Once I disable PHP, the crashes go away.  If I leave PHP enabled but disable only the session.so module in /usr/local/etc/php/extensions.ini, the crashes also go away.  Only when session.so is enabled does apache crash on graceful.
>How-To-Repeat:
	Install www/apache22, lang/php5, and www/php5-session, load apache and try to do a graceful restart on it.
	(Not sure if this will make a difference, but I also have devel/bison2 and devel/re2c installed, since PHP uses them but doesn't require them)
>Fix:
	Current fix is to not use the session.so module.  I am unaware of what needs to be done of the session module to fix this.
	Running the run-tests.php script that is inside the work folder of www/php5-session after configuring but without building it shows everything related to the session module failing.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->clement 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Feb 5 03:01:23 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=108783 

From: Scott Larson <stl@ossuary.net>
To: bug-followup@FreeBSD.org,
 cyberbotx@cyberbotx.com
Cc:  
Subject: Re: ports/108783: www/apache22 crashes on graceful reboot, www/php5-session possibly the issue
Date: Wed, 14 Feb 2007 11:52:35 -0800

       I'm seeing this same session related segfault after upgrading  
 from PHP 5.2.0 to 5.2.1, here is the bt:
 
 (gdb) bt
 #0  0x00000000 in ?? ()
 #1  0x29312ea4 in __do_global_dtors_aux ()
     from /usr/local/lib/php/20060613/session.so
 #2  0x293195c4 in _fini () from /usr/local/lib/php/20060613/session.so
 #3  0x28245698 in tls_dtv_generation () from /libexec/ld-elf.so.1
 #4  0x28247698 in ?? () from /libexec/ld-elf.so.1
 #5  0xbfbfe5e8 in ?? ()
 #6  0x282287b6 in elf_hash () from /libexec/ld-elf.so.1
 #7  0x2822b1e0 in dlclose () from /libexec/ld-elf.so.1
 #8  0x08133514 in zend_hash_apply_deleter ()
 #9  0x081335af in zend_hash_graceful_reverse_destroy ()
 #10 0x0812a12c in zend_shutdown ()
 #11 0x080f272b in php_module_shutdown ()
 #12 0x081a5457 in main ()
 (gdb)
 
 --
 Scott Larson
 3704 Midvale Ave., Apt. #2
 Los Angeles, CA  90034
 :mobile: 310.904.8818
 :work: 310.823.8238 x1106
 
 

From: Scott Larson <stl@ossuary.net>
To: bug-followup@FreeBSD.org,
 cyberbotx@cyberbotx.com
Cc:  
Subject: Re: ports/108783: www/apache22 crashes on graceful reboot, www/php5-session possibly the issue
Date: Fri, 16 Feb 2007 17:31:50 -0800

       This has seemingly been resolved by doing a pkg_delete on all  
 of PHP and its associated modules, upgrading 6.2-STABLE to the very  
 latest (at least as of yesterday evening) revision, then building PHP  
 5.2.1 from scratch again.  It's now causing some other problems with  
 certain modules not loading but the segfault from the session module  
 is gone.
 --
 Scott Larson
 3704 Midvale Ave., Apt. #2
 Los Angeles, CA  90034
 :mobile: 310.904.8818
 :work: 310.823.8238 x1106
 
 

From: Scott Larson <stl@iowainteractive.com>
To: bug-followup@FreeBSD.org,
 cyberbotx@cyberbotx.com
Cc:  
Subject: Re: ports/108783: www/apache22 crashes on graceful reboot, www/php5-session possibly the issue
Date: Fri, 16 Feb 2007 17:53:07 -0800

       Final followup from me on this.  The problem is not necessarily  
 with FreeBSD itself, but with the order of the modules in  
 extensions.ini.  Why this would have changed in an upgrade from 5.2.0  
 to 5.2.1, I don't know, but the session related segfault should go  
 away if you move the session module to the top of the file before  
 anything else tries to load.
 -- 
 Scott Larson
 Network Administrator
 IOWA Interactive
 4212 Glencoe Ave
 Marina Del Rey, CA 90292
 
 t 310.823.8238
 f 310.823.7108
 stl@iowainteractive.com
 http://www.iowainteractive.com
 http://www.wiredrive.com
 
 

From: "Naram Qashat" <cyberbotx@cyberbotx.com>
To: <bug-followup@FreeBSD.org>,
	"Scott Larson" <stl@iowainteractive.com>
Cc:  
Subject: Re: ports/108783: www/apache22 crashes on graceful reboot, www/php5-session possibly the issue
Date: Fri, 16 Feb 2007 22:26:09 -0500

 --=======AVGMA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IGdvICANCj4gYXdheSBpZiB5
 b3UgbW92ZSB0aGUgc2Vzc2lvbiBtb2R1bGUgdG8gdGhlIHRvcCBvZiB0aGUgZmlsZSBiZWZvcmUg
 IA0KPiBhbnl0aGluZyBlbHNlIHRyaWVzIHRvIGxvYWQuDQo+IC0tIA0KPiBTY290dCBMYXJzb24N
 Cj4gTmV0d29yayBBZG1pbmlzdHJhdG9yDQo+IElPV0EgSW50ZXJhY3RpdmUNCj4gNDIxMiBHbGVu
 Y29lIEF2ZQ0KPiBNYXJpbmEgRGVsIFJleSwgQ0EgOTAyOTINCj4gDQo+IHQgMzEwLjgyMy44MjM4
 DQo+IGYgMzEwLjgyMy43MTA4DQo+IHN0bEBpb3dhaW50ZXJhY3RpdmUuY29tDQo+IGh0dHA6Ly93
 d3cuaW93YWludGVyYWN0aXZlLmNvbQ0KPiBodHRwOi8vd3d3LndpcmVkcml2ZS5jb20NCj4gDQo+
 IA0KPiANCj4gDQo+IC0tIA0KPiBObyB2aXJ1cyBmb3VuZCBpbiB0aGlzIGluY29taW5nIG1lc3Nh
 Z2UuDQo+IENoZWNrZWQgYnkgQVZHIEZyZWUgRWRpdGlvbi4NCj4gVmVyc2lvbjogNy41LjQ0MSAv
 IFZpcnVzIERhdGFiYXNlOiAyNjguMTguMC82ODkgLSBSZWxlYXNlIERhdGU6IDIvMTUvMjAwNyA1
 OjQwIFBNDQo+IA0KPiA=
 
 --=======AVGMAIL-45D675D1183F=======
 Content-Type: text/plain; x-avg=cert; charset=iso-8859-1
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 Content-Description: "AVG certification"
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.5.441 / Virus Database: 268.18.0/689 - Release Date: 2/15/2007 5:=
 40 PM
 
 --=======AVGMAIL-45D675D1183F=======--
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Sun Jul 29 13:14:27 UTC 2007 
State-Changed-Why:  
Workaround found; not www/apache22 port problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=108783 
>Unformatted:
