Page MenuHomePhabricator

PHP Deprecated: Caller from … ignored an error originally raised from SpecialRecentChangesLinked
Open, MediumPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Deprecated: Caller from MediaWiki\Page\PageStore::getPageByNameViaLinkCache ignored an error originally raised from MediaWiki\Specials\SpecialRecentChangesLinked::doMainQuery: [1969] Query execution was interrupted (max_sta
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.18/includes/debug/MWDebug.php(386)
#0[internal function]MWExceptionHandler::handleError(int, string, string, int, array)
#1/srv/mediawiki/php-1.44.0-wmf.18/includes/debug/MWDebug.php(386)trigger_error(string, int)
#2/srv/mediawiki/php-1.44.0-wmf.18/includes/db/MWLBFactory.php(401)MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
#3/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/TransactionManager.php(186)MWLBFactory::logDeprecation(string)
#4/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/Database.php(1017)Wikimedia\Rdbms\TransactionManager->assertTransactionStatus(Wikimedia\Rdbms\DatabaseMySQL, array, string)
#5/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/Database.php(635)Wikimedia\Rdbms\Database->assertQueryIsCurrentlyAllowed(string, string)
#6/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/Database.php(1365)Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
#7/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/Database.php(1374)Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#8/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/DBConnRef.php(127)Wikimedia\Rdbms\Database->selectRow(array, array, array, string, array, array)
#9/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/DBConnRef.php(369)Wikimedia\Rdbms\DBConnRef->__call(string, array)
#10/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(810)Wikimedia\Rdbms\DBConnRef->selectRow(array, array, array, string, array, array)
#11/srv/mediawiki/php-1.44.0-wmf.18/includes/page/PageStore.php(201)Wikimedia\Rdbms\SelectQueryBuilder->fetchRow()
#12/srv/mediawiki/php-1.44.0-wmf.18/includes/cache/LinkCache.php(456)MediaWiki\Page\PageStore->MediaWiki\Page\{closure}(Wikimedia\Rdbms\DBConnRef, int, string, array)
#13/srv/mediawiki/php-1.44.0-wmf.18/includes/cache/LinkCache.php(490)MediaWiki\Cache\LinkCache->getGoodLinkRowInternal(MediaWiki\Title\TitleValue, Closure, int)
#14/srv/mediawiki/php-1.44.0-wmf.18/includes/page/PageStore.php(190)MediaWiki\Cache\LinkCache->getGoodLinkRow(int, string, Closure, int)
#15/srv/mediawiki/php-1.44.0-wmf.18/includes/page/PageStore.php(156)MediaWiki\Page\PageStore->getPageByNameViaLinkCache(int, string, int)
#16/srv/mediawiki/php-1.44.0-wmf.18/includes/page/PageStore.php(328)MediaWiki\Page\PageStore->getPageByName(int, string, int)
#17/srv/mediawiki/php-1.44.0-wmf.18/includes/title/Title.php(3741)MediaWiki\Page\PageStore->getPageByReference(MediaWiki\Title\Title, int)
#18/srv/mediawiki/php-1.44.0-wmf.18/includes/title/Title.php(2591)MediaWiki\Title\Title->getFieldFromPageStore(string, int)
#19/srv/mediawiki/php-1.44.0-wmf.18/includes/title/Title.php(3149)MediaWiki\Title\Title->getArticleID(int)
#20/srv/mediawiki/php-1.44.0-wmf.18/extensions/Translate/src/HookHandler.php(844)MediaWiki\Title\Title->exists()
#21/srv/mediawiki/php-1.44.0-wmf.18/includes/HookContainer/HookContainer.php(155)MediaWiki\Extension\Translate\HookHandler::onTitleIsAlwaysKnown(MediaWiki\Title\Title, null)
#22/srv/mediawiki/php-1.44.0-wmf.18/includes/HookContainer/HookRunner.php(4055)MediaWiki\HookContainer\HookContainer->run(string, array)
#23/srv/mediawiki/php-1.44.0-wmf.18/includes/title/Title.php(3174)MediaWiki\HookContainer\HookRunner->onTitleIsAlwaysKnown(MediaWiki\Title\Title, null)
#24/srv/mediawiki/php-1.44.0-wmf.18/includes/parser/Parser.php(2764)MediaWiki\Title\Title->isAlwaysKnown()
#25/srv/mediawiki/php-1.44.0-wmf.18/includes/parser/Parser.php(2462)MediaWiki\Parser\Parser->handleInternalLinks2(string)
#26/srv/mediawiki/php-1.44.0-wmf.18/includes/parser/Parser.php(1630)MediaWiki\Parser\Parser->handleInternalLinks(string)
#27/srv/mediawiki/php-1.44.0-wmf.18/includes/parser/Parser.php(701)MediaWiki\Parser\Parser->internalParse(string)
#28/srv/mediawiki/php-1.44.0-wmf.18/includes/language/MessageParser.php(191)MediaWiki\Parser\Parser->parse(string, MediaWiki\Title\Title, MediaWiki\Parser\ParserOptions, bool)
#29/srv/mediawiki/php-1.44.0-wmf.18/includes/language/MessageParser.php(156)MediaWiki\Language\MessageParser->parseWithoutPostprocessing(string, MediaWiki\Title\Title, bool, bool, LanguageEn)
#30/srv/mediawiki/php-1.44.0-wmf.18/includes/language/Message/Message.php(1460)MediaWiki\Language\MessageParser->parse(string, MediaWiki\Title\Title, bool, bool, LanguageEn)
#31/srv/mediawiki/php-1.44.0-wmf.18/includes/language/Message/Message.php(1050)MediaWiki\Message\Message->parseText(string)
#32/srv/mediawiki/php-1.44.0-wmf.18/includes/language/Message/Message.php(1092)MediaWiki\Message\Message->format(string)
#33/srv/mediawiki/php-1.44.0-wmf.18/includes/changetags/ChangeTags.php(1415)MediaWiki\Message\Message->parse()
#34/srv/mediawiki/php-1.44.0-wmf.18/includes/changetags/ChangeTags.php(774)ChangeTags::getChangeTagList(MediaWiki\Context\RequestContext, LanguageEn, bool, bool)
#35/srv/mediawiki/php-1.44.0-wmf.18/includes/specials/SpecialRecentChanges.php(800)ChangeTags::buildTagFilterSelector(string, bool, MediaWiki\Context\RequestContext)
#36/srv/mediawiki/php-1.44.0-wmf.18/includes/specials/SpecialRecentChangesLinked.php(320)MediaWiki\Specials\SpecialRecentChanges->getExtraOptions(MediaWiki\Html\FormOptions)
#37/srv/mediawiki/php-1.44.0-wmf.18/includes/specials/SpecialRecentChanges.php(630)MediaWiki\Specials\SpecialRecentChangesLinked->getExtraOptions(MediaWiki\Html\FormOptions)
#38/srv/mediawiki/php-1.44.0-wmf.18/includes/specialpage/ChangesListSpecialPage.php(1627)MediaWiki\Specials\SpecialRecentChanges->doHeader(MediaWiki\Html\FormOptions, int)
#39/srv/mediawiki/php-1.44.0-wmf.18/includes/specialpage/ChangesListSpecialPage.php(740)MediaWiki\SpecialPage\ChangesListSpecialPage->webOutputHeader(int, MediaWiki\Html\FormOptions)
#40/srv/mediawiki/php-1.44.0-wmf.18/includes/specials/SpecialRecentChanges.php(217)MediaWiki\SpecialPage\ChangesListSpecialPage->execute(string)
#41/srv/mediawiki/php-1.44.0-wmf.18/includes/specialpage/SpecialPage.php(729)MediaWiki\Specials\SpecialRecentChanges->execute(string)
#42/srv/mediawiki/php-1.44.0-wmf.18/includes/specialpage/SpecialPageFactory.php(1737)MediaWiki\SpecialPage\SpecialPage->run(string)
#43/srv/mediawiki/php-1.44.0-wmf.18/includes/actions/ActionEntryPoint.php(503)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#44/srv/mediawiki/php-1.44.0-wmf.18/includes/actions/ActionEntryPoint.php(145)MediaWiki\Actions\ActionEntryPoint->performRequest()
#45/srv/mediawiki/php-1.44.0-wmf.18/includes/MediaWikiEntryPoint.php(202)MediaWiki\Actions\ActionEntryPoint->execute()
#46/srv/mediawiki/php-1.44.0-wmf.18/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#47/srv/mediawiki/w/index.php(3)require(string)
#48{main}
Impact
Notes

Why are these PHP Deprecated? It's unclear what is supposed to be done... If anything

Details

Request URL
https://commons.wikimedia.org/wiki/Special:RecentChangesLinked/Category:Flickr_images_missing_SDC_creator

Event Timeline

Error
normalized_message
[{reqId}] {exception_url}   PHP Deprecated: Caller from MWExceptionHandler::rollbackPrimaryChanges ignored an error originally raised from MediaWiki\Pager\IndexPager::buildQueryInfo (contributions page filtered for namespace or RevisionDeleted edits): [19
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.18/includes/debug/MWDebug.php(386)
#0[internal function]MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.44.0-wmf.18/includes/debug/MWDebug.php(386)trigger_error(string, int)
#2/srv/mediawiki/php-1.44.0-wmf.18/includes/db/MWLBFactory.php(401)MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
#3/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/TransactionManager.php(186)MWLBFactory::logDeprecation(string)
#4/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/Database.php(1017)Wikimedia\Rdbms\TransactionManager->assertTransactionStatus(Wikimedia\Rdbms\DatabaseMySQL, array, string)
#5/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/Database.php(635)Wikimedia\Rdbms\Database->assertQueryIsCurrentlyAllowed(string, string)
#6/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/Database.php(2366)Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
#7/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/database/Database.php(2533)Wikimedia\Rdbms\Database->commit(string, string)
#8/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1676)Wikimedia\Rdbms\Database->flushSnapshot(string)
#9/srv/mediawiki/php-1.44.0-wmf.18/includes/libs/rdbms/lbfactory/LBFactory.php(366)Wikimedia\Rdbms\LoadBalancer->flushReplicaSnapshots(string)
#10/srv/mediawiki/php-1.44.0-wmf.18/includes/exception/MWExceptionHandler.php(169)Wikimedia\Rdbms\LBFactory->rollbackPrimaryChanges(string)
#11/srv/mediawiki/php-1.44.0-wmf.18/includes/exception/MWExceptionHandler.php(194)MWExceptionHandler::rollbackPrimaryChanges()
#12/srv/mediawiki/php-1.44.0-wmf.18/includes/exception/MWExceptionHandler.php(237)MWExceptionHandler::rollbackPrimaryChangesAndLog(Wikimedia\Rdbms\DBQueryTimeoutError, string)
#13/srv/mediawiki/php-1.44.0-wmf.18/includes/MediaWikiEntryPoint.php(222)MWExceptionHandler::handleException(Wikimedia\Rdbms\DBQueryTimeoutError, string)
#14/srv/mediawiki/php-1.44.0-wmf.18/includes/actions/ActionEntryPoint.php(81)MediaWiki\MediaWikiEntryPoint->handleTopLevelError(Wikimedia\Rdbms\DBQueryTimeoutError)
#15/srv/mediawiki/php-1.44.0-wmf.18/includes/MediaWikiEntryPoint.php(208)MediaWiki\Actions\ActionEntryPoint->handleTopLevelError(Wikimedia\Rdbms\DBQueryTimeoutError)
#16/srv/mediawiki/php-1.44.0-wmf.18/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#17/srv/mediawiki/w/index.php(3)require(string)
#18{main}
Impact
Notes

We don't own the code, I didn't write that part (maybe moved it around). This is on Mediawiki interfaces team.

The first error is T304085. Not sure what the second one is about, maybe the same thing?

There's maybe 4 or 5 that I've been seeing appearing over the last week... Just very unclear what should really be the action etc

What this error means is that some code (usually the code in "originally raised from", not the logged stack trace) is catching a DBQueryError which is not a supported operation.

daniel subscribed.

This looks like T304960: PHP Deprecated: Caller … ignored an error originally raised from IndexPager::buildQueryInfo (LogPager, SpecialLog) or ApiQueryUserContribs::execute. From there:

This is a confusing deprecation warning, and causes log noise. What is happening is that we have code (IndexPager::buildQueryInfo) [...] that runs a query. This query can sometimes time out after 30 seconds. [...]

The code is then mishandling the timeout error, and as a result the next code to run a query encounters the Deprecated: Caller … ignored an error originally raised from warning from Rdbms.

Krinkle renamed this task from "Query execution was interrupted" results in PHP Deprecated to PHP Deprecated: Caller from … ignored an error originally raised from SpecialRecentChangesLinked.Apr 1 2025, 2:31 AM

This indeed similar to T304085: PHP Deprecated: Caller ignored an error raised from SpecialRecentChanges::doMainQuery (max_statement_time exceeded), however SpecialRecentChanges and SpecialRecentChangesLinked each have their own setMaxExecutionTime() call. And, depending on whether the fix will be there or in the shared ChangesListSpecialPage class, may also each need to handle database exceptions correctly.

aaron triaged this task as Medium priority.Nov 7 2025, 6:39 AM

I guess we can exempt statement rollbacks of read statements due to max_statement_time from the logic triggering setTrxStatusIgnoredCause(). Any try/catch for timeouts should only exist when fairly directly wrapping a single read query.

In case of misuse of try/catch (e.g. when calling complex methods that do many of their own reads/writes), atomic sections would help guard against incomplete transactions (when methods abort early due to exceptions).