|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58434 php-fcgi segfault when cache fills
Submitted: 2008-11-26 10:54 UTC Modified: 2009-05-05 14:49 UTC
From: oliver at realtsp dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.2.5 OS: FreeBSD 7.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: oliver at realtsp dot com
New email:
PHP Version: OS:


 [2008-11-26 10:54 UTC] oliver at realtsp dot com

php-fcgi 5.2.6 (not 5.2.5 as above, need to add that as an
option ;-)
lighttpd 1.4.19

apc compiled with mmap memory, IPC semaphore locking.

enough php code to fill the cache
apc.shm_size=30 (make it small enough so that the code for
one request cannot fit, yes we do have 30MB of code in one
apc.ttl=10 (any value >0)

php-fcgi segfaults on every request which "overfills" the
cache. the cache full count after such a request proces the

APC-3.0.19 does not segfault under the same conditions.

A similar problem occurs when apc.ttl=0 (ie complete clean
on cache_full) but in this case you must hit the cache with
some concurrency (we are running on an 8cpu-core machine so
the concurrency is quite real). siege of 15 concurrent users
is sufficient to produce the segfault after a few seconds in
our setup.

We realise that these are extreme conditions (ie we have a
cache size which is really too small for the code), however
on our production machines which have enough cache 99% of
time, but do require cache_expunge occasionally (once per
week perhaps) we also get the same problem. We have reduced
the problem to something we can reproduce reliably in a
short period of time by making the conditions extreme.

Reproduce code:
hit once to overfill cache and observe segfault

Expected result:
no segfault

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-30 05:41 UTC] gopalv82 at yahoo dot com
re-doing random slam tests with cache overfills, I'll see what breaks.
 [2009-01-20 07:35 UTC] oliver at realtsp dot com
Hi gopalv

Did you manage to do any tests/reproduce the problem. We are available to retest if required.
 [2009-03-17 00:37 UTC]
Can you please re-test the latest CVS?
 [2009-05-05 14:49 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Sep 30 22:05:55 2022 UTC