Page MenuHomePhabricator

InvalidArgumentException: Unable to normalize the provided actor name x.y.z.v/16
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   InvalidArgumentException: Unable to normalize the provided actor name a.b.c.d/e
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.6/includes/user/ActorStore.php(244)
#0 /srv/mediawiki/php-1.37.0-wmf.6/includes/user/User.php(924): MediaWiki\User\ActorStore->getUserIdentityByName(string, integer)
#1 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Flow/includes/Formatter/ContributionsQuery.php(133): User::idFromName(string)
#2 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Flow/includes/Formatter/ContributionsQuery.php(62): Flow\Formatter\ContributionsQuery->buildConditions(ContribsPager, string, boolean)
#3 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Flow/includes/Hooks.php(932): Flow\Formatter\ContributionsQuery->getResults(ContribsPager, string, integer, boolean)
#4 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Flow/includes/Hooks.php(967): Flow\Hooks::onDeletedContributionsQuery(array, ContribsPager, string, integer, boolean)
#5 /srv/mediawiki/php-1.37.0-wmf.6/includes/HookContainer/HookContainer.php(330): Flow\Hooks::onContributionsQuery(array, ContribsPager, string, integer, boolean)
#6 /srv/mediawiki/php-1.37.0-wmf.6/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#7 /srv/mediawiki/php-1.37.0-wmf.6/includes/HookContainer/HookRunner.php(1299): MediaWiki\HookContainer\HookContainer->run(string, array)
#8 /srv/mediawiki/php-1.37.0-wmf.6/includes/specials/pagers/ContribsPager.php(262): MediaWiki\HookContainer\HookRunner->onContribsPager__reallyDoQuery(array, ContribsPager, string, integer, boolean)
#9 /srv/mediawiki/php-1.37.0-wmf.6/includes/pager/IndexPager.php(280): ContribsPager->reallyDoQuery(string, integer, boolean)
#10 /srv/mediawiki/php-1.37.0-wmf.6/includes/pager/IndexPager.php(733): IndexPager->doQuery()
#11 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiFeedContributions.php(122): IndexPager->getNumRows()
#12 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiMain.php(1669): ApiFeedContributions->execute()
#13 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiMain.php(639): ApiMain->executeAction()
#14 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiMain.php(610): ApiMain->executeActionWithErrorHandling()
#15 /srv/mediawiki/php-1.37.0-wmf.6/api.php(90): ApiMain->execute()
#16 /srv/mediawiki/php-1.37.0-wmf.6/api.php(45): wfApiMain()
#17 /srv/mediawiki/w/api.php(3): require(string)
#18 {main}
Impact

A few, happening on group 1 wikis (ex: wikidata, hewiki). Apparently caused by Flow\Hooks::onDeletedContributionsQuery ?

Notes

The feedcontributions API might be given a user which is an IP block such as 198.51.100.0/24 which ends up triggering the above exception.

Details

Event Timeline

hashar triaged this task as Unbreak Now! priority.May 19 2021, 2:44 PM
hashar created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
thcipriani subscribed.

Tagging #PET in case this is related to recent refactoring

Change 692948 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@master] Also check for ip ranges

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

Change 692948 restored by Zabe:

[mediawiki/core@master] Also check for ip ranges

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

Change 692948 merged by jenkins-bot:

[mediawiki/core@master] ActorStore: avoid throwing in case of invalid usernames

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

Change 693029 had a related patch set uploaded (by Jforrester; author: Zabe):

[mediawiki/core@wmf/1.37.0-wmf.6] ActorStore: avoid throwing in case of invalid usernames

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

Change 693029 merged by jenkins-bot:

[mediawiki/core@wmf/1.37.0-wmf.6] ActorStore: avoid throwing in case of invalid usernames

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

Mentioned in SAL (#wikimedia-operations) [2021-05-20T13:50:00Z] <hashar@deploy1002> Synchronized php-1.37.0-wmf.6/includes/user/ActorStore.php: ActorStore: avoid throwing in case of invalid usernames T283167 (duration: 01m 05s)

hashar assigned this task to Zabe.

Should be all fixed now. I have removed the filter in logstash and if the error occurs again I will reopen this task.