PHP 8.1.2-1ubuntu2.13 in 22.04 LTS: broken class autoloading due to opcache bug

Bug #2032615 reported by tgoeg
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php8.1 (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Class autoloading in PHP <8.1.6 is broken due to an opcache bug.

This is known to affect multiple products (https://github.com/php/php-src/issues/8164, https://www.drupal.org/forum/support/post-installation/2023-01-04/ubuntu-2204-how-to-upgrade-php-to-816-or-later) and already fixed (https://github.com/php/php-src/pull/8297) upstream.

Please provide a usable PHP8.1 version >= 8.1.6, this affects a lot of users and products.

Thanks!

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Hi tgoeg,

Thanks for taking the time to report this bug and help us improve Ubuntu.

However, note that this is either a regression or a duplicate of LP: #1983205.

We fixed this issue in Ubuntu 22.04 in php 8.1.2-1ubuntu2.5. Therefore, the version mentioned in the bug title should be fixed.

Moreover, as discussed with the Drupal community in the LP bug linked above, we also addressed LP: #1989196 in php 8.1.2-1ubuntu2.6, still in Ubuntu 22.04, to append the debian_revision part of the php package version to the PHP_VERSION predefined constant.

This means that checking the PHP_VERSION within PHP should now give you enough information to understand if a specific bug has been addressed in your PHP.

I am also seeing some discussions going on in

- https://www.drupal.org/project/drupal/issues/3258987
- https://www.drupal.org/project/drupal/issues/3307248
- https://www.drupal.org/forum/support/post-installation/2023-01-04/ubuntu-2204-how-to-upgrade-php-to-816-or-later

With recent discussion related to this bug.

In special, see https://www.drupal.org/project/drupal/issues/3307248#comment-15182072.

While this is supposed to be fixed (note that there are upstream tests running during build time to verify this), there is at least one user reporting a regression in the Drupal forums. I wonder if this is a user error (wrong version/configuration/etc) or an actual regression.

To verify this, we would need a reproducer. Would you be able to provide one?

I am marking this bug incomplete for now, until a reproducer is provided. Once you can provide one, please, set this bug status back to new. Without a reproducer, this should be considered a duplicate of the bug linked above.

Changed in php8.1 (Ubuntu):
status: New → Incomplete
Revision history for this message
tgoeg (tgoeg) wrote :

Sorry for the dupe.
I really searched as much as I could and https://bugs.launchpad.net/ubuntu/+source/php8.1?field.searchtext=php8.1&search=Search does not list your referenced bug, which is pretty strange.

I feared there might be a backport fixing this, but I was unable to find which features/bugfixes of a certain future version are backported to Ubuntu's own version (and I think taking patch-level upstream fixes as they are would be the more logical way, but that's probably the rolling-release distro spoiled side of me :-) )

Where can I find this info? Any pointers appreciated so I don't bother you in the future.

The only thing I have so far is the warning in Drupal's status page - I just want to make sure everything's alright before switching to 22.04 LTS. No error or reproducer so far, sorry :(

There are actually two mentions of people still hitting it, https://www.drupal.org/project/drupal/issues/3307248#comment-15115848 is the second one.
But as you said - might be caused by misconfiguration or not clearing the opcache.

If I hit the bug, I'll certainly update here with any findings.
Meanwhile, please let me know how to determine the features backported.
Thanks in advance!

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

No worries. Thanks for taking the time to report this anyway!

You can read the changes available for a package in the package changelog.

You can either run

apt changelog PACKAGE

which would download the changelog, or read it locally in

/usr/share/doc/BINARY_PACKAGE/changelog.Debian.gz

Please, do share any findings regarding this bug being present/absent in 22.04 :)

Revision history for this message
tgoeg (tgoeg) wrote :

The changelogs help a little, at least, thanks!

Having the original vendor's bug in the messages would help much more however, as I wasn't even able to find your linked bug with what I think was a pretty precise query (as shown with the link above).

Therefore, having to find the LP bug first only to be able to find the according fix in the changelog would not have led me to the actual fix, either. Probably add both, the LP bug ID and the vendor's issue (github issue in PHP in this case) in the future?

There should be some Ubuntu-(Debian?-)wide policy for this as I think this does not only affect PHP packages.

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.