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
Comment #1
BerdirComment #2
BerdirComment #3
BerdirComment #4
BerdirComment #5
BerdirComment #6
jslatts CreditAttribution: jslatts commentedFYI, 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.
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commented@jslatts
Did you try the example that I worked on with rhinosaur665?
https://github.com/facebook/hhvm/issues/1108#issuecomment-32072064
Comment #8
BerdirAdded #2191533: Fixing ViewsDataTest::testFetchBaseTables to correctly check for sorting order to the list.
Comment #9
lowjoel CreditAttribution: lowjoel commentedI should link #2216899 to fix one bug with Drupal 7's test suite. This seems to affect both HHVM and PHP 5.5.
Comment #10
jackbravo CreditAttribution: jackbravo commentedOne of the two HHVM issues is closed now
Comment #11
lowjoel CreditAttribution: lowjoel commentedStatus 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.
Comment #12
BerdirDid you see #2161955: Remove get_extension_funcs() call to improve HHVM compatibility ? That should fix all those f_get_extension_funcs() errors...
Comment #13
lowjoel CreditAttribution: lowjoel commentedI did, I probably should apply that fix locally.
Comment #14
lowjoel CreditAttribution: lowjoel commentedHHVM #2392, involving the MySQL adapter.
Comment #15
gregglesComment #16
mgiffordShould this be tested with RC2?
Comment #17
mgiffordComment #20
cilefen CreditAttribution: cilefen commentedComment #23
edurenye CreditAttribution: edurenye at ENDPHASYS Technologies commentedComment #24
hass CreditAttribution: hass commentedWith a recent commit HHVM compatibility is dropped via Twig.
Comment #25
bojanz CreditAttribution: bojanz at Centarro commentedhttps://symfony.com/blog/symfony-4-end-of-hhvm-support
http://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html
It's dead, Jim.