Bug 120409 - www/apache20 (7.0-RC1) segfault on HUP w/ some php5 extensions
Summary: www/apache20 (7.0-RC1) segfault on HUP w/ some php5 extensions
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-apache (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-08 14:10 UTC by Andy Hilker
Modified: 2009-05-17 10:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Hilker 2008-02-08 14:10:01 UTC
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`
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-02-08 16:10:58 UTC
Responsible Changed
From-To: freebsd-ports-bugs->clement

Over to maintainer(s).
Comment 2 Andy Hilker 2008-02-25 12:19:02 UTC
I have to correct myself: FreeBSD 6.2 is also affected.
Comment 3 Andy Hilker 2008-02-25 12:57:31 UTC
... 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").
Comment 4 Andy Hilker 2008-02-25 15:42:41 UTC
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
Comment 5 Philip M. Gollucci freebsd_committer freebsd_triage 2008-12-27 20:28:16 UTC
Responsible Changed
From-To: clement->apache

apache team
Comment 6 Martin Wilke freebsd_committer freebsd_triage 2009-05-17 10:06:09 UTC
State Changed
From-To: open->closed

close by submitter request.