Page MenuHomeMiraheze

Database errors
Closed, InvalidPublic

Description

While importing pages on cplostwikis.miraheze.org, I encountered the following error:

[038812f60b8b45e95837e2b3] 2021-06-09 17:04:03: Fatal exception of type "Wikimedia\Rdbms\DBTransactionError"

Then, while attempting to browse the wiki logs immediately after that, I encountered the following error:

"[f6ca6b5bfb09c092eff32719] 2021-06-09 17:06:53: Fatal exception of type "LogicException""

I reported this on the Miraheze IRC channel and was advised to make a Phabricator task.

Related Objects

Event Timeline

Doesn't look like a normal timeout. Will investigate.

Reception123 triaged this task as Normal priority.Jun 9 2021, 17:43

Production Error is tagged without an error stack. What is the stack trace?

None until someone gets it from graylog. I'm going to login tonight.

038812f60b8b45e95837e2b3:

[038812f60b8b45e95837e2b3] /w/index.php?title=Special:Import&action=submit   Wikimedia\\Rdbms\\DBTransactionStateError from line 1501 of /srv/mediawiki/w/includes/libs/rdbms/database/Database.php: Cannot execute query from MediaWiki::preOutputCommit while transaction status is ERROR
#0 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1220): Wikimedia\Rdbms\Database->assertQueryIsCurrentlyAllowed(string, string)
#1 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(4606): Wikimedia\Rdbms\Database->query(string, string, integer)
#2 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(4574): Wikimedia\Rdbms\Database->doCommit(string)
#3 /srv/mediawiki/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1712): Wikimedia\Rdbms\Database->commit(string, string)
#4 /srv/mediawiki/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(2150): Wikimedia\Rdbms\LoadBalancer->Wikimedia\Rdbms\{closure}(Wikimedia\Rdbms\DatabaseMysqli)
#5 /srv/mediawiki/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1717): Wikimedia\Rdbms\LoadBalancer->forEachOpenMasterConnection(Closure)
#6 /srv/mediawiki/w/includes/libs/rdbms/lbfactory/LBFactory.php(244): Wikimedia\Rdbms\LoadBalancer->commitMasterChanges(string, integer)
#7 /srv/mediawiki/w/includes/libs/rdbms/lbfactory/LBFactoryMulti.php(222): Wikimedia\Rdbms\LBFactory->Wikimedia\Rdbms\{closure}(Wikimedia\Rdbms\LoadBalancer, string, array)
#8 /srv/mediawiki/w/includes/libs/rdbms/lbfactory/LBFactory.php(246): Wikimedia\Rdbms\LBFactoryMulti->forEachLB(Closure, array)
#9 /srv/mediawiki/w/includes/libs/rdbms/lbfactory/LBFactory.php(309): Wikimedia\Rdbms\LBFactory->forEachLBCallMethod(string, array)
#10 /srv/mediawiki/w/includes/MediaWiki.php(678): Wikimedia\Rdbms\LBFactory->commitMasterChanges(string, array)
#11 /srv/mediawiki/w/includes/MediaWiki.php(648): MediaWiki::preOutputCommit(RequestContext, Closure)
#12 /srv/mediawiki/w/includes/MediaWiki.php(956): MediaWiki->doPreOutputCommit(Closure)
#13 /srv/mediawiki/w/includes/MediaWiki.php(543): MediaWiki->main()
#14 /srv/mediawiki/w/index.php(53): MediaWiki->run()
#15 /srv/mediawiki/w/index.php(46): wfIndexMain()
#16 {main}

f6ca6b5bfb09c092eff32719:

[f6ca6b5bfb09c092eff32719] /w/index.php?title=Special:Log/import&offset=20210609170548&type=import&user=   LogicException from line 409 of /srv/mediawiki/w/includes/cache/MessageCache.php: Process cache for 'en' should be set by now.
#0 /srv/mediawiki/w/includes/cache/MessageCache.php(1091): MessageCache->load(string)
#1 /srv/mediawiki/w/includes/cache/MessageCache.php(1017): MessageCache->getMsgFromNamespace(string, string)
#2 /srv/mediawiki/w/includes/cache/MessageCache.php(988): MessageCache->getMessageForLang(LanguageEn, string, boolean, array)
#3 /srv/mediawiki/w/includes/cache/MessageCache.php(930): MessageCache->getMessageFromFallbackChain(LanguageEn, string, boolean)
#4 /srv/mediawiki/w/includes/language/Message.php(1304): MessageCache->get(string, boolean, LanguageEn)
#5 /srv/mediawiki/w/includes/language/Message.php(862): Message->fetchMessage()
#6 /srv/mediawiki/w/includes/Message/TextFormatter.php(51): Message->toString(string)
#7 /srv/mediawiki/w/includes/user/UserNameUtils.php(195): MediaWiki\Message\TextFormatter->format(Wikimedia\Message\MessageValue)
#8 /srv/mediawiki/w/includes/user/User.php(995): MediaWiki\User\UserNameUtils->isUsable(string)
#9 /srv/mediawiki/w/extensions/CentralAuth/includes/session/CentralAuthSessionProvider.php(165): User::isUsableName(string)
#10 /srv/mediawiki/w/includes/session/SessionManager.php(490): CentralAuthSessionProvider->provideSessionInfo(WebRequest)
#11 /srv/mediawiki/w/includes/session/SessionManager.php(215): MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
#12 /srv/mediawiki/w/includes/WebRequest.php(826): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
#13 /srv/mediawiki/w/includes/session/SessionManager.php(137): WebRequest->getSession()
#14 /srv/mediawiki/w/includes/Setup.php(725): MediaWiki\Session\SessionManager::getGlobalSession()
#15 /srv/mediawiki/w/includes/WebStart.php(89): require_once(string)
#16 /srv/mediawiki/w/index.php(44): require(string)
#17 {main}

@Paladox: any indication why the transaction was in state ERROR?

No, I just posted the log as requested.

The second one looks like a memcache issue. It looks like timeouts might have happened from that although logs don't show too high frequency and even Wikimedia see it. Still investigating DB error.

Lots of PHP warnings here:

mediawiki_exception_message	count()
PHP Warning: XMLReader::read(): <siteinfo>	15
PHP Warning: XMLReader::read(): ^	15
PHP Warning: XMLReader::read(): Load Data before trying to read	6
PHP Warning: XMLReader::read(): </page>	4
PHP Warning: XMLReader::read(): ^	3
PHP Warning: XMLReader::read(): ^	1
PHP Warning: XMLReader::read(): '''ex 3.)''	1
PHP Warning: XMLReader::read(): ^	1

I cannot trigger any error by visiting the logs. Corrupt XML file?

One of the exceptions: 2021-06-09 17:04:03.233 +00:00 /w/index.php?title=Special:Import&action=submit Wikimedia\\Rdbms\\DBTransactionStateError from line 1501 of /srv/mediawiki/w/includes/libs/rdbms/database/Database.php: Cannot execute query from MediaWiki::preOutputCommit while transaction status is ERROR

includes a 'previous exception':

Wikimedia\Rdbms\DBUnexpectedError Uncancelable atomic section canceled (got MediaWiki\Revision\RevisionStore::insertRevisionOn)
#0 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(4461): Wikimedia\Rdbms\Database->cancelAtomic(string, Wikimedia\Rdbms\AtomicSectionIdentifier)
#1 /srv/mediawiki/w/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure)
#2 /srv/mediawiki/w/includes/libs/rdbms/database/DBConnRef.php(641): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#3 /srv/mediawiki/w/includes/Revision/RevisionStore.php(427): Wikimedia\Rdbms\DBConnRef->doAtomicSection(string, Closure)
#4 /srv/mediawiki/w/includes/import/ImportableOldRevisionImporter.php(189): MediaWiki\Revision\RevisionStore->insertRevisionOn(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DBConnRef)
#5 /srv/mediawiki/w/includes/import/WikiRevision.php(669): ImportableOldRevisionImporter->import(WikiRevision)
#6 /srv/mediawiki/w/includes/import/WikiImporter.php(371): WikiRevision->importOldRevision()
#7 /srv/mediawiki/w/includes/import/WikiImporter.php(507): WikiImporter->importRevision(WikiRevision, WikiImporter)
#8 /srv/mediawiki/w/includes/import/WikiImporter.php(992): WikiImporter->revisionCallback(WikiRevision)
#9 /srv/mediawiki/w/includes/import/WikiImporter.php(857): WikiImporter->processRevision(array, array)
#10 /srv/mediawiki/w/includes/import/WikiImporter.php(795): WikiImporter->handleRevision(array)
#11 /srv/mediawiki/w/includes/import/WikiImporter.php(612): WikiImporter->handlePage()
#12 /srv/mediawiki/w/includes/specials/SpecialImport.php(235): WikiImporter->doImport()
#13 /srv/mediawiki/w/includes/specials/SpecialImport.php(118): SpecialImport->doImport()
#14 /srv/mediawiki/w/includes/specialpage/SpecialPage.php(600): SpecialImport->execute(NULL)
#15 /srv/mediawiki/w/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run(NULL)
#16 /srv/mediawiki/w/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#17 /srv/mediawiki/w/includes/MediaWiki.php(940): MediaWiki->performRequest()
#18 /srv/mediawiki/w/includes/MediaWiki.php(543): MediaWiki->main()
#19 /srv/mediawiki/w/index.php(53): MediaWiki->run()
#20 /srv/mediawiki/w/index.php(46): wfIndexMain()
#21 {main}

DB error and the warnings @Southparkfan mentioned above has been shown in terminal when importing server side a couple times before, if the xml is corrupt. That's likely the cause.

Closing as invalid then.