Page MenuHomePhabricator

ApiFormatWddxTest::testValidSyntax fails in mediawiki-core-regression-hhvm-master test
Closed, ResolvedPublic

Description

https://integration.wikimedia.org/ci/job/mediawiki-core-regression-hhvm-master/2653/testReport/:

ApiFormatWddxTest::testValidSyntax
Failed asserting that null is of type "array".
/mnt/jenkins-workspace/workspace/mediawiki-core-regression-hhvm-master/src/tests/phpunit/includes/api/format/ApiFormatWddxTest.php:17
/mnt/jenkins-workspace/workspace/mediawiki-core-regression-hhvm-master/src/tests/phpunit/MediaWikiTestCase.php:141

Version: 1.25-git
Severity: normal

Details

Reference
bz73531

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 3:49 AM
bzimport set Reference to bz73531.
bzimport added a subscriber: Unknown Object (MLST).
scfc created this task.Nov 17 2014, 10:42 PM

The console log shows:

Entity: line 1: parser error : xmlParseEntityRef: no name
ring>/^([a-z]+)(.*)$/sD</string></var><var name='legaltitlechars'><string> %!"$&

And points to the ampersand at the end of the line.

scfc added a comment.Nov 19 2014, 1:36 AM

This is an error in hhvm's WDDX serialization. A test script:

<?php
$s = wddx_serialize_value("Test for &");
var_dump($s);
$d = wddx_deserialize($s);
var_dump($d);

works on my PHP 5.5.18:

string(92) "<wddxPacket version='1.0'><header/><data><string>Test for &amp;</string></data></wddxPacket>"
string(10) "Test for &"

but fails on HipHop VM 3.3.1:

string(88) "<wddxPacket version='1.0'><header/><data><string>Test for &</string></data></wddxPacket>"
Entity: line 1: parser error : xmlParseEntityRef: no name
<wddxPacket version='1.0'><header/><data><string>Test for &</string></data></wdd
^
NULL

I filed https://github.com/facebook/hhvm/issues/4283 upstream.

Upstream has a fix internally :]

scfc closed this task as Resolved.Nov 26 2014, 11:53 PM
scfc claimed this task.
hashar reopened this task as Open.Dec 10 2014, 5:33 PM
hashar added a project: HHVM.
hashar added subscribers: ori, Joe.

Reopening, that is still failing from a test I ran today. HHVM with version:

HipHop VM 3.3.1 (rel)
Compiler: heads/master-0-gaab439ff2621541ec1a197976ec698be1a8bf1be
Repo schema: ef03a9ff7249bca56eabd688c45d47e836e9d387
Extension API: 20140829

Jenkins report https://integration.wikimedia.org/ci/job/mediawiki-phpunit-hhvm/3/testReport/ :

ApiFormatWddxTest::testValidSyntax
Failed asserting that null is of type "array".

/mnt/jenkins-workspace/workspace/mediawiki-phpunit-hhvm/src/tests/phpunit/includes/api/format/ApiFormatWddxTest.php:17
/mnt/jenkins-workspace/workspace/mediawiki-phpunit-hhvm/src/tests/phpunit/MediaWikiTestCase.php:141
scfc added a comment.Dec 10 2014, 8:52 PM

(Hmmm. I probably only checked that it passes now on Travis CI because previously it failed everywhere.)

@Joe Upstream fix is https://github.com/facebook/hhvm/commit/324701c9fd31beb4f070f1b7ef78b115fbdfec34 which we now need to include in our hhvm package hoping it backports properly :/

Joe added a comment.Dec 11 2014, 3:27 PM

I'll package it in the -wm6 package I plan to put toghether next week. Assigning the ticket to myself in the meanwhile.

Joe claimed this task.Dec 11 2014, 3:27 PM
Joe set Security to None.
In T75531#841820, @Joe wrote:

I'll package it in the -wm6 package I plan to put toghether next week. Assigning the ticket to myself in the meanwhile.

Awesome, thank you very much.

Once fixed, the job mediawiki-phpunit-hhvm will have to be made voting in Zuul configuration.

Change 180208 had a related patch set uploaded (by Hashar):
Skip ApiFormatWddxTest under HHVM

https://gerrit.wikimedia.org/r/180208

Patch-For-Review

Change 180208 merged by jenkins-bot:
Skip ApiFormatWddxTest under HHVM

https://gerrit.wikimedia.org/r/180208

mediawiki/core now has some logic to skip the test whenever it detects the wddx function to misbehave. That has let me made the mediawiki core HHVM job voting on Jenkins!

So this bug is probably less of a priority now and should not be a reason to hurry up the packaging of a new hhvm version.

Change 180849 had a related patch set uploaded (by BryanDavis):
Skip ApiFormatWddxTest under HHVM

https://gerrit.wikimedia.org/r/180849

Patch-For-Review

Change 180849 merged by jenkins-bot:
Skip ApiFormatWddxTest under HHVM

https://gerrit.wikimedia.org/r/180849

Change 180865 had a related patch set uploaded (by BryanDavis):
Skip ApiFormatWddxTest under HHVM

https://gerrit.wikimedia.org/r/180865

Patch-For-Review

Change 180865 merged by jenkins-bot:
Skip ApiFormatWddxTest under HHVM

https://gerrit.wikimedia.org/r/180865

hashar closed this task as Resolved.Dec 19 2014, 5:06 PM

That has been fixed in core by detecting whether HHVM misbehave the serialization and if so skip the test entirely. The mediawiki core PHPUnit job under HHVM is now voting :-)

Additionally, a new HHVM package has been pushed ( T84853 )