Page MenuHomePhabricator

A data update callback triggered a fail-safe exception in DataUpdateAdapter
Closed, DuplicatePublicPRODUCTION ERROR

Description

Error message
PHP Warning: [data-update-failed]: A data update callback triggered an exception (Fail-safe exception. Avoiding infinite loop due to possibily undetectable existing records in master.
 It may be due to encoding incompatibility between database values and values passed in $neededRecords parameter.) [Called from Wikibase\Repo\Content\DataUpdateAdapter::doUpdate in /extensions/Wikibase/repo/includes/Content/DataUpdateAdapter.php at line 65]
Impact

unknown

Notes

Details

Request ID
XYPQjwpAMEYAAKI2zkQAAAEC
Request URL
https://www.wikidata.org/wiki/Q45
Stack Trace
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /includes/debug/MWDebug.php(333): trigger_error(string, integer)
#2 /includes/debug/MWDebug.php(188): MWDebug::sendMessage(string, array, string, integer)
#3 /includes/GlobalFunctions.php(1079): MWDebug::warning(string, integer, integer, string)
#4 /extensions/Wikibase/lib/includes/Reporting/LogWarningExceptionHandler.php(28): wfLogWarning(string, integer)
#5 /extensions/Wikibase/repo/includes/Content/DataUpdateAdapter.php(65): Wikibase\Lib\Reporting\LogWarningExceptionHandler->handleException(Exception, string, string)
#6 /includes/deferred/DeferredUpdates.php(383): Wikibase\Repo\Content\DataUpdateAdapter->doUpdate()
#7 /includes/Storage/DerivedPageDataUpdater.php(1630): DeferredUpdates::attemptUpdate(Wikibase\Repo\Content\DataUpdateAdapter, Wikimedia\Rdbms\LBFactoryMulti)
#8 /includes/Storage/DerivedPageDataUpdater.php(1446): MediaWiki\Storage\DerivedPageDataUpdater->doSecondaryDataUpdates(array)
#9 /includes/deferred/MWCallableUpdate.php(38): MediaWiki\Storage\DerivedPageDataUpdater->MediaWiki\Storage\{closure}()
#10 /includes/deferred/DeferredUpdates.php(383): MWCallableUpdate->doUpdate()
#11 /includes/deferred/DeferredUpdates.php(281): DeferredUpdates::attemptUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti)
#12 /includes/deferred/DeferredUpdates.php(226): DeferredUpdates::run(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti, Monolog\Logger, BufferingStatsdDataFactory, string)
#13 /includes/deferred/DeferredUpdates.php(149): DeferredUpdates::handleUpdateQueue(array, string, integer)
#14 /includes/MediaWiki.php(934): DeferredUpdates::doUpdates(string)
#15 /includes/MediaWiki.php(758): MediaWiki->restInPeace(string, boolean)
#16 /includes/MediaWiki.php(781): MediaWiki->{closure}()
#17 /api.php(124): MediaWiki->doPostOutputShutdown(string)
#18 /srv/mediawiki/w/api.php(3): require(string)
#19 {main}

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@mmodell Can you restore the file paths in the stack traces? This makes it very hard to tell which branch the error happened on, especially around deployments. Ignoring the version for hashing purposes seems fine, but the raw data sent here should be unmodified (except to anonymise).

@Krinkle I can do that. I mainly cleaned it up to make the stack trace easier to read with the intention of including the version as a separate field.

Would you still prefer every line of stack trace to have the long path or would including the version in a field above the stack trace be sufficient?

I would prefer the stacktrace and non-normalised error message be reported unmodified from the original.

I don't think an extra field is needed because the "error" as reported concept does not have a version. The stack trace is a sample from any of the 100s of instances there are in Logstash, it may have existed before and will continue to exist after until fixed so I don't think we need to index and maintain it as a separate piece of information.

I don't think an extra field is needed because the "error" as reported concept does not have a version. The stack trace is a sample from any of the 100s of instances there are in Logstash, it may have existed before and will continue to exist after until fixed so I don't think we need to index and maintain it as a separate piece of information.

Ok, I'm fine with that. FWIW my current implementation includes the version number in the description, which gets indexed along with everything else in phabricator's fulltext search but no separate index.

This remains pretty noisy in production:

brennen@mwlog1001:/srv/mw-log$ head -1 error.log                                                                                                                                                                                                                               
2019-10-30 08:03:07 [XblDtwpAIDgAAD745acAAAAB] mw1344 wikidatawiki 1.35.0-wmf.3 error WARNING: [XblDtwpAIDgAAD745acAAAAB] /w/api.php   ErrorException from line 333 of /srv/mediawiki/php-1.35.0-wmf.3/includes/debug/MWDebug.php: PHP Warning: [data-update-failed]: A data update callback triggered an exception (Fail-safe exception. Avoiding infinite loop due to possibily undetectable existing records in master.

brennen@mwlog1001:/srv/mw-log$ grep -c 'A data update callback triggered an exception' error.log
14020

This is part of errors coming from the new term store for wikibase I'm afraid. @Addshore @alaa_wmde

I saw them as part of investigation for errors caused by the new term store, I'm fixing them one by one: T234948#5612718