Page MenuHomePhabricator

[Regression] CentralAuth: Fix "User::addToDatabase: hit a key conflict"
Closed, ResolvedPublic

Description

Earlier today 5 exceptions were logged by CentralAuthHooks::attemptAddUser.

User::addToDatabase: hit a key conflict attempting to insert user 'Mkhz2' row, but it was not present in select!
#0 /usr/local/apache/common-local/php-1.24wmf6/extensions/CentralAuth/CentralAuthHooks.php(856): User->addToDatabase()
#1 /usr/local/apache/common-local/php-1.24wmf6/extensions/CentralAuth/CentralAuthHooks.php(581): CentralAuthHooks::attemptAddUser(Object(User))
#2 [internal function]: CentralAuthHooks::onUserLoadFromSession(Object(User), NULL)
#3 /usr/local/apache/common-local/php-1.24wmf6/includes/Hooks.php(206): call_user_func_array('CentralAuthHook...', Array)
#4 /usr/local/apache/common-local/php-1.24wmf6/includes/GlobalFunctions.php(4001): Hooks::run('UserLoadFromSes...', Array, NULL)
#5 /usr/local/apache/common-local/php-1.24wmf6/includes/User.php(1094): wfRunHooks('UserLoadFromSes...', Array)
#6 /usr/local/apache/common-local/php-1.24wmf6/includes/User.php(343): User->loadFromSession()
#7 /usr/local/apache/common-local/php-1.24wmf6/includes/User.php(1932): User->load()
#8 /usr/local/apache/common-local/php-1.24wmf6/includes/User.php(3058): User->getId()
#9 /usr/local/apache/common-local/php-1.24wmf6/includes/Wiki.php(541): User->isLoggedIn()
#10 /usr/local/apache/common-local/php-1.24wmf6/includes/Wiki.php(451): MediaWiki->main()
#11 /usr/local/apache/common-local/php-1.24wmf6/index.php(46): MediaWiki->run()
#12 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')

2014-06-05T02:10:04.000Z
exception
fawiki
mw1092
User::addToDatabase: hit a key conflict attempting to insert user 'Mkhz2' row, but it was not present in select!

2014-06-05T02:10:04.000Z
exception-json
fawiki
mw1164
User::addToDatabase: hit a key conflict attempting to insert user 'Mkhz2' row, but it was not present in select!

2014-06-05T02:10:04.000Z
exception
fawiki
mw1112
User::addToDatabase: hit a key conflict attempting to insert user 'Mkhz2' row, but it was not present in select!

2014-06-05T02:10:04.000Z
exception
fawiki
mw1081
User::addToDatabase: hit a key conflict attempting to insert user 'Mkhz2' row, but it was not present in select!

2014-06-05T02:10:04.000Z
exception-json
fawiki
mw1085
User::addToDatabase: hit a key conflict attempting to insert user 'Mkhz2' row, but it was not present in select!

See also:

  • bug 16020
  • bug 41609

Version: unspecified
Severity: normal

Details

Reference
bz66185

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz66185.
bzimport added a subscriber: Unknown Object (MLST).
Krinkle created this task.Jun 5 2014, 11:36 AM
Reedy added a comment.Jun 5 2014, 12:35 PM

I'm not sure it's a regression (at the moment, it's a one off for one user). And if it is, it would seem to be a core bug

greg added a comment.Jun 5 2014, 8:16 PM

Setting to normal for now, per Reedy's comment.

Change 141609 had a related patch set uploaded by Aaron Schulz:
Avoid key conflict errors in User::addToDatabase

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

Change 141609 had a related patch set uploaded by Krinkle:
Avoid key conflict errors in User::addToDatabase

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

Change 141609 merged by jenkins-bot:
Avoid key conflict errors in User::addToDatabase

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

All patches mentioned in this report were merged - 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.