From nobody@FreeBSD.org  Fri Feb  8 14:07:39 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4C7F816A417
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  8 Feb 2008 14:07:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 3AEAF13C4D3
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  8 Feb 2008 14:07:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m18E5Viv018916
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 8 Feb 2008 14:05:31 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m18E5VMi018915;
	Fri, 8 Feb 2008 14:05:31 GMT
	(envelope-from nobody)
Message-Id: <200802081405.m18E5VMi018915@www.freebsd.org>
Date: Fri, 8 Feb 2008 14:05:31 GMT
From: Andy Hilker <ah@crypta.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ( 7.0-RC1) segfault on HUP with apache20 + some php5 extensions 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         120409
>Category:       ports
>Synopsis:       www/apache20 (7.0-RC1) segfault on HUP w/ some php5 extensions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 08 14:10:01 UTC 2008
>Closed-Date:    Sun May 17 09:06:10 UTC 2009
>Last-Modified:  Sun May 17 09:06:10 UTC 2009
>Originator:     Andy Hilker
>Release:        7.0-RC1
>Organization:
>Environment:
7.0-RC1 FreeBSD 7.0-RC1 #0: Mon Dec 24 10:10:07 UTC 2007     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Consider the following setup:
- 7.0-RC1
- apache-2.0.63
- php5-5.2.5_1 with extensions: openssl or ftp or mhash

Then hupping the apache will not longer work:
kill -1 `cat /var/run/httpd.pid`

-- httpd-error.log --
[notice] SIGHUP received.  Attempting to restart
[notice] seg fault or similar nasty error detected in the parent process
-- httpd-error.log --


More information:
- On 6.2 machines, i can not repeat this error.

- Not having any of those 3 modules (openssl, ftp, mhash) will avoid the problem (other php5 modules i am using work fine)

>How-To-Repeat:
It is enough if you have 
- 7.0-RC1 (amd64)
- apache-2.0.63
- php5-5.2.5_1 with at least on of (openssl, ftp, mhash) extension

kill -1 `cat /var/run/httpd.pid`
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->clement 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Feb 8 16:10:58 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer(s). 

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

From: Andy Hilker <ah@crypta.net>
To: bug-followup@FreeBSD.org, ah@crypta.net
Cc:  
Subject: Re: ports/120409: (7.0-RC1) segfault on HUP with www/apache20 + some php5 extensions
Date: Mon, 25 Feb 2008 13:19:02 +0100

 I have to correct myself: FreeBSD 6.2 is also affected.

From: ah@crypta.net
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/120409: (7.0-RC1) segfault on HUP with www/apache20 + some php5 extensions
Date: Mon, 25 Feb 2008 13:57:31 +0100

 ... and it happens on i386 (not only amd64) with latest port (which
 contains the latest Makefile version with "Workaround a sh segfault
 on 6-STABLE").

From: ah@crypta.net
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/120409: (7.0-RC1) segfault on HUP with www/apache20 + some php5 extensions
Date: Mon, 25 Feb 2008 16:42:41 +0100

 Hi Clement,
 
 You (Clement Laforet) wrote:
 > Hi Andy,
 > 
 > On Mon, Feb 25, 2008 at 01:41:19PM +0100, Andy Hilker wrote:
 > > I have seen your last commit message for this port:
 > >     - Workaround a sh segfault on 6-STABLE
 > > 
 > > and just want to inform you that the PR 120409 is still valid. I
 > > got the same problem on i386/FreeBSD6.2 and amd64/FreeBSD7 with the
 > > latest commit from feb. 8th.
 > 
 > It was not intended to fix your segfault. It's only at configure time.
 > your problem is a long standing one: it's a problem with php dynamic 
 > linker.
 > when PHP module is loaded, it tries to resolves its extensions 
 > symbols and it fails. The workaround is to find the correct loading 
 > order, but some extensions tend to conflict each others.
 
 
 Thanks for your answer.
 
 The problem on 6.2/i386 seems to be related to
         http://www.freebsd.org/cgi/query-pr.cgi?pr=115893
 
 If I use the patch
 (http://www.freebsd.org/cgi/query-pr.cgi?prp=115893-1-diff&n=/patch-1.diff)
 I get the segmentation fault on HUP. If I use the workaround for
 php5-ffmpeg (remove --enable-pthreads from multimedia/ffmpeg/Makefile)
 everything works.
 
 
 The problem on 7.0/amd64 occured after upgrading php5+apache (nothing
 else was changed), but ok, i have solved it by changing to apache22.
 I can not test anymore if changing the order in extensions.ini would
 have any effect.
 
 I think you can close ports/120409 and I will update the PR 115893.
 
 regards,
 andy
Responsible-Changed-From-To: clement->apache 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Sat Dec 27 20:28:16 UTC 2008 
Responsible-Changed-Why:  
apache team 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120409 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Sun May 17 09:06:09 UTC 2009 
State-Changed-Why:  
close by submitter request. 

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