php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59993 apc_sma_info output differs at random
Submitted: 2011-10-05 13:49 UTC Modified: 2011-10-05 14:33 UTC
From: mtillmann at gmail dot com Assigned:
Status: Not a bug Package: APC (PECL)
PHP Version: 5.3.2 OS: Ubuntu 10.04.3
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mtillmann at gmail dot com
New email:
PHP Version: OS:

 

 [2011-10-05 13:49 UTC] mtillmann at gmail dot com
Description:
------------
apc.php's charts and info show different results at random 
on a dev vm that I use alone. Obviously files are cached but 
the amount of used cache, hits and misses differs at random. 
More precisely, the number of elements in the blocklists 
part of the output jumps from 2 to 5. Output on the same 
instance for two requests:


array(4) {
  ["num_seg"]=>
  int(1)
  ["seg_size"]=>
  float(134217648)
  ["avail_mem"]=>
  float(123928136)
  ["block_lists"]=>
  array(1) {
    [0]=>
    array(2) {
      [0]=>
      array(2) {
        ["size"]=>
        int(608)
        ["offset"]=>
        int(9728536)
      }
      [1]=>
      array(2) {
        ["size"]=>
        int(123927504)
        ["offset"]=>
        int(10290176)
      }
    }
  }
}

---> says ~9mb are used


array(4) {
  ["num_seg"]=>
  int(1)
  ["seg_size"]=>
  float(134217648)
  ["avail_mem"]=>
  float(105328560)
  ["block_lists"]=>
  array(1) {
    [0]=>
    array(5) {
      [0]=>
      array(2) {
        ["size"]=>
        int(608)
        ["offset"]=>
        int(28074992)
      }
      [1]=>
      array(2) {
        ["size"]=>
        int(440)
        ["offset"]=>
        int(25959000)
      }
      [2]=>
      array(2) {
        ["size"]=>
        int(552)
        ["offset"]=>
        int(24897352)
      }
      [3]=>
      array(2) {
        ["size"]=>
        int(1656)
        ["offset"]=>
        int(28071152)
      }
      [4]=>
      array(2) {
        ["size"]=>
        int(105325280)
        ["offset"]=>
        int(28892400)
      }
    }
  }
}

---> says 27mb are used

Reproduce code:
---------------
<?php
//try this a couple of times
$mem=apc_sma_info();
echo '<pre>';
var_dump( $mem );
?>

Expected result:
----------------
I expect to get the same results for every call, or at least 
somewhat similar results

Actual result:
--------------
completely different values which confuse and annoy me!

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-05 14:33 UTC] mtillmann at gmail dot com
I just created a new machine with 100% identical setup specs 
using blueprint and the "bug" does not appear any more. 
Changed status to bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 21:01:27 2024 UTC