Bug 122717 - www/pecl-APC serious fd leak since recent FreeBSD-STABLE update
Summary: www/pecl-APC serious fd leak since recent FreeBSD-STABLE update
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: Marcus Alves Grando
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-13 14:10 UTC by Frank DENIS
Modified: 2008-06-10 16:12 UTC (History)
0 users

See Also:


Attachments
patch-patch-apc_main.c.diff (1.24 KB, patch)
2008-04-22 13:10 UTC, Frank DENIS
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frank DENIS 2008-04-13 14:10:00 UTC
Not sure whether the bug is in pecl-APC (built from ports) or in the base
system.

I used to run lighttpd + php fastcgi + pecl-APC since FreeBSD 7.0-RELEASE
with no issue so far.

The previous -STABLE update was dated Mar 30.

Today, I upgraded to today's (Apr 13) -STABLE.

And now, php-cgi children leak descriptors. Opened PHP files are not closed,
the same files are opened as new descriptors at every request. This can be
confirmed with procstat -f on php-cgi processes.

After a few minutes, more than 100000 descriptors are used and the system
becomes unusable.

Reverting to FreeBSD-STABLE from Mar 30 fixes this. No more than 1000
file descriptors are ever used when the same workload.

Dropping pecl-APC for Xcache is a workaround (and Xcache doesn't exhibit
that behavior), but there's definitely something wrong. Either with the
recent FreeBSD changes or with the APC port.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-04-14 05:26:12 UTC
Responsible Changed
From-To: gnats-admin->mnag

Since we need to pick a category, let's assign this one to 'ports' and 
to the www/pecl-APC maintainer.  It sounds to me as though there might 
be two problems, one in the port and one in the base system.
Comment 2 Marcus Alves Grando freebsd_committer freebsd_triage 2008-04-19 15:05:34 UTC
State Changed
From-To: open->feedback

Can you confirm if you use php4?
Comment 3 Frank DENIS 2008-04-22 09:02:17 UTC
No, it's PHP 5.

All from ports.
Comment 4 Zoltan Frombach 2008-04-22 11:03:31 UTC
It happens on Debian Etch, too. I see this problem with PHP 5.2.5, not PHP4. 
So it is NOT in the FreeBSD base system. It is a bug in APC, first appeared 
in 3.0.17, 3.0.18 is also affected.



Zoltan
Comment 5 Frank DENIS 2008-04-22 13:10:00 UTC
Le Tue, Apr 22, 2008 at 12:03:31PM +0200, Zoltan Frombach ecrivait :
> It happens on Debian Etch, too. I see this problem with PHP 5.2.5, not 
> PHP4. So it is NOT in the FreeBSD base system. It is a bug in APC, first 
> appeared in 3.0.17, 3.0.18 is also affected.

  The bug is actually in a FreeBSD patch that imports a bogus diff from the APC
CVS tree.

  Here's the fix. PHP 5 doesn't leak descriptors any more.

  Best regards,
  
-- 
Frank Denis - j [at] pureftpd.org - NSI / Young Nails / CND nail tech
http://forum.manucure.info - http://www.manucure-pro.com - http://00f.net
Comment 6 Frank DENIS 2008-04-22 15:13:50 UTC
  Well, this is a known issue:
  
http://pecl.php.net/bugs/bug.php?id=13542
Comment 7 bjb 2008-05-16 07:51:44 UTC
There is a new version available 3.0.19 which fixes the filedescriptor bug.
And chance there will be a port update soon?
Comment 8 Marcus Alves Grando freebsd_committer freebsd_triage 2008-06-10 16:12:45 UTC
State Changed
From-To: feedback->closed

Updated to 3.0.19 to solve this problem. Thanks.