php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58861 Potential cache slam averted for key
Submitted: 2009-09-18 12:00 UTC Modified: 2009-09-22 06:26 UTC
From: need4spam at bk dot ru Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.2.10 OS: FreeBSD 7.2 amd64
Private report: No CVE-ID: None
 [2009-09-18 12:00 UTC] need4spam at bk dot ru
Description:
------------
FreeBSD 7.2 amd64, php 5.2.10 + php-fpm patch. 

When using newest versions of APC from svn we got sunch of such logs on our system.

Sep 18 19:46:28.378063 [WARNING] fpm_stdio_child_said(), line 167: child 27221 (pool default) said into stderr: "[Fri Sep 18 19:46:28 2009] [apc-warning] "
Sep 18 19:46:28.379240 [WARNING] fpm_stdio_child_said(), line 167: child 27221 (pool default) said into stderr: "Potential cache slam averted for key 'topic_views' in /var/example.org/forum/viewtopic.php on line 1029."
Sep 18 19:46:28.406124 [WARNING] fpm_stdio_child_said(), line 167: child 27211 (pool default) said into stderr: "[Fri Sep 18 19:46:28 2009] [apc-warning] "
Sep 18 19:46:28.406886 [WARNING] fpm_stdio_child_said(), line 167: child 27211 (pool default) said into stderr: "Potential cache slam averted for key 'topic_views' in /var/example.org/forum/viewtopic.php on line 1029."
Sep 18 19:46:28.833927 [WARNING] fpm_stdio_child_said(), line 167: child 27219 (pool default) said into stderr: "[Fri Sep 18 19:46:28 2009] [apc-warning] Potential cache slam averted for key 'sid_b70a7d220ed51eca7bc205350db822fb' in /var/example.org/forum/includes/sessions.php on line 253."
Sep 18 19:46:29.078507 [WARNING] fpm_stdio_child_said(), line 167: child 27216 (pool default) said into stderr: "[Fri Sep 18 19:46:29 2009] [apc-warning] Potential cache slam averted for key 'sid_e79d15367c8bd384a3ddeb856b8ebe70' in /var/example.org/forum/includes/sessions.php on line 253."

We tried compiling APC with:
./configure --enable-apc-spinlocks --enable-apc-mmap 
and
./configure --enable-apc-mmap 
........same effect

APC working, but don't update any data so our users can't login. 
Setting slam_defense=0 doesn't help.

Downgrade to 3.0.19 solves the problem.

Similar problem here
http://pecl.php.net/bugs/bug.php?id=16814 
May be its FreeBSD-specific?



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-22 06:25 UTC] gopalv82 at yahoo dot com
It's actually a feature, which prevents you from inserting the same key multiple times with-in the same second.

Have put in a switch to turn it on & off

http://news.php.net/php.pecl.cvs/12914

apc.slam_defense = Off; 

will let you insert the same key repeatedly in the same second. But remember that in case you turn it off, an apc cache slam might max out your CPU like so 

http://t3.dotgnu.info/blog/php/user-cache-timebomb
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed May 22 18:01:28 2019 UTC