Today I discovered that using 8 & 9 parameters for AutoPromote (["!",8,9]), causes php to oom. I only discovered this after investigating one of our wikis OOM'ing.
I reproduced by doing:
MariaDB [mhglobal]> update mw_permissions set perm_autopromote = '["!",8,9]' where perm_dbname = 'pkvastwiki' and perm_group = 'user';
(our automation to set wgAutopromote).
Debugging a bit more I see getBlock causes an oom here https://github.com/wikimedia/mediawiki/blob/04fb8689b4d90e1c4cc7fe5aef2999492c21ebe4/includes/user/User.php#L1894
Digging deeper I get to https://github.com/wikimedia/mediawiki/blob/REL1_35/includes/block/BlockManager.php#L132
then digging even deeper and I get to https://github.com/wikimedia/mediawiki/blob/REL1_35/includes/Permissions/PermissionManager.php#L1293
Either there is a new request or this isn't caching as logging it, I get a load of empties thus that if statement keeps executing.