Page MenuHomePhabricator

Revision::fetchFromConds: Deadlock found when trying to get lock
Closed, ResolvedPublic

Description

This happens few times a day in twn, often when viewing diff pages.
MessageCache->getMsgFromNamespace() is always present in stack trace.

Exception from line 932 of /www/w/includes/db/Database.php: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name FROM bw_revision INNER JOIN bw_page ON ((page_id = rev_page)) LEFT JOIN bw_user ON ((rev_user != 0) AND (user_id = rev_user)) WHERE page_namespace = '8' AND page_title = 'Thumbnail-more/fi' AND (rev_id=page_latest) LIMIT 1 FOR UPDATE
Function: Revision::fetchFromConds
Error: 1213 Deadlock found when trying to get lock; try restarting transaction (localhost)

#0 /www/w/includes/db/Database.php(899): DatabaseBase->reportQueryError('Deadlock found ...', 1213, 'SELECT rev_id,...', 'Revision::fetch...', false)
#1 /www/w/includes/db/Database.php(1317): DatabaseBase->query('SELECT rev_id,...', 'Revision::fetch...')
#2 /www/w/includes/Revision.php(332): DatabaseBase->select(Array, Array, Array, 'Revision::fetch...', Array, Array)
#3 /www/w/includes/Revision.php(276): Revision::fetchFromConds(Object(DatabaseMysql), Array, 1)
#4 /www/w/includes/Revision.php(256): Revision::loadFromConds(Object(DatabaseMysql), Array, 1)
#5 /www/w/includes/Revision.php(100): Revision::newFromConds(Array, 1)
#6 /www/w/includes/cache/MessageCache.php(774): Revision::newFromTitle(Object(Title))
#7 /www/w/includes/cache/MessageCache.php(666): MessageCache->getMsgFromNamespace('Thumbnail-more/...', 'fi')
#8 /www/w/includes/GlobalFunctions.php(1504): MessageCache->get('thumbnail-more', true, false)
#9 /www/w/includes/GlobalFunctions.php(1482): wfMsgGetKey('thumbnail-more', true, false, true)
#10 /www/w/includes/GlobalFunctions.php(1392): wfMsgReal('thumbnail-more', Array)
#11 /www/w/includes/Linker.php(844): wfMsg('thumbnail-more')
#12 /www/w/includes/Linker.php(641): Linker::makeThumbLink2(Object(Title), Object(LocalFile), Array, Array, false, false)
#13 /www/w/includes/parser/Parser.php(5184): Linker::makeImageLink(Object(Parser), Object(Title), Object(LocalFile), Array, Array, false, false, 2)
#14 /www/w/includes/parser/Parser.php(1972): Parser->makeImage(Object(Title), 'left|thumb|My 4...', Object(LinkHolderArray))
#15 /www/w/includes/parser/Parser.php(1713): Parser->replaceInternalLinks2('<center><div la...')
#16 /www/w/includes/parser/Parser.php(1156): Parser->replaceInternalLinks('<center><div la...')
#17 /www/w/includes/parser/Parser.php(368): Parser->internalParse('<CENTER><div la...')
#18 /www/w/includes/WikiPage.php(3065): Parser->parse('<CENTER><div la...', Object(Title), Object(ParserOptions), true, true, 4164510)
#19 /www/w/includes/PoolCounter.php(209): PoolWorkArticleView->doWork()
#20 /www/w/includes/WikiPage.php(1027): PoolCounterWork->execute()
#21 /www/w/includes/diff/DifferenceEngine.php(547): WikiPage->getParserOutput(Object(ParserOptions), 4164510)
#22 /www/w/includes/diff/DifferenceEngine.php(411): DifferenceEngine->renderNewRevision()
#23 /www/w/includes/Article.php(725): DifferenceEngine->showDiffPage(false)
#24 /www/w/includes/Article.php(478): Article->showDiffPage()
#25 /www/w/includes/actions/ViewAction.php(37): Article->view()
#26 /www/w/includes/Wiki.php(427): ViewAction->show()
#27 /www/w/includes/Wiki.php(304): MediaWiki->performAction(Object(Article))
#28 /www/w/includes/Wiki.php(536): MediaWiki->performRequest()
#29 /www/w/includes/Wiki.php(446): MediaWiki->main()
#30 /www/w/index.php(58): MediaWiki->run()
#31 {main}


Version: 1.20.x
Severity: normal

Details

Reference
bz39479