Page MenuHomePhabricator

Deadlock on user account creation leaves account in bad state
Closed, ResolvedPublic


When creating the user account "17iwang" on the English Wikipedia on behalf of a student, I received this error message:

Last attempted database query: (SQL query hidden)
Function: User::saveOptions
MySQL error: 1213: Deadlock found when trying to get lock; try restarting transaction (

I tried to repeat the create operation, but was told:

"The requested username is already taken in the unified login system. Please choose a different name."

I visited the user's user page, but it stated:

"User account "17iwang" is not registered."

Eventually I worked around this issue by logging in to the English Wikipedia as the student, using the password I supplied during the initial create attempt (the one that produced the deadlock).

It appears to be rare and based on concurrent transactions - I've never seen it before or since, despite creating many accounts.

Version: 1.19
Severity: normal



Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:25 AM
bzimport set Reference to bz36116.
bzimport added a subscriber: Unknown Object (MLST).

Could similar deadlocks be the root reason for centralauth/SUL problems like bug 42027, bug 39060, bug 39996, bug 35792, bug 39997 and friends?

Created attachment 11360
My account said not to exist on my userpage after successful automatic login

(In reply to comment #0)

I visited the user's user page, but it stated:

"User account "17iwang" is not registered."

Now that I think of, I had this very problem last Sunday when logging in for the first time on Wikivoyage. I think logging out and in again fixed it again but I didn't understand the root reason.


en.voy.png (768×1 px, 45 KB)

Change 137977 had a related patch set uploaded by Aaron Schulz:
More optimizations to User::saveOptions()

Change 137977 merged by jenkins-bot:
More optimizations to User::saveOptions()

Patches by Aaron mentioned in this report was merged - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?

No reply to comment 5.
All patches mentioned in this report were merged or abandoned - assuming this bug is FIXED. If that is not the case: Please reopen and elaborate what is left to do here to get this report fixed.