Page MenuHomePhabricator

1.30.0-alpha / DatabasePostgres throws "Expected mass rollback of all peer databases (DBO_TRX set)"
Closed, ResolvedPublic

Description

MediaWiki	1.30.0-alpha (1ba29a5)
PHP	7.1.1 (apache2handler)
PostgreSQL	9.3.12
ICU	57.1

When trying to access (in read mode) "Main_Page", MW throws:

Exception caught inside exception handler: [a9e417a3f6adab4fdd3391ee] /mw-master-pg/index.php/Main_Page Wikimedia\Rdbms\DBUnexpectedError from line 2910 of ...\includes\libs\rdbms\database\Database.php: Wikimedia\Rdbms\DatabasePostgres::reportQueryError: Expected mass rollback of all peer databases (DBO_TRX set).
Backtrace:
#0 ...\includes\libs\rdbms\database\DatabasePostgres.php(259): Wikimedia\Rdbms\Database->rollback(string)
#1 ...\includes\libs\rdbms\database\Database.php(975): Wikimedia\Rdbms\DatabasePostgres->reportQueryError(string, string, string, string, boolean)
#2 ...\includes\libs\rdbms\database\Database.php(1339): Wikimedia\Rdbms\Database->query(string, string)
#3 ...\includes\cache\LinkBatch.php(211): Wikimedia\Rdbms\Database->select(string, array, string, string)
#4 ...\includes\cache\LinkBatch.php(139): LinkBatch->doQuery()
#5 ...\includes\cache\LinkBatch.php(128): LinkBatch->executeInto(LinkCache)
#6 ...\includes\skins\Skin.php(265): LinkBatch->execute()
#7 ...\includes\skins\Skin.php(145): Skin->preloadExistence()
#8 ...\skins\Vector\SkinVector.php(47): Skin->initPage(OutputPage)
#9 ...\includes\skins\SkinTemplate.php(248): SkinVector->initPage(OutputPage)
#10 ...\includes\OutputPage.php(2428): SkinTemplate->outputPage()
#11 ...\includes\exception\MWExceptionRenderer.php(136): OutputPage->output()
#12 ...\includes\exception\MWExceptionRenderer.php(55): MWExceptionRenderer::reportHTML(Wikimedia\Rdbms\DBUnexpectedError)
#13 ...\includes\exception\MWExceptionHandler.php(75): MWExceptionRenderer::output(Wikimedia\Rdbms\DBUnexpectedError, integer)
#14 ...\includes\exception\MWExceptionHandler.php(141): MWExceptionHandler::report(Wikimedia\Rdbms\DBUnexpectedError)
#15 ...\includes\MediaWiki.php(551): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBUnexpectedError)
#16 ...\index.php(43): MediaWiki->run()
#17 {main}

Event Timeline

More on the same. @aaron I hope this can be solved rather quickly!

Exception caught inside exception handler: [11b93241c4561966a2226575] /mw-master-pg/ Wikimedia\Rdbms\DBUnexpectedError from line 2910 of ...\includes\libs\rdbms\database\Database.php: Wikimedia\Rdbms\DatabasePostgres::reportQueryError: Expected mass rollback of all peer databases (DBO_TRX set).
Backtrace:
#0 ...\includes\libs\rdbms\database\DatabasePostgres.php(259): Wikimedia\Rdbms\Database->rollback(string)
#1 ...\includes\libs\rdbms\database\Database.php(975): Wikimedia\Rdbms\DatabasePostgres->reportQueryError(string, string, string, string, boolean)
#2 ...\includes\libs\rdbms\database\Database.php(1339): Wikimedia\Rdbms\Database->query(string, string)
#3 ...\includes\libs\rdbms\database\Database.php(1165): Wikimedia\Rdbms\Database->select(string, string, array, string, array, array)
#4 ...\includes\cache\localisation\LCStoreDB.php(52): Wikimedia\Rdbms\Database->selectField(string, string, array, string)
#5 ...\includes\cache\localisation\LocalisationCache.php(359): LCStoreDB->get(string, string)
#6 ...\includes\cache\localisation\LocalisationCache.php(373): LocalisationCache->loadItem(string, string)
#7 ...\includes\cache\localisation\LocalisationCache.php(294): LocalisationCache->loadSubitem(string, string, string)
#8 ...\languages\Language.php(3172): LocalisationCache->getSubitem(string, string, string)
#9 ...\includes\MagicWord.php(333): Language->getMagic(MagicWord)
#10 ...\includes\MagicWord.php(261): MagicWord->load(string)
#11 ...\includes\parser\Parser.php(4865): MagicWord::get(string)
#12 ...\includes\parser\CoreParserFunctions.php(61): Parser->setFunctionHook(string, array, integer)
#13 ...\includes\parser\Parser.php(331): CoreParserFunctions::register(Parser)
#14 ...\includes\StubObject.php(113): Parser->firstCallInit()
#15 ...\includes\StubObject.php(139): StubObject->_call(string, array)
#16 ...\includes\cache\MessageCache.php(1127): StubObject->__call(string, array)
#17 ...\includes\cache\MessageCache.php(1103): MessageCache->getParser()
#18 ...\includes\Message.php(1240): MessageCache->transform(string, boolean, Language, Title)
#19 ...\includes\Message.php(874): Message->transformText(string)
#20 ...\includes\Message.php(934): Message->toString(string)
#21 ...\includes\OutputPage.php(936): Message->text()
#22 ...\includes\OutputPage.php(983): OutputPage->setHTMLTitle(Message)
#23 ...\includes\OutputPage.php(2464): OutputPage->setPageTitle(string)
#24 ...\includes\exception\MWExceptionRenderer.php(127): OutputPage->prepareErrorPage(string)
#25 ...\includes\exception\MWExceptionRenderer.php(55): MWExceptionRenderer::reportHTML(Wikimedia\Rdbms\DBUnexpectedError)
#26 ...\includes\exception\MWExceptionHandler.php(75): MWExceptionRenderer::output(Wikimedia\Rdbms\DBUnexpectedError, integer)
#27 ...\includes\exception\MWExceptionHandler.php(141): MWExceptionHandler::report(Wikimedia\Rdbms\DBUnexpectedError)
#28 ...\includes\MediaWiki.php(551): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBUnexpectedError)
#29 ...\index.php(43): MediaWiki->run()
#30 {main}

Change 359112 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/core@master] Set flush mode in DatabasePostgres::reportQueryError()

https://gerrit.wikimedia.org/r/359112

https://gerrit.wikimedia.org/r/359112

I was able to confirm that this fixes the reported issue and I'm able to run our integration tests without major interruptions.

@demon I suspect that this needs to be back-ported to 1.29 (not sure about 1.28).

Change 359201 had a related patch set uploaded (by Chad; owner: Aaron Schulz):
[mediawiki/core@REL1_29] Set flush mode in DatabasePostgres::reportQueryError()

https://gerrit.wikimedia.org/r/359201

Change 359112 merged by jenkins-bot:
[mediawiki/core@master] Set flush mode in DatabasePostgres::reportQueryError()

https://gerrit.wikimedia.org/r/359112

Change 359201 merged by jenkins-bot:
[mediawiki/core@REL1_29] Set flush mode in DatabasePostgres::reportQueryError()

https://gerrit.wikimedia.org/r/359201

Krinkle assigned this task to aaron.
Krinkle triaged this task as Medium priority.
Krinkle moved this task from Untriaged to Error handling on the Wikimedia-Rdbms board.
Krinkle edited projects, added Performance-Team; removed Patch-For-Review.