php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
37 - 15 = ?
Subscribe to this entry?

 
 [2007-01-29 15:53 UTC] david at acz dot org
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] shire@php.net
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] shire@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 02:01:30 2024 UTC