Last modified: 2014-04-09 08:47:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49663, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47663 - Wikibase\SiteLinkTable::saveLinksOfItem deadlocks
Wikibase\SiteLinkTable::saveLinksOfItem deadlocks
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=backend p=0
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-25 19:07 UTC by Aaron Schulz
Modified: 2014-04-09 08:47 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aaron Schulz 2013-04-25 19:07:37 UTC
A fair amount of these in the logs.

dberror.log:
Thu Apr 25 16:28:04 UTC 2013    mw1135  wikidatawiki    Wikibase\SiteLinkTable::saveLinksOfItem 10.64.32.28     1213    Deadlock found when trying to get lock; try restarting transaction (10.64.32.28)        INSERT  INTO `wb_items_per_site` (ips_item_id,ips_site_id,ips_site_page) VALUES ('11909280','cawiki','Bhinai')

exception.log:
2013-04-25 07:30:08 mw1129 wikidatawiki: #0 /usr/local/apache/common-local/php-1.22wmf2/includes/db/Database.php(988): DatabaseBase->reportQueryError('Deadlock found ...', 1213, 'INSERT  INTO `w...', 'Wikibase\SiteLi...', false)
#1 /usr/local/apache/common-local/php-1.22wmf2/includes/db/Database.php(1792): DatabaseBase->query('INSERT  INTO `w...', 'Wikibase\SiteLi...')
#2 /usr/local/apache/common-local/php-1.22wmf2/extensions/Wikibase/lib/includes/store/sql/SiteLinkTable.php(124): DatabaseBase->insert('wb_items_per_si...', Array, 'Wikibase\SiteLi...')
#3 /usr/local/apache/common-local/php-1.22wmf2/extensions/Wikibase/repo/includes/updates/ItemModificationUpdate.php(54): Wikibase\SiteLinkTable->saveLinksOfItem(Object(Wikibase\Item))
#4 /usr/local/apache/common-local/php-1.22wmf2/extensions/Wikibase/repo/includes/updates/EntityModificationUpdate.php(77): Wikibase\ItemModificationUpdate->doTypeSpecificStuff(Object(Wikibase\SqlStore), Object(Wikibase\Item))
#5 /usr/local/apache/common-local/php-1.22wmf2/includes/DataUpdate.php(100): Wikibase\EntityModificationUpdate->doUpdate()
#6 /usr/local/apache/common-local/php-1.22wmf2/includes/WikiPage.php(2068): DataUpdate::runUpdates(Array)
#7 /usr/local/apache/common-local/php-1.22wmf2/includes/WikiPage.php(1905): WikiPage->doEditUpdates(Object(Revision), Object(User), Array)
#8 /usr/local/apache/common-local/php-1.22wmf2/extensions/Wikibase/repo/includes/content/EntityContent.php(492): WikiPage->doEditContent(Object(Wikibase\ItemContent), '/* wbeditentity...', 81, 0, Object(User))
#9 /usr/local/apache/common-local/php-1.22wmf2/extensions/Wikibase/repo/includes/EditEntity.php(709): Wikibase\EntityContent->save('/* wbeditentity...', Object(User), 81, 0, NULL)
#10 /usr/local/apache/common-local/php-1.22wmf2/extensions/Wikibase/repo/includes/api/ApiWikibase.php(688): Wikibase\EditEntity->attemptSave('/* wbeditentity...', 17, 'b27e43ee2b49a2a...')
#11 /usr/local/apache/common-local/php-1.22wmf2/extensions/Wikibase/repo/includes/api/ModifyEntity.php(214): Wikibase\Api\ApiWikibase->attemptSaveEntity(Object(Wikibase\ItemContent), '/* wbeditentity...', 17)
#12 /usr/local/apache/common-local/php-1.22wmf2/includes/api/ApiMain.php(840): Wikibase\Api\ModifyEntity->execute()
#13 /usr/local/apache/common-local/php-1.22wmf2/includes/api/ApiMain.php(380): ApiMain->executeAction()
#14 /usr/local/apache/common-local/php-1.22wmf2/includes/api/ApiMain.php(351): ApiMain->executeActionWithErrorHandling()
#15 /usr/local/apache/common-local/php-1.22wmf2/api.php(77): ApiMain->execute()
#16 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')
#17 {main}
Comment 1 Aaron Schulz 2013-05-03 00:05:05 UTC
Seems like a typical DELETE+INSERT deadlock. It probably could be changed to be incremental or to not issue the DELETE if there are no rows (if that case is common).
Comment 2 Aaron Schulz 2013-05-06 22:44:31 UTC
aaron@fluorine:~/mw-log$ grep -P '[^ \t]+::[^ \t]+' -o dberror.log | sort | uniq -c
      1 AbuseFilter::addLogEntries
      5 Banner::getHistoricalBanner
      3 Banner::getMixins
      1 Block::insert
      1 DataModelBackendLBFactory::insert
      2 GlobalUsage::insertLinks
      1 LinksDeletionUpdate::doUpdate
     16 MessageGroupStats::clear
      2 MessageGroupStats::forItemInternal
      3 RecentChange::save
      3 SiteStatsUpdate::doUpdate:
      2 User::saveOptions
      1 User::saveSettings
      4 WebVideoTranscodeJob::run
   1004 Wikibase\SiteLinkTable::saveLinksOfItem
      3 WikiPage::doDeleteArticleReal),
Comment 3 Lydia Pintscher 2014-03-17 14:20:01 UTC
Is this still happening?
Comment 4 Aaron Schulz 2014-04-08 22:35:03 UTC
Hasn't happened much in the last month (nor the month before that):

aaron@fluorine:~/mw-log$ zgrep --no-filename -P '(?<=\s)[a-zA-Z\\:]+::[\w:]+(\s+\([^)]+\))?(?=\s)' -o archive/dberror.log-201403* | sort | uniq -c | sort -rn -k 1
  12636 ChangeTags::tagUsageStatistics
  10452 SpecialWhatLinksHere::showIndirectLinks
   3487 Title::countRevisionsBetween
   1369 IndexPager::buildQueryInfo (LogPager)
   1241 LinkBatch::doQuery (for Skin::preloadExistence)
   1011 DatabaseMessageIndex::get
    832 ResourceLoaderWikiModule::getTitleMtimes
    608 Revision::fetchFromConds
    535 User::saveOptions
    528 LinkCache::addLinkObj
    495 IndexPager::buildQueryInfo (contributions page unfiltered)
    488 RecentChange::save
    404 MessageGroupStats::forItemInternal
    378 ForeignDBFile::loadExtraFromDB
    352 OutputPage::addCategoryLinks
    317 LinkBatch::doQuery (for GadgetHooks::beforePageDisplay)
    192 Revision::insertOn

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links