php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59008 system cache entries are all deleted with no active entries at all
Submitted: 2009-12-24 08:54 UTC Modified: 2016-08-31 15:24 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: gil at metacafe dot com Assigned: cmb (profile)
Status: Wont fix Package: APC (PECL)
PHP Version: 5.3.0 OS: RH4
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-12-24 08:54 UTC] gil at metacafe dot com
Description:
------------
There are cases in which the APC active entries are empty 
and the deleted are full , but no new entries are added to the active list.



see also http://pecl.php.net/bugs/bug.php?id=16991
which might be related

Reproduce code:
---------------
it's quite hard to find the exact reproduce code 
but it's happen when the APC near it's full capacity 
and need to do a lot of purging.

Expected result:
----------------
2009-12-22T13:24:40+00:00
Array
(
    [num_slots] => 2000
    [ttl] => 0
    [num_hits] => 74213972
    [num_misses] => 2577
    [num_inserts] => 2007
    [expunges] => 0
    [start_time] => 1261472217
    [mem_size] => 61199400
    [num_entries] => 945
    [file_upload_progress] => 1
    [memory_type] => mmap
    [locking_type] => pthread mutex
    [cache_list] => Array
        (
            [0] => Array
                (
                    [filename] => XXXXXXXXXXXX.php
                    [device] => 26629
                    [inode] => 15189369
                    [type] => file
                    [num_hits] => 437353
                    [mtime] => 1260261665
                    [creation_time] => 1261472217
                    [deletion_time] => 0
                    [access_time] => 1261488279
                    [ref_count] => 10
                    [mem_size] => 49320
                )

            [1] => Array
                (
                    [filename] => XXXXXXXXXXXXXXXX.php
                    [device] => 26629
                    [inode] => 15189366
                    [type] => file
                    [num_hits] => 433641
                    [mtime] => 1258974387
                    [creation_time] => 1261472217
                    [deletion_time] => 0
                    [access_time] => 1261488279
                    [ref_count] => 10
                    [mem_size] => 103304
                )

	    ................................................................

            [944] => Array
                (
                    [filename] => XXXXXXXXXXXXXXXXXXXXXX.php
                    [device] => 26629
                    [inode] => 16041371
                    [type] => file
                    [num_hits] => 48
                    [mtime] => 1258974388
                    [creation_time] => 1261472224
                    [deletion_time] => 0
                    [access_time] => 1261487874
                    [ref_count] => 0
                    [mem_size] => 8360
                )

        )

    [deleted_list] => Array
        (
        )

)



Actual result:
--------------
2009-12-23T14:49:04+00:00
Array
(
    [num_slots] => 2000
    [ttl] => 0
    [num_hits] => 528372796
    [num_misses] => 277432705
    [num_inserts] => 30064
    [expunges] => 89442777
    [start_time] => 1261396534
    [mem_size] => 0
    [num_entries] => 0
    [file_upload_progress] => 1
    [memory_type] => mmap
    [locking_type] => pthread mutex
    [cache_list] => Array
        (
        )

    [deleted_list] => Array
        (
            [0] => Array
                (
                    [filename] => XXXXXXX.php
                    [device] => 2053
                    [inode] => 30905948
                    [type] => file
                    [num_hits] => 1020
                    [mtime] => 1261512931
                    [creation_time] => 1261512933
                    [deletion_time] => 1261513058
                    [access_time] => 1261513058
                    [ref_count] => 0
                    [mem_size] => 24744
                )

            [1] => Array
                (
                    [filename] => XXXXXXX.php
                    [device] => 2053
                    [inode] => 33721961
                    [type] => file
                    [num_hits] => 252761
                    [mtime] => 1260113407
                    [creation_time] => 1261493727
                    [deletion_time] => 1261513058
                    [access_time] => 1261513058
                    [ref_count] => 0
                    [mem_size] => 74408
                )

           	......................................................................................

            [527] => Array
                (
                    [filename] => XXXXXXX.php
                    [device] => 2053
                    [inode] => 33721944
                    [type] => file
                    [num_hits] => 1
                    [mtime] => 1260113407
                    [creation_time] => 1261513076
                    [deletion_time] => 1261513076
                    [access_time] => 1261513076
                    [ref_count] => 0
                    [mem_size] => 24872
                )

        )

)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-27 10:13 UTC] gil at metacafe dot com
when increasing the memory from 64M to 128M 
I have noticed that the problem does not repeating,
but I have also noticed high fragmentation rate,
which can get up to 10%

example :
Fragmentation: 2.99% ( 2.1 MBytes out of 68.7 MBytes in 103 fragments)
 [2009-12-30 03:48 UTC] gil at metacafe dot com
another elaboration is that after memory increment 
we can see that the memory consumption is a bit more than 
64M.

"Host Status Diagrams
Memory Usage
(multiple slices indicate fragments) 	Hits & Misses
 Free: 61.8 MBytes (48.3%) 	 Hits: 813613809 (100.0%)
 Used: 66.2 MBytes (51.7%) 	 Misses: 16266 (0.0%)

Detailed Memory Usage and Fragmentation
Fragmentation: 11.13% ( 6.9 MBytes out of 61.8 MBytes in 194 fragments)"

we are also using OPENX in order to serve advertisements,
the invocation is done via PHP , and the APC is storing the
delivery cache files of the OPENX.

so I assume that the bug is caused when the APC memory utilization is near it's top, and the OPENX is generating 
some other delivery cache files,

anyhow the APC should not get to a stage that all of the files are deleted and it does not fill the cache list at all
 [2016-08-31 15:24 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2016-08-31 15:24 UTC] cmb@php.net
According to <https://bugs.php.net/69618>, APC support has been
discontinued in favor of OPcache, APCu, the session upload
progress API and WinCache. Therefore this issue won't get fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC