HHVM CI jobs running on Jessie seg fault with HHVM 3.12.11
Symptoms
See for example https://integration.wikimedia.org/ci/job/mediawiki-extensions-hhvm-jessie/5115/console. The tests seem to complete, but then the log reports a segfault and Jenkins marks the job as failed.
16:13:38 Time: 5.28 minutes, Memory: 763.68MB 16:13:38 16:13:38 OK, but incomplete, skipped, or risky tests! 16:13:38 Tests: 14107, Assertions: 116135, Skipped: 119, Risky: 1. 16:13:43 /srv/deployment/integration/slave-scripts/bin/mw-run-phpunit-allexts.sh: line 23: vvvvvvvvvvvvvvvvvv 2306 Segmentation fault (core dumped) php -dzend.enable_gc=0 phpunit.php --log-junit "$JUNIT_DEST" --testsuite extensions ^^^^^^^^^^^^^^^^^^ 16:13:43 Build step 'Execute shell' marked build as failure 16:13:43 Recording test results 16:13:48 Archiving artifacts 16:13:51 [PostBuildScript] - Execution post build scripts. 16:13:51 [PostBuildScript] Build is not success : do not execute script 16:13:51 Finished: FAILURE
That also affects mediawiki-phpunit-hhvm-jessie, see for example https://integration.wikimedia.org/ci/job/mediawiki-phpunit-hhvm-jessie/2859/console.
Last working builds were shortly before 15:00 UTC.
14:12 <moritzm> uploaded hhvm 3.12.12 to carbon
Nodepool start refreshing the images at 14:14UTC which takes roughly 10 minutes. Once complete, newly created instances use that new image.
Reproduction
In short: /usr/bin/hhvm -v Eval.Jit=false tests/phpunit/phpunit.php tests/phpunit/includes/import/
On a Jessie instance setup a basic test env:
# MediaWiki + vendor + installation git clone --depth 1 https://gerrit.wikimedia.org/r/p/mediawiki/core.git mediawiki-core cd mediawiki-core git clone --depth 1 https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git mkdir data php maintenance/install.php --dbtype sqlite --dbpath=$(pwd)/data --pass XXXXXX bugwiki wikiadmin # Get composer + dev dependencies git clone --single-branch https://gerrit.wikimedia.org/r/p/integration/composer ./composer/vendor/bin/composer install
Run under GDB and exercise includes/import/
gdb --args /usr/bin/hhvm -v Eval.Jit=false tests/phpunit/phpunit.php tests/phpunit/includes/import/ (gdb) run Starting program: /usr/bin/hhvm -v Eval.Jit=false tests/phpunit/phpunit.php tests/phpunit/includes/import/ [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffe53ff700 (LWP 29491)] [Thread 0x7fffe53ff700 (LWP 29491) exited] Using HHVM 3.12.11 (5.6.99-hhvm) PHPUnit 4.8.31 by Sebastian Bergmann and contributors. ........ Time: 3 seconds, Memory: 16.61MB OK (8 tests, 15 assertions) Program received signal SIGSEGV, Segmentation fault. HPHP::UserFile::close (this=0x7fffde1b6690) at /tmp/buildd/hhvm-3.12.11+dfsg/hphp/runtime/base/user-file.cpp:202 202 /tmp/buildd/hhvm-3.12.11+dfsg/hphp/runtime/base/user-file.cpp: No such file or directory. (gdb) bt #0 HPHP::UserFile::close (this=0x7fffde1b6690) at /tmp/buildd/hhvm-3.12.11+dfsg/hphp/runtime/base/user-file.cpp:202 #1 0x000000000121a8c2 in HPHP::XMLReader::close (this=0x7fffde0e5e20) at /tmp/buildd/hhvm-3.12.11+dfsg/hphp/runtime/ext/xmlreader/ext_xmlreader.cpp:95 #2 0x000000000198aa7f in HPHP::MemoryManager::sweep (this=0x7ffff7fbe830, this@entry=<error reading variable: Asked for position 0 of stack, stack only has 0 elements on it.>) at /tmp/buildd/hhvm-3.12.11+dfsg/hphp/runtime/base/memory-manager.cpp:482 #3 0x0000000001989ead in HPHP::hphp_memory_cleanup () at /tmp/buildd/hhvm-3.12.11+dfsg/hphp/runtime/base/program-functions.cpp:2185 #4 0x00000000009eee57 in HPHP::hphp_session_exit () at /tmp/buildd/hhvm-3.12.11+dfsg/hphp/runtime/base/program-functions.cpp:2219 #5 0x00000000009f5fe7 in HPHP::execute_command_line_end (xhprof=0, coverage=coverage@entry=true, program=0x7fffdf6f4b58 "tests/phpunit/phpunit.php") at /tmp/buildd/hhvm-3.12.11+dfsg/hphp/runtime/base/program-functions.cpp:707 #6 0x00000000009fe9b7 in HPHP::execute_program_impl (argc=argc@entry=5, argv=argv@entry=0x7fffffffe5c8) at /tmp/buildd/hhvm-3.12.11+dfsg/hphp/runtime/base/program-functions.cpp:1722 #7 0x0000000000a0067e in HPHP::execute_program (argc=argc@entry=5, argv=argv@entry=0x7fffffffe5c8) at /tmp/buildd/hhvm-3.12.11+dfsg/hphp/runtime/base/program-functions.cpp:1040 #8 0x00000000008dd1f5 in main (argc=<optimized out>, argv=0x7fffffffe5c8) at /tmp/buildd/hhvm-3.12.11+dfsg/hphp/hhvm/main.cpp:60 (gdb) up #1 0x000000000121a8c2 in HPHP::XMLReader::close (this=0x7fffde0e5e20) (gdb)