Page MenuHomePhabricator

Exception thrown LinksUpdate::acquirePageLock: Cannot flush pre-lock snapshot because writes are pending (Database::onTransactionIdle)
Closed, ResolvedPublic

Description

MediaWiki 1.29.0-alpha (54381ead)
PHP	5.6.8 (apache2handler)
MySQL	5.6.24
ICU	54.1

Issue

Doing a TestSubmit&action=submit throws:

[DBConnection] Connected to database 0 at 'localhost'.
MediaWiki::preOutputCommit: primary transaction round committed
[Bug56269] Exception thrown with an uncommited database transaction: [9f5e5ffbc8056db73867f438] /mw-master/index.php?title=TestSubmit&action=submit   DBUnexpectedError from line 3257 of ...\mw-master\includes\libs\rdbms\database\Database.php: LinksUpdate::acquirePageLock: Cannot flush pre-lock snapshot because writes are pending (Database::onTransactionIdle).
#0 ...\mw-master\includes\deferred\LinksUpdate.php(198): Database->getScopedLockAndFlush(string, string, integer)
#1 ...\mw-master\includes\deferred\LinksUpdate.php(169): LinksUpdate::acquirePageLock(DatabaseMysqli, integer)
#2 ...\mw-master\includes\jobqueue\jobs\RefreshLinksJob.php(271): LinksUpdate->doUpdate()
#3 ...\mw-master\includes\jobqueue\jobs\RefreshLinksJob.php(121): RefreshLinksJob->runForTitle(Title)
#4 ...\mw-master\includes\jobqueue\JobRunner.php(286): RefreshLinksJob->run()
#5 ...\mw-master\includes\jobqueue\JobRunner.php(186): JobRunner->executeJob(RefreshLinksJob, LBFactorySimple, BufferingStatsdDataFactory, integer)
#6 ...\mw-master\includes\MediaWiki.php(941): JobRunner->run(array)
#7 ...\mw-master\includes\MediaWiki.php(900): MediaWiki->triggerJobs()
#8 ...\mw-master\includes\MediaWiki.php(720): MediaWiki->restInPeace(string)
#9 ...\mw-master\includes\MediaWiki.php(739): MediaWiki->{closure}()
#10 ...\mw-master\includes\MediaWiki.php(543): MediaWiki->doPostOutputShutdown(string)
#11 ...\mw-master\index.php(43): MediaWiki->run()
#12 {main}
[runJobs] refreshLinksPrioritized TestSubmit rootJobTimestamp=20170102153304 useRecursiveLinksUpdate=1 triggeringUser={"userId":1,"userName":"..."} triggeringRevisionId=331 requestId=9f5e5ffbc8056db73867f438 (id=1208,timestamp=20170102153307) t=506 error=DBUnexpectedError: LinksUpdate::acquirePageLock: Cannot flush pre-lock snapshot because writes are pending (Database::onTransactionIdle).
MediaWiki::preOutputCommit: pre-send deferred updates completed

Event Timeline

mwjames created this task.Jan 2 2017, 3:39 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 2 2017, 3:39 PM
Cavila added a subscriber: Cavila.Jan 11 2017, 6:06 PM

Could this be related to T153618 ?

Kghbln added a subscriber: bd808.Mar 9 2017, 5:53 PM
Kghbln added a subscriber: Kghbln.

Could this be related to T153618 ?

Let's ask @bd808

bd808 added a comment.Mar 9 2017, 6:33 PM

That does look like the error that should have been fixed in master by rMW2d4ed16bd8cc: Make RefreshLinksJob handle LinksUpdateConstructed hooks doing DB writes. The git hash rMW54381ead2783: Localisation updates from https://translatewiki.net. is a few days before that fix landed. In theory updating the MediaWiki clone should fix this.

Kghbln closed this task as Resolved.EditedMar 9 2017, 6:53 PM
Kghbln claimed this task.

I just updated to latest REL1_28 and found that this issue indeed seems to have been dealt with with the respective commit. Thanks for the info @bd808