https://bugzilla.wikimedia.org/show_bug.cgi?id=73177

Bryan Davis <bda...@wikimedia.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |upstream
           See Also|                            |https://github.com/hhvm/pac
                   |                            |kaging/issues/81,
                   |                            |https://github.com/travis-c
                   |                            |i/travis-ci/issues/2942

--- Comment #7 from Bryan Davis <bda...@wikimedia.org> ---
I've run numerous experiments on Travis in an attempt to isolate the setting
changes that made the test pass [0]. At first I thought that disabling the JIT
fixed things [1], but in additional tests using the `-v Eval.Jit=false` form of
this configuration i found that Travis continued to fail the test.

After many variations I settled on a suite of tests that isolate the required
change [2]:

* [passes] hhvm -c empty.ini tests/phpunit/phpunit.php
* [passes] hhvm --no-config tests/phpunit/phpunit.php
* [fails]  hhvm --php tests/phpunit/phpunit.php
* [fails]  hhvm -vEval.Jit=false tests/phpunit/phpunit.php
* [fails]  hhvm tests/phpunit/phpunit.php

The empty.ini content is:

    ; this file intentionally empty

The `--no-config` flag basically does the same thing as passing an empty
config, namely it disables loading the system default configuration files. This
is the real cause of the test failure on Travis. The evidence can be seen in
the original test run given in comment #1 [3]:

Destructor threw an object exception:
open(/var/lib/php5/sess_d612ee607c87e749ef14da4983a702cd, O_RDWR) failed: No
such file or directory (2)
/home/travis/build/wikimedia/mediawiki/includes/context/RequestContext.php:520
/home/travis/build/wikimedia/mediawiki/includes/context/RequestContext.php:555
/home/travis/build/wikimedia/mediawiki/includes/libs/ScopedCallback.php:70
/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/RequestContextTest.php:88
/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:141

This is evidence that the destructor is actually being called that I missed.
The real problem is that the callback invoked by the destructor is failing part
way through which leaves the environment only partially rolled back. The
results of the --no-config and empty config tests indicate that the crash is
triggered by something in the default Travis configuration.

Using another testing environment running on Travis I was able to dump the
default configuration and found that it sets "session.save_path =
/var/lib/php5" in addition to a few other settings. I also confirmed that the
/var/lib/php5 path does not exist under the hhvm runtime configuration [4].

The default ini file comes from the upstream HHVM nightly package [5]. The have
apparently setup some parts of the default configuration to mirror the php5
package, but they have neglected to ensure that the package creates the
directory they have named. I think this is really a bug in the HHVM nightly
package [6], but it could be worked around in either our test environment
configuration or by Travis in their configuration [7].


[0]: https://travis-ci.org/bd808/mediawiki/jobs/40440444
[1]: https://travis-ci.org/bd808/mediawiki/jobs/40476541
[2]: https://travis-ci.org/bd808/mediawiki/builds/40509957
[3]: https://travis-ci.org/wikimedia/mediawiki/jobs/40335649#L120-L126
[4]: https://travis-ci.org/bd808/travis-hhvm-experiments/jobs/40511484#L30-L47
[5]:
https://github.com/hhvm/packaging/blob/9bd53edcfd853efc65fe0062c7f5f5bdd73b5079/hhvm/deb/skeleton/etc/hhvm/php.ini#L3https://github.com/hhvm/packaging/blob/master/hhvm/deb/skeleton/etc/hhvm/php.ini#L3
[6]: https://github.com/hhvm/packaging/issues/81
[7]: https://github.com/travis-ci/travis-ci/issues/2942

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to