Page MenuHomePhabricator

CAS update failed on user_touched. The version of the user to be saved is older than the current version.
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request URL: /wiki/Speci%C3%A1ln%C3%AD:Uv%C3%ADtac%C3%AD_dotazn%C3%ADk
Request ID: XMgJewpAIEIAAJK4ZOkAAAAB

message
[XMgJewpAIEIAAJK4ZOkAAAAB] /wiki/Speci%C3%A1ln%C3%AD:Uv%C3%ADtac%C3%AD_dotazn%C3%ADk   MWException from line 4244 of /srv/mediawiki/php-1.34.0-wmf.1/includes/user/User.php: CAS update failed on user_touched. The version of the user to be saved is older than the current version.
trace
#0 /srv/mediawiki/php-1.34.0-wmf.1/includes/libs/rdbms/database/Database.php(3865): Closure$User::saveSettings(Wikimedia\Rdbms\DatabaseMysqli, string)
#1 /srv/mediawiki/php-1.34.0-wmf.1/includes/user/User.php(4255): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure$User::saveSettings;349)
#2 /srv/mediawiki/php-1.34.0-wmf.1/extensions/GrowthExperiments/includes/WelcomeSurvey.php(276): User->saveSettings()
#3 /srv/mediawiki/php-1.34.0-wmf.1/extensions/GrowthExperiments/includes/Specials/SpecialWelcomeSurvey.php(185): GrowthExperiments\WelcomeSurvey->handleResponses(array, string, string, string)
#4 /srv/mediawiki/php-1.34.0-wmf.1/includes/htmlform/HTMLForm.php(675): GrowthExperiments\Specials\SpecialWelcomeSurvey->onSubmit(array, OOUIHTMLForm)
#5 /srv/mediawiki/php-1.34.0-wmf.1/includes/htmlform/HTMLForm.php(567): HTMLForm->trySubmit()
#6 /srv/mediawiki/php-1.34.0-wmf.1/includes/htmlform/HTMLForm.php(582): HTMLForm->tryAuthorizedSubmit()
#7 /srv/mediawiki/php-1.34.0-wmf.1/includes/specialpage/FormSpecialPage.php(184): HTMLForm->show()
#8 /srv/mediawiki/php-1.34.0-wmf.1/extensions/GrowthExperiments/includes/Specials/SpecialWelcomeSurvey.php(57): FormSpecialPage->execute(NULL)
#9 /srv/mediawiki/php-1.34.0-wmf.1/includes/specialpage/SpecialPage.php(569): GrowthExperiments\Specials\SpecialWelcomeSurvey->execute(NULL)
#10 /srv/mediawiki/php-1.34.0-wmf.1/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#11 /srv/mediawiki/php-1.34.0-wmf.1/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#12 /srv/mediawiki/php-1.34.0-wmf.1/includes/MediaWiki.php(865): MediaWiki->performRequest()
#13 /srv/mediawiki/php-1.34.0-wmf.1/includes/MediaWiki.php(515): MediaWiki->main()
#14 /srv/mediawiki/php-1.34.0-wmf.1/index.php(42): MediaWiki->run()
#15 /srv/mediawiki/w/index.php(3): include(string)
#16 {main}

Impact

Welcome survey responses not saved for three users.

Notes

Should be fixed by fa8f8c66cac9fe97b8c4e0470c52ed452e0a9d7d but filing this anyway to verify after MW-1.34-notes (1.34.0-wmf.3; 2019-04-30) is in production.

Event Timeline

kostajh moved this task from Incoming to QA on the Growth-Team (Sprint 0 (Growth Team)) board.

Moving to QA to double-check that "CAS update failed on user_touched. The version of the user to be saved is older than the current version" no longer appears in the logs after 1.34.0-wmf.3 is in production.

Seems as though this is still happening in 1.34.0-wmf.3 -- stacktrace is a little different though, so maybe a different path to the same problem? This seems to be coming from api.php

message
[XMnyfApAAE0AAGfZLCIAAACL]  MWException from line 4236 of /srv/mediawiki/php-1.34.0-wmf.3/includes/user/User.php: CAS update failed on user_touched. The version of the user to be saved is older than the current version.
#0 /srv/mediawiki/php-1.34.0-wmf.3/includes/libs/rdbms/database/Database.php(3865): Closure$User::saveSettings(Wikimedia\Rdbms\DatabaseMysqli, string)
#1 /srv/mediawiki/php-1.34.0-wmf.3/includes/user/User.php(4247): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure$User::saveSettings;4109)
#2 /srv/mediawiki/php-1.34.0-wmf.3/extensions/UniversalLanguageSelector/includes/UniversalLanguageSelectorHooks.php(255): User->saveSettings()
#3 /srv/mediawiki/php-1.34.0-wmf.3/includes/deferred/MWCallableUpdate.php(34): Closure$UniversalLanguageSelectorHooks::getLanguage()
#4 /srv/mediawiki/php-1.34.0-wmf.3/includes/deferred/DeferredUpdates.php(274): MWCallableUpdate->doUpdate()
#5 /srv/mediawiki/php-1.34.0-wmf.3/includes/deferred/DeferredUpdates.php(219): DeferredUpdates::runUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti, string, integer)
#6 /srv/mediawiki/php-1.34.0-wmf.3/includes/deferred/DeferredUpdates.php(143): DeferredUpdates::execute(array, string, integer)
#7 /srv/mediawiki/php-1.34.0-wmf.3/includes/MediaWiki.php(907): DeferredUpdates::doUpdates(string)
#8 /srv/mediawiki/php-1.34.0-wmf.3/includes/MediaWiki.php(731): MediaWiki->restInPeace(string, boolean)
#9 [internal function]: Closure$MediaWiki::doPostOutputShutdown()
#10 {main}

Change 507637 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/UniversalLanguageSelector@master] Use getInstanceForUpdate when saving user settings

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

@thcipriani the patch above should fix it; if you create a separate task please comment here and I'll update the patch.

@thcipriani the patch above should fix it; if you create a separate task please comment here and I'll update the patch.

Created T222300: UniversalLanguageSelector: CAS update failed on user_touched. The version of the user to be saved is older than the current version.. Added you as a subscriber.

Thank you for the patch -- if you can get someone to review your patch for master, I'd be happy to backport it to wmf/1.34.0-wmf.3.

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