Page MenuHomePhabricator

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

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

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 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.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM