Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89841 - eaccelerator doesn't work properly with gentoo webapps due to hardlinks
Summary: eaccelerator doesn't work properly with gentoo webapps due to hardlinks
Status: RESOLVED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-20 10:39 UTC by Ed Wildgoose
Modified: 2006-11-14 04:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Wildgoose 2005-04-20 10:39:46 UTC
eaccelerator caches scripts based on the inode of the file rather than the file name.  This is clever in that it doesn't recache hardlinked files, but triggers a subtle problem with the webapps stuff in gentoo when you use vhosts

I noticed this first with two vhost installs of "gallery" which would both show the same content depending which was visited first after a restart of apache / clear eaccelerator cache.  Despite having different config.php files in each case with different date stamps, etc eaccelerator seems to be caching the top level file, noting that it is identical to the version in the other vhost and not reloading it, hence effectively picking up the other config file as well.

I'm suprised no one else has noticed this?

The fix is to edit eaccelerator.h line 56 and comment out the #define to use inodes.

I think that for our purposes it would be best to simply detect if gentoo is set to "USE vhosts" and patch out that line

I don't have time to code this up right now (although arguably I could have done it by the time I wrote this message).  Could someone investigate adding in the relevant test and patching out that #define please.  If no one else does it I might get change in a week or so.

Thanks

Reproducible: Always
Steps to Reproduce:
Comment 1 Sebastian Bergmann (RETIRED) gentoo-dev 2005-05-12 23:24:53 UTC
I would rather have EACCELERATOR_USE_INODE configurable by eAccelerator's configure script than patching it in the ebuild: http://sourceforge.net/tracker/index.php?func=detail&aid=1201159&group_id=122249&atid=692864

However, if UPSTREAM does not respond I will add that patch to the ebuild.
Comment 2 Ed Wildgoose 2005-05-13 02:46:09 UTC
Sounds fine to me.  

Upstream couldn't reproduce using a simple script which did a hard "ln" on two files.  See their bug tracker about the same date as this bug.

There is one possibility that I didn't investigate yet.  On the Gallery readme for the latest 1.5 release they mention that it works better in vhost setups with php accelerators... Possibly it's something in their code which is a bit tricky and causing the problem, but to be honest I scanned the gallery code and it just uses "include()", so I don't see how.

I would vote for a USE flag and at least then there is a clue in the ebuild file if someone else finds a corner case which triggers this issue in the future. (For example they are running under a filesystem which doesn't have the right kind of inodes as stated in the code)

Thanks for looking into this
Comment 3 Sebastian Bergmann (RETIRED) gentoo-dev 2005-05-16 00:23:21 UTC
eAccelerator 0.9.3 will have an --without-eaccelerator-use-inode configure switch that will be controlled by USE=inode in Gentoo.
Comment 4 Ian P. Christian 2006-11-14 04:09:00 UTC
this is NOT resolved.
please re-open

[ebuild   R   ] dev-php5/eaccelerator-0.9.5  USE="session -contentcache -debug -disassembler -sharedmem" 0 kB