php-parser autopkgtests fail with php7.4 7.4.3-4ubuntu2 on armhf

Bug #1878102 reported by Bryce Harrington
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php
Fix Released
Unknown
php-parser (Ubuntu)
Fix Released
Undecided
Bryce Harrington
Focal
Fix Committed
High
Bryce Harrington
Groovy
Fix Released
Undecided
Bryce Harrington

Bug Description

[Impact]

Other php SRUs end up blocked from migration due to a test case in php-parser that fails due to an integer format mismatch.

[Test Case]
1. Create lxc container for ubuntu-focal
2. Install php-parser
3. Run autopkgtest php-parser -- null

The testsuite should pass but it does not, and fails with EmulativeTest issues starting with (and similar to) this one:

1) PhpParser\Lexer\EmulativeTest::testErrorAfterEmulation with data set #0 ('??=', array(array(281, '??=')))
Failed asserting that actual size 0 matches expected size 1.

/tmp/autopkgtest.eZ6NuZ/build.Ar8/src/test/PhpParser/Lexer/EmulativeTest.php:110

[Regression Potential]

Since this is a testsuite fix for integer parsing on armhf, the two things to watch for would be a) issues relating to the testsuite, or b) issues particular to armhf (especially traceable to integer parsing behavior). However, in the first case, the testsuite's behavior would crop up only during building / migrating in the archive and would not produce user-visible effects. In the second case, integer parsing issues already exist in released code so would not be a true regression, the test case only exposes them - by preventing other php packages from migrating.

[Discussion]

php-parser's autopkgtest has been failing in focal on armhf for some time:

    http://autopkgtest.ubuntu.com/packages/p/php-parser/focal/armhf

The test failure is due to an integer format mismatch. We spotted this issue on groovy and flagged it for upstream:

    https://github.com/nikic/PHP-Parser/issues/662

There doesn't appear to be a fix identified yet. We addressed it in groovy by disabling the faulty tests (the one listed in this bug, and the one in LP: #1895878), and that may be a low-risk way to address it for focal, too.

    https://launchpad.net/ubuntu/+source/php-parser/4.4.0-1ubuntu2

php-parser: https://launchpad.net/ubuntu/+source/php-parser/4.2.2-2
php7.4: https://launchpad.net/ubuntu/+source/php7.4/7.4.3-4ubuntu2

Originally failing Log: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-groovy/groovy/armhf/p/php-parser/20200502_014803_a1f47@/log.gz

  - EmulativeTest::testErrorAfterEmulation with various data sets
  - EmulativeTest::testError with various data sets
  - LexerTest::testError with various data sets

php7.4 is blocked from migration of three CVEs due to test failures with php-parser. Php-parser has a newer 4.4.0-1 stuck in proposed, but triggering the two together did not resolve the issue:

Newly failing log: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-groovy/groovy/armhf/p/php-parser/20200501_165040_5a5c8@/log.gz

  - CodeParsingTest::testParse: Different integer syntaxes
  - Lexer\EmulativeTest::testLexNewFeatures: '0xCAFE_F00D'

Related branches

Bryce Harrington (bryce)
Changed in php-parser (Ubuntu):
status: New → In Progress
assignee: nobody → Bryce Harrington (bryce)
tags: added: update-excuse
tags: added: ftbfs
Bryce Harrington (bryce)
summary: - php-parser autopkgtests fail with php7.4 7.4.3-4ubuntu2
+ php-parser autopkgtests fail with php7.4 7.4.3-4ubuntu2 on armhf
Bryce Harrington (bryce)
description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

The integer syntax issue is forwarded upstream to:
https://github.com/nikic/PHP-Parser/issues/662

This test case is new with 4.4.0, and I'm guessing it's a signed/unsigned issue with the Scalar_LNumber data type.

Revision history for this message
Bryce Harrington (bryce) wrote :

The other test failure is a similar problem:

2) PhpParser\Lexer\EmulativeTest::testLexNewFeatures with data set #20 ('0xCAFE_F00D', array(array(312, '0xCAFE_F00D')))
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 (
     0 => Array &1 (
- 0 => 312
+ 0 => 313
         1 => '0xCAFE_F00D'
     )
 )

'0xCAFE_F00D' is hexadecimal for 3405705229, which is the same number as in the syntax issue in comment #1. The test is receiving this as a T_DNUMBER (i.e. type number 313) rather than as a T_LNUMBER (type 312) as defined in Tokens.php.

Changed in php:
status: Unknown → New
Revision history for this message
Bryce Harrington (bryce) wrote :

Upstream comment indicates the new test case may be not 32-bit compatible at this time.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package php-parser - 4.4.0-1ubuntu2

---------------
php-parser (4.4.0-1ubuntu2) groovy; urgency=medium

  * d/p/0004-Disable-CodeParsingTest-due-to-integer-syntax.patch:
    - Disable another test case that is not yet 32-bit compatible, to fix
      proposed migration blockage on armhf.

 -- Bryce Harrington <email address hidden> Thu, 14 May 2020 23:25:09 +0000

Changed in php-parser (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Bryce Harrington (bryce) wrote :

Focal has the same version of php-parser, and we're seeing the same test failures there.

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/armhf/p/php-parser/20200929_080001_a32e2@/log.gz

/tmp/autopkgtest.eZ6NuZ/build.Ar8/src/test/PhpParser/Lexer/EmulativeTest.php:110

Changed in php-parser (Ubuntu Focal):
assignee: nobody → Bryce Harrington (bryce)
importance: Undecided → High
status: New → Triaged
description: updated
Revision history for this message
Robie Basak (racb) wrote :

Marking block-proposed-focal as this is an autopkgtest fix only, should be sufficient to just be in proposed, and there's no need to make users download this update.

tags: added: block-proposed-focal
Changed in php-parser (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Bryce, or anyone else affected,

Accepted php-parser into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/php-parser/4.2.2-2ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Bryce Harrington (bryce) wrote :

php-parser has built in -proposed, and I verified the test suite passes.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Changed in php:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.