Page MenuHomePhabricator

Sometimes Redis does not work on MediaWiki-Vagrant with PHP 7.2
Open, Needs TriagePublic

Description

After upgrading to the Vagrant version with PHP 7.2, redis does not work anymore, and all PHP calls spam this error:

PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20170718/redis.so (/usr/lib/php/20170718/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20170718/redis.so.so (/usr/lib/php/20170718/redis.so.so: cannot open shared object file: No such file or directory))

Only happened on one of my Vagrant boxes. There are some mentions of this bug on the internet which also claim it it nondeterministic.

Event Timeline

Someone on StackOverflow recommends installing php-igbinary; that seems to work. Maybe it should be added to vagrant?

Change 482758 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/vagrant@master] Add php-igbinary

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

Change 482758 merged by jenkins-bot:
[mediawiki/vagrant@master] Add php-igbinary

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

Tgr claimed this task.

Let's say this is fixed. I ran into a similar error where php-redis itself wasn't installed (that should also not have been possible in theory). Hopefully I just have bad luck.

Let's say this is fixed. I ran into a similar error where php-redis itself wasn't installed (that should also not have been possible in theory). Hopefully I just have bad luck.

I still get this on other boxes.

==> default: Notice: /Stage[main]/Mediawiki/Mediawiki::User[admin_user_in_steward_suppress_on_wiki]/Mediawiki::Maintenance[mediawiki_user_Admin_wiki]/Exec[mediawiki_user_Admin_wiki]/returns: PHP Fatal error:  Uncaught RuntimeException: RedisConnectionPool requires a Redis client library. See https://www.mediawiki.org/wiki/Redis#Setup in /vagrant/mediawiki/includes/libs/redis/RedisConnectionPool.php:80

Maybe an ordering issue? In theory, php-redis is installed in ::redis::php, which is included in ::redis, which is required in ::mediawiki, which is included in ::mediawiki::settings, which is forced with a resource collector to run before ::mediawiki::maintenance... is that good enough?

Looking closer, php-redis is actually installed on the box, but it's the plain Debian version, not the WMF version (and it seems a lot older, so it presumably does not support 7.2 - the DPKG Depends clause says phpapi-20151012 while for the WMF version it's phpapi-20180731 | phpapi-20170718 | phpapi-20160303 | phpapi-20151012 | phpapi-20131226. So I guess Puppet installed it at some point when the WMF repo didn't include a higher-priority version, and now that it does Puppet's package clause is not intelligent enough to update it?
(As before, manually running sudo apt install php-redis fixes the issue, because that does install the WMF version. Although I then have to do the same thing for php-igbinary as well, which is also not automatically upgraded.)

Thanks for this. Ran into the same problem, and sudo apt install php-redis php-igbinary fixed.

Aklapper removed Tgr as the assignee of this task.Jul 2 2021, 5:11 AM

Removing task assignee due to inactivity, as this open task has been assigned for more than two years (see emails sent to assignee on May26 and Jun17, and T270544). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be very welcome!

(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)