Page MenuHomePhabricator

Deadlock found when trying to get lock
Closed, DuplicatePublic

Description

Error message
[XbK-egpAEDUAADHKTeUAAAAS] /w/api.php?... Wikimedia\Rdbms\DBTransactionStateError from line 1433 of /srv/mediawiki/php-1.35.0-wmf.3/includes/libs/rdbms/database/Database.php: Cannot execute query from Wikibase\Repo\Content\DataUpdateAdapter::doUpdate while transaction status is ERROR
Impact

There's about 1500 of these in the past hour, and they seem to stilll be happening.

Notes

I don't know if this is severe enough to warrant rolling back to previous version. If it does, please raise severity to Unbreak now, please.

Details

Request ID
XbK-egpAEDUAADHKTeUAAAAS
Request URL
www.wikidata.org
Stack Trace
#0 /srv/mediawiki/php-1.35.0-wmf.3/includes/libs/rdbms/database/Database.php(1255): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /srv/mediawiki/php-1.35.0-wmf.3/includes/libs/rdbms/database/Database.php(1162): Wikimedia\Rdbms\Database->executeQuery(string, string, integer)
#2 /srv/mediawiki/php-1.35.0-wmf.3/includes/libs/rdbms/database/Database.php(2170): Wikimedia\Rdbms\Database->query(string, string)
#3 /srv/mediawiki/php-1.35.0-wmf.3/extensions/Wikibase/lib/includes/Store/Sql/Terms/DatabaseItemTermStore.php(165): Wikimedia\Rdbms\Database->insert(string, array, string)
#4 /srv/mediawiki/php-1.35.0-wmf.3/extensions/Wikibase/lib/includes/Store/Sql/Terms/DatabaseTermIdsAcquirer.php(63): Wikibase\Lib\Store\Sql\Terms\DatabaseItemTermStore->Wikibase\Lib\Store\Sql\Terms\{closure}(array)
#5 /srv/mediawiki/php-1.35.0-wmf.3/extensions/Wikibase/lib/includes/Store/Sql/Terms/DatabaseItemTermStore.php(167): Wikibase\Lib\Store\Sql\Terms\DatabaseTermIdsAcquirer->acquireTermIds(array, Closure)
#6 /srv/mediawiki/php-1.35.0-wmf.3/extensions/Wikibase/lib/includes/Store/Sql/Terms/DatabaseItemTermStore.php(105): Wikibase\Lib\Store\Sql\Terms\DatabaseItemTermStore->acquireAndInsertTerms(Wikibase\DataModel\Entity\ItemId, array)
#7 /srv/mediawiki/php-1.35.0-wmf.3/extensions/Wikibase/lib/includes/Store/MultiItemTermStore.php(47): Wikibase\Lib\Store\Sql\Terms\DatabaseItemTermStore->storeTerms(Wikibase\DataModel\Entity\ItemId, Wikibase\DataModel\Term\Fingerprint)
#8 /srv/mediawiki/php-1.35.0-wmf.3/extensions/Wikibase/lib/includes/Store/ByIdDispatchingItemTermStore.php(58): Wikibase\MultiItemTermStore->storeTerms(Wikibase\DataModel\Entity\ItemId, Wikibase\DataModel\Term\Fingerprint)
#9 /srv/mediawiki/php-1.35.0-wmf.3/extensions/Wikibase/lib/includes/Store/DelegatingEntityTermStoreWriter.php(42): Wikibase\ByIdDispatchingItemTermStore->storeTerms(Wikibase\DataModel\Entity\ItemId, Wikibase\DataModel\Term\Fingerprint)
#10 /srv/mediawiki/php-1.35.0-wmf.3/extensions/Wikibase/lib/includes/Store/DelegatingEntityTermStoreWriter.php(30): Wikibase\Lib\Store\DelegatingEntityTermStoreWriter->storeItem(Wikibase\DataModel\Entity\Item)
#11 /srv/mediawiki/php-1.35.0-wmf.3/extensions/Wikibase/repo/includes/Content/DataUpdateAdapter.php(59): Wikibase\Lib\Store\DelegatingEntityTermStoreWriter->saveTermsOfEntity(Wikibase\DataModel\Entity\Item)
#12 /srv/mediawiki/php-1.35.0-wmf.3/includes/deferred/DeferredUpdates.php(385): Wikibase\Repo\Content\DataUpdateAdapter->doUpdate()
#13 /srv/mediawiki/php-1.35.0-wmf.3/includes/Storage/DerivedPageDataUpdater.php(1630): DeferredUpdates::attemptUpdate(Wikibase\Repo\Content\DataUpdateAdapter, Wikimedia\Rdbms\LBFactoryMulti)
#14 /srv/mediawiki/php-1.35.0-wmf.3/includes/Storage/DerivedPageDataUpdater.php(1446): MediaWiki\Storage\DerivedPageDataUpdater->doSecondaryDataUpdates(array)
#15 /srv/mediawiki/php-1.35.0-wmf.3/includes/deferred/MWCallableUpdate.php(38): MediaWiki\Storage\DerivedPageDataUpdater->MediaWiki\Storage\{closure}()
#16 /srv/mediawiki/php-1.35.0-wmf.3/includes/deferred/DeferredUpdates.php(385): MWCallableUpdate->doUpdate()
#17 /srv/mediawiki/php-1.35.0-wmf.3/includes/deferred/DeferredUpdates.php(283): DeferredUpdates::attemptUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti)
#18 /srv/mediawiki/php-1.35.0-wmf.3/includes/deferred/DeferredUpdates.php(228): DeferredUpdates::run(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti, Monolog\Logger, BufferingStatsdDataFactory, string)
#19 /srv/mediawiki/php-1.35.0-wmf.3/includes/deferred/DeferredUpdates.php(150): DeferredUpdates::handleUpdateQueue(array, string, integer)
#20 /srv/mediawiki/php-1.35.0-wmf.3/includes/MediaWiki.php(1053): DeferredUpdates::doUpdates(string)
#21 /srv/mediawiki/php-1.35.0-wmf.3/includes/MediaWiki.php(833): MediaWiki->restInPeace()
#22 /srv/mediawiki/php-1.35.0-wmf.3/includes/MediaWiki.php(842): MediaWiki->{closure}()
#23 /srv/mediawiki/php-1.35.0-wmf.3/api.php(118): MediaWiki->doPostOutputShutdown()
#24 /srv/mediawiki/w/api.php(3): require(string)
#25 {main}

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 25 2019, 9:33 AM
hashar triaged this task as Unbreak Now! priority.Oct 25 2019, 9:50 AM
hashar added a project: Wikidata.
hashar updated the task description. (Show Details)
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptOct 25 2019, 9:50 AM

Is this on Wikidata? T234948

Yes that is on wikidata, some occured at 7:30 but there is a steady flow of them since 8:40 UTC.

That indeed looks like an exact duplicate of T234948:

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: INSERT  INTO `wbt_item_terms` (wbit_item_id,wbit_term_in_lang_id) VALUES ('51431291','238686425'),('51431291','201592127')
Function: Wikibase\Lib\Store\Sql\Terms\{closure}
Error: 1213 Deadlock found when trying to get lock; try restarting transaction (10.64.48.172)

Marking as a dupe of T234948 :]

Thank you @jcrespo for the lightning fast triage!

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptOct 25 2019, 9:58 AM