|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57498 APC returns wrong file
Submitted: 2007-01-29 15:53 UTC Modified: 2009-02-16 20:22 UTC
From: david at acz dot org Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.2.0 OS: SuSE Linux 9.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 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: david at acz dot org
New email:
PHP Version: OS:


 [2007-01-29 15:53 UTC] david at acz dot org
I just ran into a case where APC was running the wrong file for the requested URL.

URL /foo.php returned output for /bar.php
URL /bar.php returned output for /blah.php
URL /blah.php returned the correct output

None of the requested files have changed in over two weeks.    The filesystem is ext3 mounted locally.

Looking at the output from apc_cache_info(), the filenames and inodes did not match.  foo.php has inode 1234, but apc_cache_info() showed bar.php's inode as 1234.

Related to #5600, I used gdb to look at the output of sapi_get_stat() and it returns the correct inode for foo.php when foo.php is requested.

I saved a core dump of an Apache child process immediately after sapi_get_stat() returns, but afterwards we had to restart Apache as this is a production machine.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-29 16:00 UTC] david at acz dot org
I found #9482 after I filed this.  I forgot to mention this shared detail: when foo.php is requested but bar.php is returned, apc_cache_info() shows a hit to bar.php.
 [2007-01-29 16:01 UTC] david at acz dot org
Updated PHP version
 [2007-02-06 19:24 UTC]
You say that none of the requested files have changed in over two weeks, but even if the files haven't changed it would seem that they have probably been rewritten to disk to have their inode numbers change.  Are these getting regularly updated with something like rsync, svn/cvs/? up, etc?  

What version of APC are you using?  The latest cvs has an option to turn on creation time rather than modified time stamps this way if the files get recreated with something like rsync it will re-add them to the cache (note that this will cost you some performance if the ctime changes often, so it would be prefered not to update these files unless they have in fact changed). apc.stat_ctime=[On|Off]
 [2009-02-16 20:22 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: Wed Sep 28 12:05:52 2022 UTC