Page MenuHomePhabricator

CentralAuthIdLookup::lookupUserNames: Wikimedia\NormalizedException\NormalizedException: invalid username: {name} (via Special:Contributions or Special:BlockList)
Open, Needs TriagePublicPRODUCTION ERROR

Description

There is a big spike of these, about 1000/hour:

Screenshot Capture - 2025-03-06 - 03-04-09.png (1,328×424 px, 39 KB)

(logstash)

Probably the same issue as T377588: CentralAuthIdLookup throws from CentralAuthUser for username with a colon, and the spike is due to rECAU8a71203e0999: CentralAuthIdLookup: Reuse cached object on single-value lookup making CentralAuthIdLookup use CentralAuthUser internally.

Error
  • service.version: 1.45.0-wmf.8
  • timestamp: 2025-07-09T22:15:11.897Z
  • labels.phpversion: 8.1.32
  • trace.id: a5a3ec7f-7dcf-4fac-8538-3d3869b876e2
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   Wikimedia\NormalizedException\NormalizedException: Invalid username: {username}
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.8/extensions/CentralAuth/includes/User/CentralAuthUser.php(229)
#0/srv/mediawiki/php-1.45.0-wmf.8/extensions/CentralAuth/includes/User/CentralAuthUser.php(244)MediaWiki\Extension\CentralAuth\User\CentralAuthUser::normalizeUsername(string)
#1/srv/mediawiki/php-1.45.0-wmf.8/extensions/CentralAuth/includes/User/CentralAuthUser.php(208)MediaWiki\Extension\CentralAuth\User\CentralAuthUser::getInstanceByName(string)
#2/srv/mediawiki/php-1.45.0-wmf.8/extensions/CentralAuth/includes/User/CentralAuthIdLookup.php(371)MediaWiki\Extension\CentralAuth\User\CentralAuthUser::getInstance(MediaWiki\User\User)
#3/srv/mediawiki/php-1.45.0-wmf.8/extensions/CentralAuth/includes/User/CentralAuthIdLookup.php(341)MediaWiki\Extension\CentralAuth\User\CentralAuthIdLookup->getCentralUserInstance(MediaWiki\User\User, int)
#4/srv/mediawiki/php-1.45.0-wmf.8/extensions/CentralAuth/includes/User/CentralAuthIdLookup.php(322)MediaWiki\Extension\CentralAuth\User\CentralAuthIdLookup->isAttachedOn(MediaWiki\User\User, string, int)
#5/srv/mediawiki/php-1.45.0-wmf.8/extensions/GlobalBlocking/includes/Services/GlobalBlockLookup.php(236)MediaWiki\Extension\CentralAuth\User\CentralAuthIdLookup->centralIdFromLocalUser(MediaWiki\User\User, int)
#6/srv/mediawiki/php-1.45.0-wmf.8/extensions/GlobalBlocking/includes/Services/GlobalBlockLookup.php(95)MediaWiki\Extension\GlobalBlocking\Services\GlobalBlockLookup->getUserBlockDetails(MediaWiki\User\User, null)
#7/srv/mediawiki/php-1.45.0-wmf.8/extensions/GlobalBlocking/includes/GlobalBlockingHooks.php(103)MediaWiki\Extension\GlobalBlocking\Services\GlobalBlockLookup->getUserBlock(MediaWiki\User\User, null)
#8/srv/mediawiki/php-1.45.0-wmf.8/includes/HookContainer/HookContainer.php(155)MediaWiki\Extension\GlobalBlocking\GlobalBlockingHooks->onGetUserBlock(MediaWiki\User\User, null, null)
#9/srv/mediawiki/php-1.45.0-wmf.8/includes/HookContainer/HookRunner.php(2028)MediaWiki\HookContainer\HookContainer->run(string, array)
#10/srv/mediawiki/php-1.45.0-wmf.8/includes/block/BlockManager.php(227)MediaWiki\HookContainer\HookRunner->onGetUserBlock(MediaWiki\User\User, null, null)
#11/srv/mediawiki/php-1.45.0-wmf.8/includes/user/User.php(1465)MediaWiki\Block\BlockManager->getBlock(MediaWiki\User\User, null, bool)
#12/srv/mediawiki/php-1.45.0-wmf.8/includes/user/User.php(1543)MediaWiki\User\User->getBlock()
#13/srv/mediawiki/php-1.45.0-wmf.8/includes/specialpage/ContributionsSpecialPage.php(639)MediaWiki\User\User->isHidden()
#14/srv/mediawiki/php-1.45.0-wmf.8/includes/specialpage/ContributionsSpecialPage.php(439)MediaWiki\SpecialPage\ContributionsSpecialPage->getUserLink(MediaWiki\User\User)
#15/srv/mediawiki/php-1.45.0-wmf.8/includes/specialpage/ContributionsSpecialPage.php(242)MediaWiki\SpecialPage\ContributionsSpecialPage->contributionsSub(MediaWiki\User\User, string)
#16/srv/mediawiki/php-1.45.0-wmf.8/includes/specialpage/SpecialPage.php(732)MediaWiki\SpecialPage\ContributionsSpecialPage->execute(string)
#17/srv/mediawiki/php-1.45.0-wmf.8/includes/specialpage/SpecialPageFactory.php(1724)MediaWiki\SpecialPage\SpecialPage->run(string)
#18/srv/mediawiki/php-1.45.0-wmf.8/includes/actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#19/srv/mediawiki/php-1.45.0-wmf.8/includes/actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#20/srv/mediawiki/php-1.45.0-wmf.8/includes/MediaWikiEntryPoint.php(198)MediaWiki\Actions\ActionEntryPoint->execute()
#21/srv/mediawiki/php-1.45.0-wmf.8/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#22/srv/mediawiki/w/index.php(3)require(string)
#23{main}
Impact
Notes

Details

MediaWiki Version
1.45.0-wmf.8

Event Timeline

Restricted Application changed the subtype of this task from "Task" to "Production Error". · View Herald Transcript
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The errors are from Special:Contributions and Special:BlockList; the usernames are either IP addresses or something nonsensical (like a filename). CentralAuthIdLookup swallows the error and returns no user found, so no user impact, just log noise. (Also it logs at warning level, so I guess this technically doesn't qualify as Wikimedia-production-error.)

Aklapper renamed this task from CentralAuthIdLookup::lookupUserNames: invalid username: {name} to CentralAuthIdLookup::lookupUserNames: Wikimedia\NormalizedException\NormalizedException: invalid username: {name} (via Special:Contributions or Special:BlockList).Jul 10 2025, 9:12 AM
Aklapper updated the task description. (Show Details)
Aklapper set Release Version to 1.45.0-wmf.8.
brennen subscribed.

Still noted in 1.45.0-wmf.12.

just log noise. (Also it logs at warning level, so I guess this technically doesn't qualify as Wikimedia-production-error.)

I'm still seeing these on 1.45.0-wmf.13 and they seem to be logged as errors and not warnings. Is there something we can do about this? Maybe make them actual warnings because if a username is invalid, it's invalid and there is very little we can do about it?

We could make sure all CentralAuthUser calls are noop when the username is invalid, and then relax the restrictions for getInstanceByName() etc.