Page MenuHomePhabricator

"CAS update failed on gu_cas_token" thrown by CentralAuth autocreation jobs
Closed, ResolvedPublicPRODUCTION ERROR

Description

Looks like what's happening here is that trying to get a centralauth token can potentially cause saveSettings() to be called. This worries me a bit because it's a write operation and getAuthToken() sounds like it shouldn't write.

2016-07-18 08:15:45 [V4yQLgpAIDEAAFiapTwAAABO] mw1306 mediawikiwiki 1.28.0-wmf.10 exception ERROR: [V4yQLgpAIDEAAFiapTwAAABO] [no req]   MWException from line 2609 of /srv/mediawiki/php-1.28.0-wmf.10/extensions/CentralAuth/includes/CentralAuthUser.php: CAS update failed on gu_cas_token for user ID '47226922' (read from master); the version of the user to be saved is older than the current version. {"exception_id":"V4yQLgpAIDEAAFiapTwAAABO"} 
[Exception MWException] (/srv/mediawiki/php-1.28.0-wmf.10/extensions/CentralAuth/includes/CentralAuthUser.php:2609) CAS update failed on gu_cas_token for user ID '47226922' (read from master); the version of the user to be saved is older than the current version.
  #0 /srv/mediawiki/php-1.28.0-wmf.10/extensions/CentralAuth/includes/CentralAuthUser.php(2558): CentralAuthUser->saveSettings()
  #1 /srv/mediawiki/php-1.28.0-wmf.10/extensions/CentralAuth/includes/CentralAuthUser.php(601): CentralAuthUser->resetAuthToken()
  #2 /srv/mediawiki/php-1.28.0-wmf.10/extensions/CentralAuth/includes/api/ApiCentralAuthToken.php(62): CentralAuthUser->getAuthToken()
  #3 /srv/mediawiki/php-1.28.0-wmf.10/includes/api/ApiMain.php(1435): ApiCentralAuthToken->execute()
  #4 /srv/mediawiki/php-1.28.0-wmf.10/includes/api/ApiMain.php(477): ApiMain->executeAction()
  #5 /srv/mediawiki/php-1.28.0-wmf.10/extensions/Echo/includes/ForeignWikiRequest.php(62): ApiMain->execute()
  #6 /srv/mediawiki/php-1.28.0-wmf.10/extensions/Echo/includes/ForeignWikiRequest.php(117): EchoForeignWikiRequest->getCentralAuthToken(User)
  #7 /srv/mediawiki/php-1.28.0-wmf.10/extensions/Echo/includes/ForeignWikiRequest.php(97): EchoForeignWikiRequest->getQueryParams(string)
  #8 /srv/mediawiki/php-1.28.0-wmf.10/extensions/Echo/includes/ForeignWikiRequest.php(30): EchoForeignWikiRequest->getRequestParams()
  #9 /srv/mediawiki/php-1.28.0-wmf.10/extensions/Echo/includes/NotifUser.php(710): EchoForeignWikiRequest->execute()
  #10 /srv/mediawiki/php-1.28.0-wmf.10/extensions/Echo/includes/NotifUser.php(741): MWEchoNotifUser->getForeignData()
  #11 /srv/mediawiki/php-1.28.0-wmf.10/extensions/Echo/includes/NotifUser.php(489): MWEchoNotifUser->getForeignCount(string)
  #12 /srv/mediawiki/php-1.28.0-wmf.10/extensions/Echo/Hooks.php(1147): MWEchoNotifUser->resetNotificationCount()
  #13 /srv/mediawiki/php-1.28.0-wmf.10/includes/Hooks.php(195): EchoHooks::onUserSaveSettings(User)
  #14 /srv/mediawiki/php-1.28.0-wmf.10/includes/user/User.php(3955): Hooks::run(string, array)
  #15 /srv/mediawiki/php-1.28.0-wmf.10/includes/auth/AuthManager.php(1693): User->saveSettings()
  #16 /srv/mediawiki/php-1.28.0-wmf.10/extensions/CentralAuth/includes/CentralAuthUtils.php(141): MediaWiki\Auth\AuthManager->autoCreateUser(User, string, boolean)
  #17 /srv/mediawiki/php-1.28.0-wmf.10/extensions/CentralAuth/includes/CreateLocalAccountJob.php(56): CentralAuthUtils::autoCreateUser(User)
  #18 /srv/mediawiki/php-1.28.0-wmf.10/includes/jobqueue/JobRunner.php(265): CentralAuthCreateLocalAccountJob->run()
  #19 /srv/mediawiki/php-1.28.0-wmf.10/includes/jobqueue/JobRunner.php(179): JobRunner->executeJob(CentralAuthCreateLocalAccountJob, BufferingStatsdDataFactory, integer)
  #20 /srv/mediawiki/rpc/RunJobs.php(47): JobRunner->run(array)
  #21 {main}

Event Timeline

Catrope triaged this task as Unbreak Now! priority.Jul 18 2016, 9:25 PM
Catrope lowered the priority of this task from Unbreak Now! to High.Jul 18 2016, 9:31 PM

Looks like this is not an actual exception, it's just being logged as such.

Catrope claimed this task.

This shouldn't be happening any more now that we've disabled the transition flags in Echo.

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