Page MenuHomePhabricator

WatchedItemStore fatals on some logged-in pageviews: Argument to RevisionStore::getNextRevision must be RevisionRecord, null given
Closed, ResolvedPublic

Description

Error

Request URL: /w/index.php?title=File: … .JPG&diff= … &oldid= …
Request ID: XRTE-ApAAEYAAHEko-wAAACT

message
PHP Fatal Error: Argument 1 passed to MediaWiki\Revision\RevisionStore::getNextRevision() must be an instance of MediaWiki\Revision\RevisionRecord, null given
trace
#0 /srv/mediawiki/php-1.34.0-wmf.11/includes/watcheditem/WatchedItemStore.php(1123): NO_FUNCTION_GIVEN()
#1 /srv/mediawiki/php-1.34.0-wmf.11/includes/watcheditem/WatchedItemStore.php(1058): WatchedItemStore->getNotificationTimestamp(User, Title, WatchedItem, string, integer)
#2 /srv/mediawiki/php-1.34.0-wmf.11/includes/user/User.php(3895): WatchedItemStore->resetNotificationTimestamp(User, Title, string, integer)
#3 /srv/mediawiki/php-1.34.0-wmf.11/includes/page/WikiPage.php(1275): User->clearNotification(Title, integer)
#4 /srv/mediawiki/php-1.34.0-wmf.11/includes/deferred/MWCallableUpdate.php(38): Closure$WikiPage::doViewUpdates()
#5 /srv/mediawiki/php-1.34.0-wmf.11/includes/deferred/DeferredUpdates.php(309): MWCallableUpdate->doUpdate()
#6 /srv/mediawiki/php-1.34.0-wmf.11/includes/deferred/DeferredUpdates.php(265): DeferredUpdates::attemptUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti)
#7 /srv/mediawiki/php-1.34.0-wmf.11/includes/deferred/DeferredUpdates.php(217): DeferredUpdates::handleUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti, string, integer)
#8 /srv/mediawiki/php-1.34.0-wmf.11/includes/deferred/DeferredUpdates.php(140): DeferredUpdates::handleUpdateQueue(array, string, integer)
#9 /srv/mediawiki/php-1.34.0-wmf.11/includes/MediaWiki.php(600): DeferredUpdates::doUpdates(string, integer)
#10 /srv/mediawiki/php-1.34.0-wmf.11/includes/MediaWiki.php(566): MediaWiki::preOutputCommit(RequestContext, Closure$MediaWiki::main;5141)
#11 /srv/mediawiki/php-1.34.0-wmf.11/includes/MediaWiki.php(900): MediaWiki->doPreOutputCommit(Closure$MediaWiki::main;5141)
#12 /srv/mediawiki/php-1.34.0-wmf.11/includes/MediaWiki.php(515): MediaWiki->main()
#13 /srv/mediawiki/php-1.34.0-wmf.11/index.php(42): MediaWiki->run()

Impact

Logged-in users are unable to view certain pages or certain revisions of pages.

Notes

From Logstash:

  • Seen since at least 1.34-wmf.6 (29 May 2019).
  • Affects pl.wikipedia.org, en.wikipedia.org, commons.wikimedia.org, and other more.
  • Seen with File page titles on Commons, File page titles on en.wikipedia, User page titles on de.wikipedia, User talk pages on es.wikipedia.

See also:

Event Timeline

Krinkle created this task.Jun 27 2019, 5:19 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 27 2019, 5:19 PM

Change 521946 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/core@master] WatchedItemStore: Fix fatal when revision is deleted

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

Catrope claimed this task.Jul 10 2019, 8:17 PM

Change 522155 had a related patch set uploaded (by Krinkle; owner: Catrope):
[mediawiki/core@wmf/1.34.0-wmf.13] WatchedItemStore: Fix fatal when revision is deleted

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

Change 521946 merged by jenkins-bot:
[mediawiki/core@master] WatchedItemStore: Fix fatal when revision is deleted

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

Change 522155 merged by jenkins-bot:
[mediawiki/core@wmf/1.34.0-wmf.13] WatchedItemStore: Fix fatal when revision is deleted

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

Mentioned in SAL (#wikimedia-operations) [2019-07-11T23:58:19Z] <thcipriani@deploy1001> Synchronized php-1.34.0-wmf.13/includes/watcheditem/WatchedItemStore.php: SWAT: [[gerrit:522155|WatchedItemStore: Fix fatal when revision is deleted]] T226741 (duration: 00m 51s)

Krinkle closed this task as Resolved.Jul 12 2019, 12:32 AM