Page MenuHomePhabricator

PHP Fatal Error on Special:Search with certain offset query parameter
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request URL: GET w/index.php?title=Special:Search&…
Request ID: XOAvYQpAMFkAADX7ytUAAAAR

message
PHP Fatal Error: Argument 1 passed to CirrusSearch\Search\FullTextResultsType::transformElasticsearchResult() must be an instance of Elastica\ResultSet, null given
trace
#0 /srv/mediawiki/php-1.34.0-wmf.5/extensions/CirrusSearch/includes/Search/MSearchResponses.php(90): NO_FUNCTION_GIVEN()
#1 /srv/mediawiki/php-1.34.0-wmf.5/extensions/CirrusSearch/includes/Searcher.php(354): CirrusSearch\Search\MSearchResponses->transformAsResultSet(CirrusSearch\Search\FullTextResultsType, string)
#2 /srv/mediawiki/php-1.34.0-wmf.5/extensions/CirrusSearch/includes/Searcher.php(176): CirrusSearch\Searcher->searchTextInternal(string)
#3 /srv/mediawiki/php-1.34.0-wmf.5/extensions/CirrusSearch/includes/CirrusSearch.php(215): CirrusSearch\Searcher->search(CirrusSearch\Search\SearchQuery)
#4 /srv/mediawiki/php-1.34.0-wmf.5/extensions/CirrusSearch/includes/CirrusSearch.php(188): CirrusSearch->searchTextReal(CirrusSearch\Search\SearchQuery)
#5 /srv/mediawiki/php-1.34.0-wmf.5/includes/search/SearchEngine.php(83): CirrusSearch->doSearchText(string)
#6 /srv/mediawiki/php-1.34.0-wmf.5/includes/search/SearchEngine.php(169): Closure$SearchEngine::searchText()
#7 /srv/mediawiki/php-1.34.0-wmf.5/includes/search/SearchEngine.php(84): SearchEngine->maybePaginate(Closure$SearchEngine::searchText;3546)
#8 /srv/mediawiki/php-1.34.0-wmf.5/includes/specials/SpecialSearch.php(341): SearchEngine->searchText(string)
#9 /srv/mediawiki/php-1.34.0-wmf.5/includes/specials/SpecialSearch.php(173): SpecialSearch->showResults(string)
#10 /srv/mediawiki/php-1.34.0-wmf.5/includes/specialpage/SpecialPage.php(570): SpecialSearch->execute(NULL)
#11 /srv/mediawiki/php-1.34.0-wmf.5/includes/specialpage/SpecialPageFactory.php(575): SpecialPage->run(NULL)
#12 /srv/mediawiki/php-1.34.0-wmf.5/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#13 /srv/mediawiki/php-1.34.0-wmf.5/includes/MediaWiki.php(865): MediaWiki->performRequest()
#14 /srv/mediawiki/php-1.34.0-wmf.5/includes/MediaWiki.php(515): MediaWiki->main()
#15 /srv/mediawiki/php-1.34.0-wmf.5/index.php(42): MediaWiki->run()
#16 /srv/mediawiki/w/index.php(3): include(string)

Impact

This is a fatal error with HTTP 500 response (non-cacheable) triggered from a public URL.

Notes

I've reduced one of the failure cases to the following:

https://en.wikipedia.org/w/index.php?title=Special:Search&offset=30000&search=www

It is a regression in the branch since this week (php-1.34.0-wmf.5). The error had no prior occurrences in Logstash.

Screenshot 2019-05-18 at 18.23.01.png (492×2 px, 98 KB)

Event Timeline

Krinkle triaged this task as High priority.May 18 2019, 4:21 PM
Krinkle updated the task description. (Show Details)

Tentatively setting High priority because the error in question is a fatal, happens regularly, and there's high confidence it was caused by a change that landed this week.

Copying from merged task, this should be fixed by the following patch which ships with this weeks train.

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CirrusSearch/+/511455

Change 511455 had a related patch set uploaded (by Jforrester; owner: DCausse):
[mediawiki/extensions/CirrusSearch@master] Consider searching out of limits an error

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

Change 511455 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Consider searching out of limits an error

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

Change 512231 had a related patch set uploaded (by EBernhardson; owner: DCausse):
[mediawiki/extensions/CirrusSearch@wmf/1.34.0-wmf.6] Consider searching out of limits an error

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

Change 512231 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@wmf/1.34.0-wmf.6] Consider searching out of limits an error

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

Mentioned in SAL (#wikimedia-operations) [2019-05-23T23:43:02Z] <ebernhardson@deploy1001> Started scap: php-1.34.0-wmf.6/extensions/CirrusSearch/includes/ T223738 Consider searching out of limits an error

Mentioned in SAL (#wikimedia-operations) [2019-05-24T00:04:35Z] <ebernhardson@deploy1001> Finished scap: php-1.34.0-wmf.6/extensions/CirrusSearch/includes/ T223738 Consider searching out of limits an error (duration: 21m 32s)

Krinkle removed a project: Patch-For-Review.

Confirmed in Logstash. Went from 80-100 per 3 hour block, to 0 on May 25.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:07 PM