Last modified: 2014-10-30 16:19:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73343, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71343 - HHVM looks for config in /usr/etc/hhvm rather than /etc/hhvm
HHVM looks for config in /usr/etc/hhvm rather than /etc/hhvm
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
wmf-deployment
All All
: High normal (vote)
: ---
Assigned To: Giuseppe Lavagetto
: hhvm
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-26 05:28 UTC by Bryan Davis
Modified: 2014-10-30 16:19 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bryan Davis 2014-09-26 05:28:30 UTC
Our puppet config expects hhvm config files to be looked up in /etc/hhhvm but the latest build () is looking in /usr/etc/hhvm instead.

`strace hhvm hello.php` shows:

  access("/usr/etc/hhvm/php.ini", R_OK)   = -1 ENOENT (No such file or directory)
  access("/usr/etc/hhvm/config.hdf", R_OK) = -1 ENOENT (No such file or directory)

This is causing the jobrunner to fail with this error in MediaWiki-Vagrant:

  Failed to initialize central HHBC repository:
    Failed to open /var/www/.hhvm.hhbc: 14 - unable to open database file

This is because our config files aren't being read. It will probably break the production jobrunner in a similar way.
Comment 1 Bryan Davis 2014-09-26 21:10:36 UTC
Partially fixed in 3.3.0-20140925+wmf2:

$ strace php hello.php 2>&1 | grep '/etc/hhvm'
access("/etc/hhvm/php.ini", R_OK)       = 0
access("/etc/hhvm/config.hdf", R_OK)    = 0
open("/etc/hhvm/php.ini", O_RDONLY)     = 4
stat("/etc/hhvm/config.hdf", {st_mode=S_IFREG|0644, st_size=139, ...}) = 0
open("/etc/hhvm/config.hdf", O_RDONLY)  = 4
open("/etc/hhvm/php.ini", O_RDONLY)     = 4
open("/etc/hhvm/config.hdf", O_RDONLY)  = 4
open("/etc/hhvm/php.ini", O_RDONLY)     = 7
open("/etc/hhvm/config.hdf", O_RDONLY)  = 7

$ strace hhvm hello.php 2>&1 | grep '/etc/hhvm'
access("/usr/etc/hhvm/php.ini", R_OK)   = -1 ENOENT (No such file or directory)
access("/usr/etc/hhvm/config.hdf", R_OK) = -1 ENOENT (No such file or directory)

In this test, `php` id /usr/bin/php -> /etc/alternatives/php -> /usr/bin/hhvm

This should be enough to fix the jobrunner, but is still not completely optimal.
Comment 2 Bryan Davis 2014-10-30 16:19:00 UTC
Retested with hhvm build 3.3.0+dfsg1-1+wm1:

$ strace php hello.php 2>&1 | grep '/etc/hhvm'
access("/etc/hhvm/php.ini", R_OK)       = 0
access("/etc/hhvm/config.hdf", R_OK)    = 0
open("/etc/hhvm/php.ini", O_RDONLY)     = 4
stat("/etc/hhvm/config.hdf", {st_mode=S_IFREG|0644, st_size=139, ...}) = 0
open("/etc/hhvm/config.hdf", O_RDONLY)  = 4
open("/etc/hhvm/php.ini", O_RDONLY)     = 4
open("/etc/hhvm/config.hdf", O_RDONLY)  = 4
open("/etc/hhvm/php.ini", O_RDONLY)     = 8
open("/etc/hhvm/config.hdf", O_RDONLY)  = 8

$ strace hhvm hello.php 2>&1 | grep '/etc/hhvm'
access("/etc/hhvm/php.ini", R_OK)       = 0
access("/etc/hhvm/config.hdf", R_OK)    = 0
open("/etc/hhvm/php.ini", O_RDONLY)     = 4
stat("/etc/hhvm/config.hdf", {st_mode=S_IFREG|0644, st_size=139, ...}) = 0
open("/etc/hhvm/config.hdf", O_RDONLY)  = 4
open("/etc/hhvm/php.ini", O_RDONLY)     = 4
open("/etc/hhvm/config.hdf", O_RDONLY)  = 4
open("/etc/hhvm/php.ini", O_RDONLY)     = 8
open("/etc/hhvm/config.hdf", O_RDONLY)  = 8

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links