Page MenuHomePhabricator

Betacluster exception thrown on login: Domain 'wikifunctionswiki' is not recognized.
Closed, ResolvedPublicPRODUCTION ERROR

Description

Steps to replicate the issue (include links if applicable):

log in to https://en.wikipedia.beta.wmflabs.org/

What happens?:

[Z_a6E1XQS8H4gY-I1liYKwAAAAM] /w/index.php?returnto=Main+Page&title=Special:UserLogin LogicException: Domain 'wikifunctionswiki' is not recognized.

Backtrace:

from /srv/mediawiki/php-master/includes/jobqueue/JobQueueGroupFactory.php(108)
#0 /srv/mediawiki/php-master/includes/user/UserGroupManagerFactory.php(112): MediaWiki\JobQueue\JobQueueGroupFactory->makeJobQueueGroup(string)
#1 /srv/mediawiki/php-master/extensions/CentralAuth/includes/User/CentralAuthUser.php(2937): MediaWiki\User\UserGroupManagerFactory->getUserGroupManager(string)
#2 /srv/mediawiki/php-master/extensions/CentralAuth/includes/User/CentralAuthUser.php(2762): MediaWiki\Extension\CentralAuth\User\CentralAuthUser->localUserData(string)
#3 /srv/mediawiki/php-master/extensions/CentralAuth/includes/User/CentralAuthUser.php(2731): MediaWiki\Extension\CentralAuth\User\CentralAuthUser->queryAttached()
#4 /srv/mediawiki/php-master/extensions/CentralAuth/includes/Hooks/Handlers/PasswordPoliciesHookHandler.php(53): MediaWiki\Extension\CentralAuth\User\CentralAuthUser->getLocalGroups()
#5 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(155): MediaWiki\Extension\CentralAuth\Hooks\Handlers\PasswordPoliciesHookHandler->onPasswordPoliciesForUser(MediaWiki\User\User, array)
#6 /srv/mediawiki/php-master/includes/HookContainer/HookRunner.php(3137): MediaWiki\HookContainer\HookContainer->run(string, array)
#7 /srv/mediawiki/php-master/includes/password/UserPasswordPolicy.php(196): MediaWiki\HookContainer\HookRunner->onPasswordPoliciesForUser(MediaWiki\User\User, array)
#8 /srv/mediawiki/php-master/includes/password/UserPasswordPolicy.php(87): MediaWiki\Password\UserPasswordPolicy->getPoliciesForUser(MediaWiki\User\User)
#9 /srv/mediawiki/php-master/includes/user/User.php(1025): MediaWiki\Password\UserPasswordPolicy->checkUserPassword(MediaWiki\User\User, string)
#10 /srv/mediawiki/php-master/includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php(114): MediaWiki\User\User->checkPasswordValidity(string)
#11 /srv/mediawiki/php-master/includes/auth/AbstractTemporaryPasswordPrimaryAuthenticationProvider.php(155): MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider->checkPasswordValidity(string, string)
#12 /srv/mediawiki/php-master/includes/auth/AuthManager.php(563): MediaWiki\Auth\AbstractTemporaryPasswordPrimaryAuthenticationProvider->beginPrimaryAuthentication(array)
#13 /srv/mediawiki/php-master/includes/auth/AuthManager.php(473): MediaWiki\Auth\AuthManager->continueAuthentication(array)
#14 /srv/mediawiki/php-master/includes/specialpage/AuthManagerSpecialPage.php(408): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)
#15 /srv/mediawiki/php-master/includes/specialpage/AuthManagerSpecialPage.php(542): MediaWiki\SpecialPage\AuthManagerSpecialPage->performAuthenticationStep(string, array)
#16 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(823): MediaWiki\SpecialPage\AuthManagerSpecialPage->handleFormSubmit(array, MediaWiki\HTMLForm\CodexHTMLForm)
#17 /srv/mediawiki/php-master/includes/specialpage/AuthManagerSpecialPage.php(473): MediaWiki\HTMLForm\HTMLForm->trySubmit()
#18 /srv/mediawiki/php-master/includes/specialpage/LoginSignupSpecialPage.php(407): MediaWiki\SpecialPage\AuthManagerSpecialPage->trySubmit()
#19 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(729): MediaWiki\SpecialPage\LoginSignupSpecialPage->execute(null)
#20 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(1738): MediaWiki\SpecialPage\SpecialPage->run(null)
#21 /srv/mediawiki/php-master/includes/actions/ActionEntryPoint.php(499): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#22 /srv/mediawiki/php-master/includes/actions/ActionEntryPoint.php(143): MediaWiki\Actions\ActionEntryPoint->performRequest()
#23 /srv/mediawiki/php-master/includes/MediaWikiEntryPoint.php(202): MediaWiki\Actions\ActionEntryPoint->execute()
#24 /srv/mediawiki/php-master/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#25 /srv/mediawiki/w/index.php(3): require(string)
#26 {main}

What should have happened instead?:

A successful login

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
1.44.0-alpha (4ec157a)
07:06, 9 April 2025

Other information (browser name/version, screenshots, etc.):

Possibly an artifact left after decommissioning wikifunctions in betacluster ?

Screenshot 2025-04-09 at 1.21.26 PM.png (1×2 px, 838 KB)

Event Timeline

vaughnwalters renamed this task from Betacluster exception thrown on login `Domain 'wikifunctionswiki' is not recognized.` to Betacluster exception thrown on login: Domain 'wikifunctionswiki' is not recognized..Apr 9 2025, 6:28 PM
vaughnwalters updated the task description. (Show Details)
Restricted Application changed the subtype of this task from "Bug Report" to "Production Error". · View Herald TranscriptApr 9 2025, 10:06 PM

Oh, bleh, we probably need to hack CentralAuth's list of sister projects to drop Beta Cluster somewhere?

As I thought, I had dropped it from wmgCentralAuthAutoLoginWikis and it's not in wmgCentralAuthCookieDomain.

The production domain is still present in wgCentralNoticeContentSecurityPolicy and wmgApprovedContentSecurityPolicyDomains, but that shouldn't have an effect.

https://en.wikipedia.beta.wmflabs.org/wiki/Special:CentralAuth/Yatu also throws a similar error.

The problem is probably in the data – users who have attached local accounts on beta Wikifunctions will now experience all kinds of errors whenever CentralAuth tries to do something with those accounts. I don't know if we have a maintenance script for cleanup after deleting a wiki…

https://en.wikipedia.beta.wmflabs.org/wiki/Special:CentralAuth/Yatu also throws a similar error.

The problem is probably in the data – users who have attached local accounts on beta Wikifunctions will now experience all kinds of errors whenever CentralAuth tries to do something with those accounts. I don't know if we have a maintenance script for cleanup after deleting a wiki…

Oh, right, that makes sense as an issue. (We didn't run into it IIRC when we shut previous Beta Cluster wikis, so I assume this is new-ish code?)

Change #1135518 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/CentralAuth@master] CentralAuthUser: Don't explode if the wiki isn't found, e.g. wiki was deleted

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

For a maintenance script, something based off DeleteEmptyAccounts would probably be easiest; is that code known to be good/current?

I don't know if we have a maintenance script for cleanup after deleting a wiki…

There was once a deleteWiki.php script in WikimediaMaintenance. It was deleted in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaMaintenance/+/1027585

Mentioned in SAL (#wikimedia-releng) [2025-04-10T14:03:44Z] <James_F> [Beta Cluster] On deployment-deploy04, running DELETE FROM localuser WHERE lu_wiki='wikifunctionswiki'; and DELETE FROM localnames WHERE ln_wiki='wikifunctionswiki'; for T391511

OK, no accounts now have a local user in localuser or localnames, but 58 still have globaluser entries with gu_home_db set to wikifunctionswiki. I could just set it to NULL, which 236k accounts have (out of the ~ 285k in Beta Cluster overall).

58 still have globaluser entries with gu_home_db set to wikifunctionswiki.

That's T268711: Many users have a gu_home_db in deleted.dblist and apparently harmless enough that no one has done anything about it for years.

matmarex assigned this task to Jdforrester-WMF.

Looks fixed.

Change #1135518 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] CentralAuthUser: Don't explode if the wiki isn't found, e.g. wiki was deleted

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