Page MenuHomeMiraheze

Renames getting stuck on deleted wikis
Open, LowPublic


This didn't seem to be an issue for a while but two recent renames got stuck on deleted wikis.

One was T7010

!log rhinos@jobrunner3:~$ sudo -u www-data php /srv/mediawiki/w/extensions/CentralAuth/maintenance/fixStuckGlobalRename.php --wiki=altuniverseuk1182wiki --logwiki=metawiki KingstonuHull-h1986 KingstonHolm861 for [[phab:T7010|T7010]]

and the other was (Task?)

reception@jobrunner3:~$ sudo -u www-data php /srv/mediawiki/w/extensions/CentralAuth/maintenance/fixStuckGlobalRename.php --wiki=jrapp494wiki --logwiki=metawiki 'IntegraInfinity' 'OfficerJH'

Both seem to be deleted wikis, not sure it's being getting stuck in a while so has something changed?

Only happens where deleted wiki is first alphabetically, see for running example.

Event Timeline

RhinosF1 triaged this task as Normal priority.Mar 21 2021, 10:39
RhinosF1 created this task.

and the other was (Task?)

I don't think there was an actual task in the earlier recent instance; was likely just requested on IRC via DM to @Reception123, if I remember correctly

I propose to try to reproduce this again we: create a test account and a test wiki, attach that account to other random wikis, delete the wiki and rename the user and see if this happens.

Reception123 moved this task from Backlog to Bugs on the MediaWiki board.
Reception123 lowered the priority of this task from Normal to Low.Mar 22 2021, 19:05
Reception123 moved this task from Short Term to Backlog on the MediaWiki (SRE) board.

Looks like this is only happening when the wiki that's deleted (marked as deleted) is also the first wiki alphabetically in CA. Therefore, due to the fact that this is rarely going to happen, this task is low priority.

root@test3:~# php /srv/mediawiki/w/maintenance/eval.php --wiki metawiki
> $jQ = JobQueueGroup::singleton('metawiki');

> var_dump( get_class( $jQ ) );
string(13) "JobQueueGroup"

> var_dump( $jQ->getQueuesWithJobs() );
array(0) {

> $jQ = JobQueueGroup::singleton('aaawiki');

> var_dump( get_class( $jQ ) );
string(13) "JobQueueGroup"

> var_dump( $jQ->getQueuesWithJobs() );

Notice: unserialize(): Error at offset 0 of 2484 bytes in /srv/mediawiki/w/includes/SiteConfiguration.php on line 573
Caught exception MWException: Failed to unserialize configuration array.
#0 /srv/mediawiki/w/includes/jobqueue/JobQueueGroup.php(457): SiteConfiguration->getConfig('aaawiki', Array)
#1 /srv/mediawiki/w/includes/libs/objectcache/wancache/WANObjectCache.php(1529): JobQueueGroup->{closure}(false, 151024, Array, NULL, Array)
#2 /srv/mediawiki/w/includes/libs/objectcache/wancache/WANObjectCache.php(1376): WANObjectCache->fetchOrRegenerate('global:jobqueue...', 151024, Object(Closure), Array, Array)
#3 /srv/mediawiki/w/includes/jobqueue/JobQueueGroup.php(459): WANObjectCache->getWithSetCallback('global:jobqueue...', 151024, Object(Closure), Array)
#4 /srv/mediawiki/w/includes/jobqueue/JobQueueGroup.php(323): JobQueueGroup->getCachedConfigVar('wgJobClasses')
#5 /srv/mediawiki/w/includes/jobqueue/JobQueueGroup.php(429): JobQueueGroup->getQueueTypes()
#6 /srv/mediawiki/w/includes/jobqueue/JobQueueGroup.php(368): JobQueueGroup->getCoalescedQueues()
#7 /srv/mediawiki/w/maintenance/eval.php(78) : eval()'d code(1): JobQueueGroup->getQueuesWithJobs()
#8 /srv/mediawiki/w/maintenance/eval.php(78): eval()
#9 {main}

Ignore the above - problem was caused by aaawiki not have a cache file on test3.

Rename worked when I did:

root@test3:~# php /srv/mediawiki/w/maintenance/eval.php --wiki metawiki
> $rn = new GlobalRenameUser( User::newFromName( 'Dmehus' ), User::newFromName(
'RenameTestAccount2' ), CentralAuthUser::getInstance( User::newFromName( 'RenameTestAccount2' ) ), User::newFromName( 'RenameTestAccount' ), CentralAuthUser::g
tInstance( User::newFromName( 'RenameTestAccount' ) ), new GlobalRenameUserStat
s( 'RenameTestAccount' ), 'JobQueueGroup::singleton', new GlobalRenameUserDatab
seUpdates(), new GlobalRenameUserLogger( User::newFromName( 'Dmehus' ) ), RequestContext::getMain()->exportSession() );

> $rn->rename( [ 'oldname' => 'RenameTestAccount2', 'newname' => 'RenameTestAccount', 'reason' => 'Test', 'movepages' => true, 'suppressredirects' => true, 'overrideantispoof' => true, 'overridetitleblacklist' => true, 'allowhigheditcount' => true ] );

aka put the job into the queue. Therefore the issue is just that the job doesn't get queued initially - I am unsure why. is likely returning false if the first wiki on CentralAuth is not properly attached (if the wiki is marked as deleted per CreateWiki, can cause CA to not read it as attached from what I see here), leading to the job never being inserted from

I will run a few tests, by checking some functions return value using eval.php.

From what I can tell however, this should still theoretically work from Special:GlobalRenameUser just not from Special:GlobalRenameQueue. If neither work then my theory is likely wrong. actually neither may work. It's possible that is also returning false, and it would make sense for it to. In which case Special:GlobalRenameUser would also not work.