Page MenuHomePhabricator

Fatal exception of type "Wikimedia\Rdbms\DBTransactionSizeError"
Closed, ResolvedPublicPRODUCTION ERROR

Description

Fatal exception of type "Wikimedia\Rdbms\DBTransactionSizeError": InvalidArgumentException from line 137 of /includes/deferred/LinksUpdate.php: The Title object yields no ID. Perhaps the page doesn't exist?

Attempts to move https://en.wikipedia.org/wiki/Wikipedia:WIntroduction_(historical) to https://en.wikipedia.org/wiki/Wikipedia:Introduction_(historical) keep producing such errors. What's odd is that moving it from https://en.wikipedia.org/wiki/Wikipedia:Wikipedia:Introduction_(historical) through intermediary names does bring it as far as https://en.wikipedia.org/wiki/Wikipedia:WIntroduction_(historical)

Details

Request ID
XprDRQpAMMAAAPpnAyAAAAAD
Request URL
https://en.wikipedia.org/wiki/Special:MovePage/Wikipedia:WIntroduction_(historical)
Stack Trace
#0 /srv/mediawiki/php-1.35.0-wmf.28/includes/Storage/DerivedPageDataUpdater.php(1330): LinksUpdate->__construct(Title, ParserOutput, boolean)
#1 /srv/mediawiki/php-1.35.0-wmf.28/includes/deferred/RefreshSecondaryDataUpdate.php(83): MediaWiki\Storage\DerivedPageDataUpdater->getSecondaryDataUpdates(boolean)
#2 /srv/mediawiki/php-1.35.0-wmf.28/includes/deferred/DeferredUpdates.php(417): RefreshSecondaryDataUpdate->doUpdate()
#3 /srv/mediawiki/php-1.35.0-wmf.28/includes/deferred/DeferredUpdates.php(296): DeferredUpdates::attemptUpdate(RefreshSecondaryDataUpdate, Wikimedia\Rdbms\LBFactoryMulti)
#4 /srv/mediawiki/php-1.35.0-wmf.28/includes/deferred/DeferredUpdates.php(233): DeferredUpdates::run(RefreshSecondaryDataUpdate, Wikimedia\Rdbms\LBFactoryMulti, Monolog\Logger, BufferingStatsdDataFactory, string)
#5 /srv/mediawiki/php-1.35.0-wmf.28/includes/deferred/DeferredUpdates.php(150): DeferredUpdates::handleUpdateQueue(array, string, integer)
#6 /srv/mediawiki/php-1.35.0-wmf.28/includes/MediaWiki.php(1059): DeferredUpdates::doUpdates(string)
#7 /srv/mediawiki/php-1.35.0-wmf.28/includes/MediaWiki.php(839): MediaWiki->restInPeace()
#8 /srv/mediawiki/php-1.35.0-wmf.28/includes/MediaWiki.php(848): MediaWiki->{closure}()
#9 /srv/mediawiki/php-1.35.0-wmf.28/includes/MediaWiki.php(574): MediaWiki->doPostOutputShutdown()
#10 /srv/mediawiki/php-1.35.0-wmf.28/index.php(47): MediaWiki->run()
#11 /srv/mediawiki/w/index.php(3): require(string)
#12 {main}

Event Timeline

@JEumerus: Does it give an error code?
Usually between [ ] and looks like a random string of letters and numbers

RhinosF1 changed the subtype of this task from "Task" to "Production Error".Apr 18 2020, 9:06 AM

During this attempt the error code was "XprDRQpAMMAAAPpnAyAAAAAD" but I am not sure if it is always the same

During this attempt the error code was "XprDRQpAMMAAAPpnAyAAAAAD" but I am not sure if it is always the same

It won’t be, that tells someone with logstash access which errror it is.

RhinosF1 set Request URL to https://en.wikipedia.org/wiki/Special:MovePage/Wikipedia:WIntroduction_(historical).Apr 18 2020, 9:12 AM
RhinosF1 set Request ID to XprDRQpAMMAAAPpnAyAAAAAD.
Aklapper renamed this task from Fatal exception of type "Wikimedia\Rdbms\DBTransactionSizeError" to Fatal exception of type "Wikimedia\Rdbms\DBTransactionSizeError": InvalidArgumentException from line 137 of /includes/deferred/LinksUpdate.php: The Title object yields no ID. Perhaps the page doesn't exist?.Apr 18 2020, 9:18 AM
Aklapper edited Stack Trace. (Show Details)
Aklapper set Phatality ID to a4720f4335baff4e474cc67e507c90f1b6bb31eaa126b780e7c0b07f2bbc5705.
QEDK renamed this task from Fatal exception of type "Wikimedia\Rdbms\DBTransactionSizeError": InvalidArgumentException from line 137 of /includes/deferred/LinksUpdate.php: The Title object yields no ID. Perhaps the page doesn't exist? to Fatal exception of type "Wikimedia\Rdbms\DBTransactionSizeError".Apr 18 2020, 9:42 PM
QEDK updated the task description. (Show Details)

I've been replacing Revision objects with RevisionRecord objects in this and related code, but it doesn't seem to be because of my work.
Tracing the code manually:

LinksUpdate from line 131
if ( !$this->mId ) {
	// NOTE: subclasses may initialize mId before calling this constructor!
	$this->mId = $title->getArticleID( Title::READ_LATEST );
}

if ( !$this->mId ) {
	throw new InvalidArgumentException(
		"The Title object yields no ID. Perhaps the page doesn't exist?"
	);
}
Title::getArticleID
public function getArticleID( $flags = 0 ) {
	if ( $this->mNamespace < 0 ) {
		$this->mArticleID = 0;

		return $this->mArticleID;
	}

	$linkCache = MediaWikiServices::getInstance()->getLinkCache();
	if ( $flags & self::GAID_FOR_UPDATE ) {
		$oldUpdate = $linkCache->forUpdate( true );
		$linkCache->clearLink( $this );
		$this->mArticleID = $linkCache->addLinkObj( $this );
		$linkCache->forUpdate( $oldUpdate );
	} elseif ( DBAccessObjectUtils::hasFlags( $flags, self::READ_LATEST ) ) {
		$this->mArticleID = (int)$this->loadFieldFromDB( 'page_id', $flags );
	} elseif ( $this->mArticleID == -1 ) {
		$this->mArticleID = $linkCache->addLinkObj( $this );
	}

	return $this->mArticleID;
}
Title::loadFieldFromDB
private function loadFieldFromDB( $field, $flags ) {
	if ( !in_array( $field, self::getSelectFields(), true ) ) {
		return false; // field does not exist
	}

	$flags |= ( $flags & self::GAID_FOR_UPDATE ) ? self::READ_LATEST : 0; // b/c
	list( $index, $options ) = DBAccessObjectUtils::getDBOptions( $flags );

	return wfGetDB( $index )->selectField(
		'page',
		$field,
		$this->pageCond(),
		__METHOD__,
		$options
	);
}

The query being run should be:

SELECT page_id
FROM page
WHERE page_namespace = 4
AND page_title = 'WIntroduction_(historical)'

And manually querying the replicas returns 63642103, which is shown at https://en.wikipedia.org/w/index.php?title=Wikipedia:WIntroduction_(historical)&action=info
It looks like it should be working

I'm wondering why and how this is reported as a DBTransactionSizeError. The only code that triggers that appears to be a closure in LoadBalancer::approveMasterChanges, and that's not in the stack trace. That's rather curious.

Change 593569 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] LinksUpdate: report title when no page ID found

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

daniel triaged this task as Medium priority.Apr 30 2020, 5:36 PM

Change 593569 merged by jenkins-bot:
[mediawiki/core@master] LinksUpdate: report title when no page ID found

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

Krinkle subscribed.

Not seen recently, but hard to tell apart from T226898, and I'm not sure that DBTransactionSizeError: InvalidArgumentException actually can ever be reported as a single error. Looks like maybe two reports were conflated.