Page MenuHomePhabricator

Error: Call to a member function parse() on boolean
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Error: Call to a member function parse() on boolean
exception.trace
from /srv/mediawiki/php-1.39.0-wmf.5/includes/changetags/ChangeTags.php(1853)
#0 /srv/mediawiki/php-1.39.0-wmf.5/includes/changetags/ChangeTags.php(1065): ChangeTags::getChangeTagList(RequestContext, Language)
#1 /srv/mediawiki/php-1.39.0-wmf.5/includes/specials/SpecialRecentChanges.php(803): ChangeTags::buildTagFilterSelector(string, boolean, RequestContext)
#2 /srv/mediawiki/php-1.39.0-wmf.5/includes/specials/SpecialRecentChangesLinked.php(270): SpecialRecentChanges->getExtraOptions(FormOptions)
#3 /srv/mediawiki/php-1.39.0-wmf.5/includes/specials/SpecialRecentChanges.php(629): SpecialRecentChangesLinked->getExtraOptions(FormOptions)
#4 /srv/mediawiki/php-1.39.0-wmf.5/includes/specialpage/ChangesListSpecialPage.php(1537): SpecialRecentChanges->doHeader(FormOptions, integer)
#5 /srv/mediawiki/php-1.39.0-wmf.5/includes/specialpage/ChangesListSpecialPage.php(1548): ChangesListSpecialPage->webOutputHeader(integer, FormOptions)
#6 /srv/mediawiki/php-1.39.0-wmf.5/includes/specialpage/ChangesListSpecialPage.php(655): ChangesListSpecialPage->webOutput(Wikimedia\Rdbms\MysqliResultWrapper, FormOptions)
#7 /srv/mediawiki/php-1.39.0-wmf.5/includes/specials/SpecialRecentChanges.php(205): ChangesListSpecialPage->execute(string)
#8 /srv/mediawiki/php-1.39.0-wmf.5/includes/specialpage/SpecialPage.php(671): SpecialRecentChanges->execute(string)
#9 /srv/mediawiki/php-1.39.0-wmf.5/includes/specialpage/SpecialPageFactory.php(1378): SpecialPage->run(string)
#10 /srv/mediawiki/php-1.39.0-wmf.5/includes/MediaWiki.php(315): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#11 /srv/mediawiki/php-1.39.0-wmf.5/includes/MediaWiki.php(911): MediaWiki->performRequest()
#12 /srv/mediawiki/php-1.39.0-wmf.5/includes/MediaWiki.php(565): MediaWiki->main()
#13 /srv/mediawiki/php-1.39.0-wmf.5/index.php(53): MediaWiki->run()
#14 /srv/mediawiki/php-1.39.0-wmf.5/index.php(46): wfIndexMain()
#15 /srv/mediawiki/w/index.php(3): require(string)
#16 {main}
Notes
  • One spike of a dozen or so on pl wikitionary exclusively
  • Happens on some small portion of requests to RecentChange and RelatedChanges

Details

MediaWiki Version
1.39.0-wmf.5
Request URL
https://pl.wiktionary.org/wiki/Specjalna:Zmiany_w_linkowanych/*

Event Timeline

Weird, did the backport conducted properly? It sounds like change 775437 was being applied for a while, and somehow was overridden by another patch?
cc @Lucas_Werkmeister_WMDE

Logstash says the request linked in the task description came from mw1328, and as far as I can tell /srv/mediawiki/php-1.39.0-wmf.5/includes/changetags/ChangeTags.php has the right contents on that host. In that code, line 1853 doesn’t have a parse() call:

lucaswerkmeister-wmde@mw1328:~$ nl -ba /srv/mediawiki/php-1.39.0-wmf.5/includes/changetags/ChangeTags.php | grep -wC3 1853
  1850		public static function getChangeTagList( MessageLocalizer $localizer, Language $lang ) {
  1851			$tags = self::getChangeTagListSummary( $localizer, $lang );
  1852			foreach ( $tags as &$tagInfo ) {
  1853				if ( $tagInfo['labelMsg'] ) {
  1854					// Use localizer with the correct page title to parse plain message from the cache.
  1855					$labelMsg = new RawMessage( $tagInfo['label'] );
  1856					$tagInfo['label'] = Sanitizer::stripAllTags( $localizer->msg( $labelMsg )->parse() );

I’m not sure what’s going on…

Lucas_Werkmeister_WMDE claimed this task.

Oh wait – the spike is at 13:55 UTC, which is exactly the time of the deployment of that change (T302754#7821630). So I guess one app server had the new code and wrote booleans to the cache, and then mw1328 processed another request while it didn’t have the new code yet and still expected a message there. Could’ve been avoided with a bit of extra code, but either way it should all be resolved now.