PHP Fatal error: Inconsistent insteadof definition

Bug #1474276 reported by Silvio Ginter
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php
Unknown
Unknown
php5 (Ubuntu)
Fix Released
Medium
Ryan Harper
Trusty
Fix Released
Medium
Ryan Harper

Bug Description

[Impact]

 * PHP5 programs using traits fail randomly.

 * Backporting the Upstream fix resolves the random failure

 * The upload incorporates the upstream fix from Samba.

[Test Case]

 * On a Trusty 14.04 system:
   1. sudo apt-get install php5
   2. wget https://gist.githubusercontent.com/raharper/ee431e851b1b8bb6ba1d/raw/7dcc99d187a08e3e9e0f33ea47a955b6f1b68038/test_insteadof.sh
   -O test_insteadof.sh
   3. run the test

% bash ./test_insteadof.sh; echo $?
Generating php5 test-case...
Running php5 insteadof test-case...
PHP Fatal error: Inconsistent insteadof definition. The method methodName is to be used from SPACE\trait0, but SPACE\trait0 is also on the exclude list in /root/class.php on line 79
255

   4. After applying the updated packages the test exits successfully

% bash ./test_insteadof.sh; echo $?
Generating php5 test-case...
Running php5 insteadof test-case...
End

[Regression Potential]

 * None

[Original Description]
The PHP Bug #68185 needs to be merged into Ubuntu PHP 5.5.x sources for 14.04.x, as these are technically speaking unusable for working with traits. For details please have a look on https://bugs.php.net/bug.php?id=68185

It has been fixed in the PHP mainline with 5.5.20 / 5.6.4 and been proven as stable.

I checked the current sources in both, the current stable branch (http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/php5/trusty/view/head:/Zend/zend_compile.c#L4126) and the development branch (http://bazaar.launchpad.net/~noskcaj/ubuntu/trusty/php5/merge/view/head:/Zend/zend_compile.c#L4116) . Both lacks this simple fix. The bug is quite hard to reproduce, as it occurs randomly.

description: updated
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please see https://wiki.ubuntu.com/StableReleaseUpdates#Procedure and https://wiki.ubuntu.com/SponsorshipProcess for the procedure to get this updated in both the development release and 14.04.

summary: - Need to merge "Bug #68185 - 'PHP Fatal error: Inconsistent insteadof
- definition.' - incorrectly triggered"
+ PHP Fatal error: Inconsistent insteadof definition
Changed in php5 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Robie Basak (racb) wrote :

As this is reported fixed in 5.6.4 and Wily has 5.6.9, I'm marking this Fix Released. The patch looks trivial to cherry-pick to Trusty but does need to go through the SRU process for QA purposes, so anyone who is prepared to drive this please go right ahead. The procedure is documented in https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in php5 (Ubuntu):
status: Triaged → Fix Released
Changed in php5 (Ubuntu Trusty):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Silvio Ginter (silvio-ginter) wrote :

Dear Robie,

i just compared the source code of PHP Package included in Wily and the original 5.6.11 branch on GitHub.
The fix is NOT included. Please compare Wily: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/php5/wily/view/head:/Zend/zend_compile.c#L4126 over GitHub: https://github.com/php/php-src/blob/PHP-5.6.11/Zend/zend_compile.c#L4269

Both should be the same, but they are not.

Changed in php5 (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
Robie Basak (racb) wrote :

Hi Silvio,

The automatic bzr import is often broken, so the package source available through the bzr viewer cannot be relied upon. The definitive source is available from the source package itself - you can get this from https://launchpad.net/ubuntu/+source/php5/5.6.11+dfsg-1ubuntu1 for what is in Wily at the moment.

I'm marking this Fix Released as what you checked is likely to be up to date. If the bug isn't fixed in Wily, then please change the bug status to New.

For Trusty, this is awaiting someone to look at it for SRU.

Changed in php5 (Ubuntu):
status: Incomplete → Fix Released
tags: added: bitesize
Revision history for this message
Robie Basak (racb) wrote :

> is likely to be up to date.

I meant: likely to be out of date.

Robie Basak (racb)
tags: added: server-next
Robie Basak (racb)
Changed in php5 (Ubuntu Trusty):
assignee: nobody → Ryan Harper (raharper)
Changed in php5 (Ubuntu):
assignee: nobody → Ryan Harper (raharper)
Robie Basak (racb)
tags: removed: server-next
Revision history for this message
Ryan Harper (raharper) wrote :

Attaching debdiff with the upstream fix patch applied.

description: updated
Revision history for this message
Ryan Harper (raharper) wrote :

Attached debdiff to apply upstream fix. Updated Description for SRU proposal.

Changed in php5 (Ubuntu Trusty):
status: Triaged → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Silvio, or anyone else affected,

Accepted php5 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/php5/5.5.9+dfsg-1ubuntu4.12 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 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, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Changed in php5 (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Ryan Harper (raharper) wrote :
Download full text (22.5 KiB)

 I've tested[1] the proposed package and it passes[2] the testcase in the SRU justification.

1. uvt-simplestreams-libvirt sync release=trusty arch=amd64
    uvt-kvm create --cpu 2--disk 10 t1 release=trusty arch=amd64
    uvt-kvm wait --insecure t1
    uvt-kvm ssh --insecure t1
   # inside trusty vm

2.

Welcome to the light, powerful, text window manager, Byobu.
You can toggle the launch of Byobu at login with:
  'byobu-disable' and 'byobu-enable'

For tips, tricks, and more information, see:
 * http://bit.ly/byobu-help

ubuntu@t1:~⟫ cat /etc/issue
Ubuntu 14.04.3 LTS \n \l

1 ubuntu@t1:~⟫ sudo apt-get install php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  apache2 apache2-bin apache2-data libapache2-mod-php5 libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap php5-cli php5-common php5-json
  php5-readline ssl-cert
Suggested packages:
  apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils
  php-pear php5-user-cache openssl-blacklist
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data libapache2-mod-php5 libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap php5 php5-cli php5-common php5-json
  php5-readline ssl-cert
0 upgraded, 14 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,150 kB of archives.
After this operation, 25.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libapr1 amd64 1.5.0-1 [85.1 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main libaprutil1 amd64 1.5.3-1 [76.4 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main php5-json amd64 1.3.2-2build1 [34.4 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty-updates/main php5-common amd64 5.5.9+dfsg-1ubuntu4
.11 [444 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ trusty-updates/main php5-cli amd64 5.5.9+dfsg-1ubuntu4.11
 [2,164 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ trusty-updates/main php5-readline amd64 5.5.9+dfsg-1ubunt
u4.11 [12.1 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ trusty/main libaprutil1-dbd-sqlite3 amd64 1.5.3-1 [10.5 k
B]
Get:8 http://archive.ubuntu.com/ubuntu/ trusty/main libaprutil1-ldap amd64 1.5.3-1 [8,634 B]
Get:9 http://archive.ubuntu.com/ubuntu/ trusty-updates/main apache2-bin amd64 2.4.7-1ubuntu4.5 [8
43 kB]
Get:10 http://archive.ubuntu.com/ubuntu/ trusty-updates/main apache2-data all 2.4.7-1ubuntu4.5 [1
59 kB]
Get:11 http://archive.ubuntu.com/ubuntu/ trusty-updates/main apache2 amd64 2.4.7-1ubuntu4.5 [87.6
 kB]
Get:12 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libapache2-mod-php5 amd64 5.5.9+dfsg
-1ubuntu4.11 [2,208 kB]
Get:13 http://archive.ubuntu.com/ubuntu/ trusty-updates/main php5 all 5.5.9+dfsg-1ubuntu4.11 [1,3
02 B]
Get:14 http://archive.ubuntu.com/ubuntu/ trusty/main ssl-cert all 1.0.33 [16.6 kB]
Fetched 6,150 kB in 36s (168 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libapr1:amd64.
(Reading database ... 51148 files and directories currently installed.)
Preparing to unpack .../libapr1_1.5.0-1_amd64.deb ...
Unpacking libapr1:amd64 (1.5.0-1) ...
...

tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for php5 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package php5 - 5.5.9+dfsg-1ubuntu4.12

---------------
php5 (5.5.9+dfsg-1ubuntu4.12) trusty; urgency=medium

  * Fix PHP Fatal error: Inconsistent insteadof definition (LP: #1474276)
    - Apply upstream fix

 -- Ryan Harper <email address hidden> Thu, 13 Aug 2015 09:55:34 -0500

Changed in php5 (Ubuntu Trusty):
status: Fix Committed → 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.