Page MenuHomePhabricator

Account autocreation error logspam with "Username entered already in use"
Closed, ResolvedPublic

Description

There is some logspam from loginwiki (about 10/min) saying "MediaWiki\Auth\AuthManager::autoCreateUser: {username} failed with message Username entered already in use. Please choose a different name.. This is probably caused by a race condition between CentralAuthCreateLocalAccountJob and SpecialCentralAutoLogin. The autocreate logic tries to handle such races nicely: it checks for existence and handles it as a non-error; then does a bunch of other checks and applies locks; then adds the user to the DB and on failure checks whether the user exists already and again handles that as a non-error; only if that all fails will it log an error. Apparently both of those checks manage to fail somehow.

Event Timeline

Tgr created this task.Sep 8 2016, 8:44 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 8 2016, 8:44 PM

Change 309476 had a related patch set uploaded (by Gergő Tisza):
Avoid user autocreation race condition caused by repeatable read

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

Change 309476 merged by jenkins-bot:
Avoid user autocreation race condition caused by repeatable read

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

Tgr closed this task as Resolved.Sep 16 2016, 11:09 PM
Tgr claimed this task.

The error disappeared Thursday 19h UTC and reappeared Friday 13h UTC which matches the branch change times, so it looks like this fixes the autocreation failures for good.