Page MenuHomePhabricator

ConvertibleTimestamp::getTimestamp: The timestamp cannot be represented in the specified format
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error message
Wikimedia\Timestamp\ConvertibleTimestamp::getTimestamp: The timestamp cannot be represented in the specified format
Stack Trace
from /srv/mediawiki/php-1.36.0-wmf.27/vendor/wikimedia/timestamp/src/ConvertibleTimestamp.php(330)
#0 /srv/mediawiki/php-1.36.0-wmf.27/includes/libs/ParamValidator/TypeDef/TimestampDef.php(104): Wikimedia\Timestamp\ConvertibleTimestamp->getTimestamp(integer)
#1 /srv/mediawiki/php-1.36.0-wmf.27/includes/libs/ParamValidator/ParamValidator.php(597): Wikimedia\ParamValidator\TypeDef\TimestampDef->validate(string, string, array, array)
#2 /srv/mediawiki/php-1.36.0-wmf.27/includes/libs/ParamValidator/ParamValidator.php(551): Wikimedia\ParamValidator\ParamValidator->validateValue(string, string, array, array)
#3 /srv/mediawiki/php-1.36.0-wmf.27/includes/api/Validator/ApiParamValidator.php(363): Wikimedia\ParamValidator\ParamValidator->getValue(string, array, array)
#4 /srv/mediawiki/php-1.36.0-wmf.27/includes/api/ApiBase.php(1045): MediaWiki\Api\Validator\ApiParamValidator->getValue(ApiQueryAllImages, string, array, array)
#5 /srv/mediawiki/php-1.36.0-wmf.27/includes/api/ApiBase.php(733): ApiBase->getParameterFromSettings(string, array, boolean)
#6 /srv/mediawiki/php-1.36.0-wmf.27/includes/api/ApiQuery.php(266): ApiBase->extractRequestParams()
#7 /srv/mediawiki/php-1.36.0-wmf.27/includes/api/ApiMain.php(1612): ApiQuery->execute()
#8 /srv/mediawiki/php-1.36.0-wmf.27/includes/api/ApiMain.php(592): ApiMain->executeAction()
#9 /srv/mediawiki/php-1.36.0-wmf.27/includes/api/ApiMain.php(563): ApiMain->executeActionWithErrorHandling()
#10 /srv/mediawiki/php-1.36.0-wmf.27/api.php(90): ApiMain->execute()
#11 /srv/mediawiki/php-1.36.0-wmf.27/api.php(45): wfApiMain()
#12 /srv/mediawiki/w/api.php(3): require(string)
#13 {main}
Impact

2 of these seen since deploy of 1.36.0-wmf.27 (T271341) to all wikis.

Details

Request ID
YAnquApAMNsAAJfvH4UAAABE
Request URL
https://en.wikipedia.org/w/api.php?action=query&list=allimages&ailimit=50&format=json&aisort=timestamp&aistart=2014815210101&callback=jQuery35107323408282974431_1611262648041&_=1611262648042

Event Timeline

The URL was probably manually tinkered with.

Indeed, "2014815210101" is not a valid timestamp. But validation and error handling could be improved.

AMooney raised the priority of this task from Lowest to Low.
Krinkle raised the priority of this task from Low to Needs Triage.Jan 27 2021, 8:16 PM
Krinkle moved this task from Untriaged to Jan 2021 on the Wikimedia-production-error board.
Krinkle moved this task from Later to Inbox on the Platform Team Workboards (Clinic Duty Team) board.
Krinkle subscribed.

This exposes uncached fatal errors to a public GET-able http address. I would generally treat those as high priority. The API validation needs to catch these and reject them gracefully with an error message, not crash like it does now, which would raise error levels, and may abort deployments or cause SRE alerts to fire at unexpected times.

daniel triaged this task as Medium priority.Jan 28 2021, 3:01 PM

Change 661685 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Tighten invalid timestamp error checking

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

Change 661685 merged by jenkins-bot:
[mediawiki/core@master] Tighten invalid timestamp error checking

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

Ammarpad claimed this task.