Meta issue to track compatibility with HHVM: http://www.hhvm.com/blog/

Drupal issues

- #2161955: Remove get_extension_funcs() call to improve HHVM compatibility (7.x backport)
- #2191533: Fixing ViewsDataTest::testFetchBaseTables to correctly check for sorting order (this should fix one of the unit test fails)

HHVM issues
Open:

Closed:
- https://github.com/facebook/hhvm/issues/1108
- https://github.com/facebook/hhvm/issues/2392
- https://github.com/facebook/hhvm/issues/1413

Running Drupal
More or less works, with hhvm --config hhvm.hdf --mode server and the hhvm.hdf file from http://nickveenhof.be/blog/getting-drupal-7-almost-running-hhvm.

Getting some warnings/notices:

always: Warning: A session is active. You cannot change the session module's ini settings at this time in drupal_session_initialize() (line 243 of core/includes/session.inc).
frontpage: Notice: Undefined index: default in Drupal\views\ViewExecutable->destroy() (line 1755 of core/modules/views/lib/Drupal/views/ViewExecutable.php).
when running tests Notice: Undefined index: 0 in _simpletest_batch_finished() (line 333 of core/modules/simpletest/simpletest.module).

Use the following VirtualHost declaration to make clean URL's work:

VirtualHost {
  * {
    Pattern = .*
    RewriteRules {
      * {
        pattern = (.*)$
        to = index.php/$1
        qsa = true
      }
    }
  }
}

Unit test coverage

/usr/bin/hhvm vendor/bin/phpunit

Currently two failing unit tests:

1) Drupal\Tests\Component\PhpStorage\FileStorageTest::testDeleteAll
Failed asserting that true is false.

.../core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php:128

2) Drupal\views\Tests\ViewsDataTest::testFetchBaseTables
The tables are sorted as expected.
Failed asserting that Array (
    0 => 'views_test_data_3'
    1 => 'views_test_data_4'
    2 => 'views_test_data'
    3 => 'views_test_data_6'
    4 => 'views_test_data_5'
    5 => 'views_test_data_2'
) is identical to Array (
    0 => 'views_test_data_3'
    1 => 'views_test_data_4'
    2 => 'views_test_data_6'
    3 => 'views_test_data'
    4 => 'views_test_data_5'
    5 => 'views_test_data_2'
).

.../core/modules/views/tests/Drupal/views/Tests/ViewsDataTest.php:142

Simpletest
Not that much success yet, but the tests are kind of running,

hhvm core/scripts/run-tests.sh --url http://localhost:9000 --php /usr/bin/hhvm Entity

Currently gives:

exception 'PDOException' with message 'SQLSTATE[HY000]: General error: user-supplied statement class must be derived from PDOStatement' in :
Stack trace:
#0 /core/lib/Drupal/Core/Database/Connection.php(181): PDO->setattribute()
#1 /d8/core/lib/Drupal/Core/Database/Database.php(427): Drupal\Core\Database\Connection->destroy()
#2 /d8/core/lib/Drupal/Core/Database/Database.php(341): Drupal\Core\Database\Database::closeConnection()
#3 /d8/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php(1112): Drupal\Core\Database\Database::removeConnection()
#4 /d8/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php(1028): Drupal\simpletest\TestBase->tearDown()
#5 /d8/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php(800): Drupal\simpletest\WebTestBase->tearDown()
#6 /d8/core/scripts/run-tests.sh(504): Drupal\simpletest\TestBase->run()
#7 /d8/core/scripts/run-tests.sh(26): simpletest_script_run_one_test()
#8 {main}FATAL Drupal\entity\Tests\EntityDisplayModeTest: test runner returned a non-zero error code (1).
- Found database prefix 'simpletest86167' for test ID 56.

Commenting out that line results in lots of notices:

Exception Notice     FieldInfo.php      205 Drupal\field\FieldInfo->getFieldMap
    Undefined index: nameDrupal\field\FieldInfo->getFieldMap()
    Drupal\Core\Entity\Query\Sql\Tables->addField('router_path', 'INNER', NULL)
    Drupal\Core\Entity\Query\Sql\Condition->compile(Object)
    Drupal\Core\Entity\Query\Sql\Query->compile()
    Drupal\Core\Entity\Query\Sql\Query->execute()
    _menu_navigation_links_rebuild(Array)
    menu_router_rebuild()
    drupal_flush_all_caches()
    install_finished(Array)
    install_run_task(Array, Array)
    install_run_tasks(Array)
    install_drupal(Array)
    Drupal\simpletest\WebTestBase->setUp()
    Drupal\simpletest\TestBase->run()
    simpletest_script_run_one_test('59',
    'Drupal\entity\Tests\EntityDisplayModeTest')

Executing tests in the UI works as well, but getting a huge amount of fails with errors similar to " f_is_dir/839: No such file or directory", the error log is also full of those, I guess related to the stream_wrappers problem?

Also getting date timezone notices, not sure where I need to set this.

Comments

Berdir’s picture

Issue summary: View changes
Berdir’s picture

Issue summary: View changes
Berdir’s picture

Issue summary: View changes
Berdir’s picture

Issue summary: View changes
Berdir’s picture

Issue summary: View changes
jslatts’s picture

FYI, the patch from demon (https://github.com/demon/hhvm/commit/431d558cbb1a79ea81a07fd7937e93f0e6a...) addresses the issue with stream wrappers for me, at least in local testing. I discussed with hhvm maintainers and they will add the patch into hhvm if it gets some unit tests written. I am going to try and write them when I have time.

mikeytown2’s picture

@jslatts
Did you try the example that I worked on with rhinosaur665?
https://github.com/facebook/hhvm/issues/1108#issuecomment-32072064

Berdir’s picture

lowjoel’s picture

I should link #2216899 to fix one bug with Drupal 7's test suite. This seems to affect both HHVM and PHP 5.5.

jackbravo’s picture

Issue summary: View changes

One of the two HHVM issues is closed now

lowjoel’s picture

Status update: with #2216899 applied, and HHVM HEAD (+Zend backend), we are now getting a hand-countable number of test failures.

110:Transaction tests 77 passes, 0 fails, and 4 exceptions
171:Fatal error: f_get_extension_funcs is not supported: extensions are built differently in /home/joel/Development/drupal/modules/system/image.gd.inc on line 59
195:Filter module filters 208 passes, 7 fails, and 0 exceptions
223:Fatal error: f_get_extension_funcs is not supported: extensions are built differently in /home/joel/Development/drupal/modules/system/image.gd.inc on line 59
234:Fatal error: f_get_extension_funcs is not supported: extensions are built differently in /home/joel/Development/drupal/modules/system/image.gd.inc on line 59
246:Fatal error: f_get_extension_funcs is not supported: extensions are built differently in /home/joel/Development/drupal/modules/system/image.gd.inc on line 59
257:Fatal error: f_get_extension_funcs is not supported: extensions are built differently in /home/joel/Development/drupal/modules/system/image.gd.inc on line 59
271:Fatal error: f_get_extension_funcs is not supported: extensions are built differently in /home/joel/Development/drupal/modules/system/image.gd.inc on line 59
282:Fatal error: f_get_extension_funcs is not supported: extensions are built differently in /home/joel/Development/drupal/modules/system/image.gd.inc on line 59
295:Fatal error: f_get_extension_funcs is not supported: extensions are built differently in /home/joel/Development/drupal/modules/system/image.gd.inc on line 59
311:String translation using st() 1 pass, 1 fail, and 0 exceptions
353:Fatal error: Maximum execution time of 500 seconds exceeded in /home/joel/Development/drupal/modules/simpletest/drupal_web_test_case.php on line 1866
459:Testing SimpleTest setUp 1 pass, 1 fail, and 0 exceptions
461:Discovery of test classes 35 passes, 6 fails, 0 exceptions, and 11 debug messages
467:SimpleTest functionality 88 passes, 27 fails, 44 exceptions, and 28 debug messages
494:Cascading stylesheets 40 passes, 2 fails, 0 exceptions, and 3 debug messages
522:Tablesort 0 passes, 0 fails, and 1 exception
555:Tracker 228 passes, 0 fails, 2 exceptions, and 65 debug messages
567:Fatal error: File not found: compress.zlib://modules/simpletest/tests/upgrade/drupal-7.bare.standard_all.database.php.gz in /home/joel/Development/drupal/modules/simpletest/tests/upgrade/upgrade.test on line 133
578:Fatal error: File not found: compress.zlib://modules/simpletest/tests/upgrade/drupal-7.bare.minimal.database.php.gz in /home/joel/Development/drupal/modules/simpletest/tests/upgrade/upgrade.test on line 133
589:Fatal error: File not found: compress.zlib://modules/simpletest/tests/upgrade/drupal-7.bare.standard_all.database.php.gz in /home/joel/Development/drupal/modules/simpletest/tests/upgrade/upgrade.test on line 133
603:Fatal error: File not found: compress.zlib://modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz in /home/joel/Development/drupal/modules/simpletest/tests/upgrade/upgrade.test on line 133
615:Fatal error: File not found: compress.zlib://modules/simpletest/tests/upgrade/drupal-7.filled.minimal.database.php.gz in /home/joel/Development/drupal/modules/simpletest/tests/upgrade/upgrade.test on line 133
626:Fatal error: File not found: compress.zlib://modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz in /home/joel/Development/drupal/modules/simpletest/tests/upgrade/upgrade.test on line 133
643:Fatal error: File not found: compress.zlib://modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz in /home/joel/Development/drupal/modules/simpletest/tests/upgrade/upgrade.test on line 133
656:Fatal error: Call to undefined function taxonomy_get_vocabularies() in /home/joel/Development/drupal/modules/simpletest/tests/upgrade/upgrade.taxonomy.test on line 67
667:Fatal error: File not found: compress.zlib://modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz in /home/joel/Development/drupal/modules/simpletest/tests/upgrade/upgrade.test on line 133
699:Fatal error: f_get_extension_funcs is not supported: extensions are built differently in /home/joel/Development/drupal/modules/system/image.gd.inc on line 59

I will try to fix these, and then repeat the unit test suite with HHVM as the backend.

Berdir’s picture

Did you see #2161955: Remove get_extension_funcs() call to improve HHVM compatibility ? That should fix all those f_get_extension_funcs() errors...

lowjoel’s picture

I did, I probably should apply that fix locally.

lowjoel’s picture

Issue summary: View changes

HHVM #2392, involving the MySQL adapter.

greggles’s picture

Issue summary: View changes
mgifford’s picture

Should this be tested with RC2?

mgifford’s picture

Issue tags: +Performance

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

cilefen’s picture

Issue tags: +hhvm

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

edurenye’s picture

Issue summary: View changes
hass’s picture

With a recent commit HHVM compatibility is dropped via Twig.

bojanz’s picture