Page MenuHomePhabricator

UpdateUserCentralIndexJob fails with deadlock on table cuci_user on CI run for apitests on Wikibase
Closed, DuplicatePublic

Description

On Job https://integration.wikimedia.org/ci/job/mediawiki-quibble-apitests-vendor-php74/17638/console there is a failure
(on patch set https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/1071040)

14:16:43 mw-dberror.log:Fri Sep 6 14:09:05 UTC 2024	5b3e9c61216e	wikidb	Error 1213 from MediaWiki\CheckUser\Jobs\UpdateUserCentralIndexJob::run, Deadlock found when trying to get lock; try restarting transaction INSERT INTO `cuci_user` (ciu_timestamp,ciu_ciwm_id,ciu_central_id) VALUES ('20240906140904',1,169) ON DUPLICATE KEY UPDATE ciu_timestamp = '20240906140904' localhost:/workspace/db/quibble-mysql-uyd7q936/socket
14:16:43 mw-dberror.log:#0 /workspace/src/includes/libs/rdbms/database/Database.php(1151): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, int, string, string)
14:16:43 mw-dberror.log:#1 /workspace/src/includes/libs/rdbms/database/Database.php(643): Wikimedia\Rdbms\Database->reportQueryError(string, int, string, string, bool)
14:16:43 mw-dberror.log:#2 /workspace/src/includes/libs/rdbms/database/DatabaseMySQL.php(542): Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
14:16:43 mw-dberror.log:#3 /workspace/src/includes/libs/rdbms/database/DBConnRef.php(127): Wikimedia\Rdbms\DatabaseMySQL->upsert(string, array, array, array, string)
14:16:43 mw-dberror.log:#4 /workspace/src/includes/libs/rdbms/database/DBConnRef.php(567): Wikimedia\Rdbms\DBConnRef->__call(string, array)
14:16:43 mw-dberror.log:#5 /workspace/src/includes/libs/rdbms/querybuilder/InsertQueryBuilder.php(340): Wikimedia\Rdbms\DBConnRef->upsert(string, array, array, array, string)
14:16:43 mw-dberror.log:#6 /workspace/src/extensions/CheckUser/src/Jobs/UpdateUserCentralIndexJob.php(60): Wikimedia\Rdbms\InsertQueryBuilder->execute()
14:16:43 mw-dberror.log:#7 /workspace/src/includes/jobqueue/JobRunner.php(369): MediaWiki\CheckUser\Jobs\UpdateUserCentralIndexJob->run()
14:16:43 mw-dberror.log:#8 /workspace/src/includes/jobqueue/JobRunner.php(330): JobRunner->doExecuteJob(MediaWiki\CheckUser\Jobs\UpdateUserCentralIndexJob)
14:16:43 mw-dberror.log:#9 /workspace/src/includes/jobqueue/JobRunner.php(225): JobRunner->executeJob(MediaWiki\CheckUser\Jobs\UpdateUserCentralIndexJob)
14:16:43 mw-dberror.log:#10 /workspace/src/includes/specials/SpecialRunJobs.php(136): JobRunner->run(array)
14:16:43 mw-dberror.log:#11 /workspace/src/includes/specials/SpecialRunJobs.php(121): MediaWiki\Specials\SpecialRunJobs->doRun(array)
14:16:43 mw-dberror.log:#12 /workspace/src/includes/specialpage/SpecialPage.php(719): MediaWiki\Specials\SpecialRunJobs->execute(null)
14:16:43 mw-dberror.log:#13 /workspace/src/includes/specialpage/SpecialPageFactory.php(1708): MediaWiki\SpecialPage\SpecialPage->run(null)
14:16:43 mw-dberror.log:#14 /workspace/src/includes/actions/ActionEntryPoint.php(502): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
14:16:43 mw-dberror.log:#15 /workspace/src/includes/actions/ActionEntryPoint.php(145): MediaWiki\Actions\ActionEntryPoint->performRequest()
14:16:43 mw-dberror.log:#16 /workspace/src/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()
14:16:43 mw-dberror.log:#17 /workspace/src/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
14:16:43 mw-dberror.log:#18 {main}