Search This Blog

Friday, February 24, 2017

HHVM 3.18.0 crash on Ubuntu 16.04 with Nginx

Just try to bring up an new HHVM host on Ubuntu 16.04 with Nginx.

But HHVM keep crush error in /var/log/hhvm/error.log
It created error log in /tmp

Here is a example:


ProcessID: 1549
ThreadID: 140594705856256
ThreadPID: 2188
Name: unknown program
Type: Aborted
Runtime: hhvm
Version: tags/HHVM-3.18.0-0-g9b285191feb2bb1558bb6682da135263bd2a9e60
DebuggerCount: 0

ThreadType: Web Request
Assertion Message: Failed to initialize central HHBC repository:
Failed to initialize schema in /var/run/hhvm/hhvm.hhbc(rw-r--r-- root:root):
Failed to open /var/www/.hhvm.hhbc: 14 - unable to open database file

Assertion Failure: /tmp/tmp.Fv54re7NgD/hphp/runtime/vm/repo.cpp:562: HPHP::Repo::initCentral()::__lambda62: assertion `false' failed.
URL: /wp-admin/admin-ajax.php



Run ls -alt /var/run/hhvm
Since upgrading to 3.18, hhvm is unable to open hhvm.hhbc as it is created as root instead of www-data.

For now the workaround is to add the following to your configuration: /etc/hhvm/server.ini


hhvm.repo.central.file_user=www-data
hhvm.repo.central.file_group=www-data
hhvm.repo.central.file_mode=493



Restart the HHVM service.

And it works.

Hope HHVM team can fix it in the next release.


Reference: https://github.com/facebook/hhvm/issues/7674

2 comments:

  1. On Ubuntu 16 .. HHVM 3.1.8 my /var/run/hhvm/ has simply dissapeared .. thoughts?

    ReplyDelete
  2. it happens to me once.
    I have to uninstall hhvm then re-install it.
    pain.

    ReplyDelete