Page MenuHomePhabricator

PHP Notice: Undefined property: Wikimedia\RequestTimeout\RequestTimeoutException::$code
Open, LowPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Notice: Undefined property: Wikimedia\RequestTimeout\RequestTimeoutException::$code
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.19/includes/debug/logger/monolog/LogstashFormatter.php(229)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.37.0-wmf.19/includes/debug/logger/monolog/LogstashFormatter.php(229): Exception->getCode()
#2 /srv/mediawiki/php-1.37.0-wmf.19/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php(169): MediaWiki\Logger\Monolog\LogstashFormatter->normalizeException(Wikimedia\RequestTimeout\RequestTimeoutException, integer)
#3 /srv/mediawiki/php-1.37.0-wmf.19/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php(157): Monolog\Formatter\NormalizerFormatter->normalize(Wikimedia\RequestTimeout\RequestTimeoutException, integer)
#4 /srv/mediawiki/php-1.37.0-wmf.19/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php(157): Monolog\Formatter\NormalizerFormatter->normalize(array, integer)
#5 /srv/mediawiki/php-1.37.0-wmf.19/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php(53): Monolog\Formatter\NormalizerFormatter->normalize(array)
#6 /srv/mediawiki/php-1.37.0-wmf.19/includes/debug/logger/monolog/LogstashFormatter.php(55): Monolog\Formatter\NormalizerFormatter->format(array)
#7 /srv/mediawiki/php-1.37.0-wmf.19/includes/debug/logger/monolog/CeeFormatter.php(19): MediaWiki\Logger\Monolog\LogstashFormatter->format(array)
#8 /srv/mediawiki/php-1.37.0-wmf.19/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(40): MediaWiki\Logger\Monolog\CeeFormatter->format(array)
#9 /srv/mediawiki/php-1.37.0-wmf.19/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php(33): Monolog\Handler\AbstractProcessingHandler->handle(array)
#10 /srv/mediawiki/php-1.37.0-wmf.19/vendor/monolog/monolog/src/Monolog/Logger.php(317): Monolog\Handler\WhatFailureGroupHandler->handle(array)
#11 /srv/mediawiki/php-1.37.0-wmf.19/vendor/monolog/monolog/src/Monolog/Logger.php(539): Monolog\Logger->addRecord(integer, string, array)
#12 /srv/mediawiki/php-1.37.0-wmf.19/includes/exception/MWExceptionHandler.php(697): Monolog\Logger->error(string, array)
#13 /srv/mediawiki/php-1.37.0-wmf.19/includes/exception/MWExceptionHandler.php(147): MWExceptionHandler::logException(Wikimedia\RequestTimeout\RequestTimeoutException, string)
#14 /srv/mediawiki/php-1.37.0-wmf.19/includes/exception/MWExceptionHandler.php(185): MWExceptionHandler::rollbackMasterChangesAndLog(Wikimedia\RequestTimeout\RequestTimeoutException, string)
#15 /srv/mediawiki/php-1.37.0-wmf.19/includes/exception/MWExceptionHandler.php(157): MWExceptionHandler::handleException(Wikimedia\RequestTimeout\RequestTimeoutException, string)
#16 [internal function]: MWExceptionHandler::handleUncaughtException(Wikimedia\RequestTimeout\RequestTimeoutException)
#17 {main}
Impact

Unclear.

Notes

Saw this and 2 other variants in 1.37.0-wmf.19, all from the same request.

Unsure if MediaWiki-Debug-Logger is an appropriate tag here.

Details

Request URL
https://ca.wikipedia.org/w/rest.php/ca.wikipedia.org/v3/page/pagebundle/[bundle]/[id]

Event Timeline

Krinkle added a subscriber: Krinkle.

The RequestTimeoutException class inherits the PHP built-in Exception class, its getCode() method, and its Exception->code property, which is set by the Exception constructor. As such it seems reasonable for core's debug logger (LogstashFormatter) to call this method.

It seems something is happening specifically with RequestTimeoutException that causes this property to not be set in certain rare cases. If we determine this to be unreproducible, however, then perhaps this is opcache (T245183).

Tagging PE as steward of wikimedia/request-timeout.

tstarling added a subscriber: tstarling.

6 occurrences in the last 30 days -> low priority