Page MenuHomePhabricator

Viewing file page with certain 'filetimestamp' value causes fatal error
Closed, DuplicatePublicPRODUCTION ERROR

Description

Error details

2018-03-15 22:43:52 [Wqr3KApAICwAALNsCBcAAACH] mw1323 dewiki 1.31.0-wmf.25 exception ERROR: [Wqr3KApAICwAALNsCBcAAACH] /w/index.php?title=Datei:Plastic-recyc-05.svg&filetimestamp=2006051221362   Wikimedia\Timestamp\TimestampException from line 218 of /srv/mediawiki/php-1.31.0-wmf.25/vendor/wikimedia/timestamp/src/ConvertibleTimestamp.php: Wikimedia\Timestamp\ConvertibleTimestamp::getTimestamp: The timestamp cannot be represented in the specified format {"exception_id":"Wqr3KApAICwAALNsCBcAAACH","exception_url":"/w/index.php?title=Datei:Plastic-recyc-05.svg&filetimestamp=2006051221362","caught_by":"mwe_handler"}
[Exception Wikimedia\Timestamp\TimestampException] (/srv/mediawiki/php-1.31.0-wmf.25/vendor/wikimedia/timestamp/src/ConvertibleTimestamp.php:218) Wikimedia\Timestamp\ConvertibleTimestamp::getTimestamp: The timestamp cannot be represented in the specified format
  #0 /srv/mediawiki/php-1.31.0-wmf.25/includes/libs/rdbms/database/Database.php(3332): Wikimedia\Timestamp\ConvertibleTimestamp->getTimestamp(integer)
  #1 /srv/mediawiki/php-1.31.0-wmf.25/includes/filerepo/file/OldLocalFile.php(250): Wikimedia\Rdbms\Database->timestamp(string)
  #2 /srv/mediawiki/php-1.31.0-wmf.25/includes/filerepo/file/LocalFile.php(321): OldLocalFile->loadFromDB(integer)
  #3 /srv/mediawiki/php-1.31.0-wmf.25/includes/filerepo/file/LocalFile.php(648): LocalFile->loadFromCache()
  #4 /srv/mediawiki/php-1.31.0-wmf.25/includes/filerepo/FileRepo.php(450): LocalFile->load(integer)
  #5 /srv/mediawiki/php-1.31.0-wmf.25/includes/filerepo/RepoGroup.php(154): FileRepo->findFile(Title, array)
  #6 /srv/mediawiki/php-1.31.0-wmf.25/includes/GlobalFunctions.php(2904): RepoGroup->findFile(Title, array)
  #7 /srv/mediawiki/php-1.31.0-wmf.25/extensions/FlaggedRevs/frontend/FlaggablePageView.php(927): wfFindFile(Title, array)
  #8 /srv/mediawiki/php-1.31.0-wmf.25/extensions/FlaggedRevs/frontend/FlaggedRevsUI.hooks.php(162): FlaggablePageView->imagePageFindFile(boolean, boolean)
  #9 /srv/mediawiki/php-1.31.0-wmf.25/includes/Hooks.php(177): FlaggedRevsUIHooks::onImagePageFindFile(ImagePage, boolean, boolean)
  #10 /srv/mediawiki/php-1.31.0-wmf.25/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
  #11 /srv/mediawiki/php-1.31.0-wmf.25/includes/page/ImagePage.php(75): Hooks::run(string, array)
  #12 /srv/mediawiki/php-1.31.0-wmf.25/includes/page/ImagePage.php(114): ImagePage->loadFile()
  #13 /srv/mediawiki/php-1.31.0-wmf.25/includes/actions/ViewAction.php(68): ImagePage->view()
  #14 /srv/mediawiki/php-1.31.0-wmf.25/includes/MediaWiki.php(500): ViewAction->show()
  #15 /srv/mediawiki/php-1.31.0-wmf.25/includes/MediaWiki.php(294): MediaWiki->performAction(ImagePage, Title)
  #16 /srv/mediawiki/php-1.31.0-wmf.25/includes/MediaWiki.php(861): MediaWiki->performRequest()
  #17 /srv/mediawiki/php-1.31.0-wmf.25/includes/MediaWiki.php(524): MediaWiki->main()
  #18 /srv/mediawiki/php-1.31.0-wmf.25/index.php(42): MediaWiki->run()
  #19 /srv/mediawiki/w/index.php(3): include(string)
  #20 {main}

Reproduce

Open https://de.wikipedia.org/w/index.php?title=Datei:Plastic-recyc-05.svg&filetimestamp=2006051221362.

Event Timeline

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

Probably should fail more gracefully, but that's fundamentally a user error - the timestamp in the URL is missing the last number.

Krinkle added a subscriber: Krinkle.

Marking as production impact. While low impact for users (it only happens when their proposed action is meant to fail, given the input was invalid). But the current code causes that error to bubble to the general system level, causing two problems:

  1. The user probably won't understand why it failed or what part of their input was wrong.
  1. It increases fatal-monitor and other health status checks for the MediaWiki service in production, thus falsely causing pre-deployment checks to fail and potentially alerting Ops.
Krinkle renamed this task from The timestamp cannot be represented in the specified format to Viewing file page with certain timestamp causes fatal error.Aug 7 2018, 4:45 PM
Krinkle renamed this task from Viewing file page with certain timestamp causes fatal error to Viewing file page with certain 'filetimestamp' value causes fatal error.
Krinkle triaged this task as High priority.
Krinkle updated the task description. (Show Details)
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:09 PM