Page MenuHomePhabricator

PHP Warning: Invalid argument supplied for foreach()
Closed, ResolvedPublic

Description

160+ errors in the last 12 hours: https://kibana4.wmflabs.org/goto/f134a119e33eb6e0cf8c5da7111d56b3
Not sure if this is an actual error that needs to be taken care of, or just logspam.

Error

Request URL: /w/api.php?action=wbsearchentities&language=en&strictlanguage=1&search=Leda+and+the+Swan&format=json&type=item
Request ID: AWus02DaAbPxH_Ym1TzA

message
[XRnPtqwQBHcAACYenfcAAAAO] /w/api.php?action=wbsearchentities&language=en&strictlanguage=1&search=Leda+and+the+Swan&format=json&type=item   ErrorException from line 31 of /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Search/Rescore/TermBoostScoreBuilder.php: PHP Warning: Invalid argument supplied for foreach()
trace
#0 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Search/Rescore/TermBoostScoreBuilder.php(31): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Search/Rescore/FunctionScoreChain.php(173): CirrusSearch\Search\Rescore\TermBoostScoreBuilder->__construct(CirrusSearch\SearchConfig, double, array)
#2 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Search/Rescore/FunctionScoreChain.php(103): CirrusSearch\Search\Rescore\FunctionScoreChain->getImplementation(array)
#3 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Search/Rescore/RescoreBuilder.php(114): CirrusSearch\Search\Rescore\FunctionScoreChain->buildRescoreQuery()
#4 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Search/Rescore/RescoreBuilder.php(92): CirrusSearch\Search\Rescore\RescoreBuilder->buildRescoreQuery(array)
#5 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Search/SearchContext.php(508): CirrusSearch\Search\Rescore\RescoreBuilder->build()
#6 /srv/mediawiki/php-master/extensions/WikibaseCirrusSearch/src/WikibasePrefixSearcher.php(73): CirrusSearch\Search\SearchContext->getRescore()
#7 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Searcher.php(475): Wikibase\Search\Elastic\WikibasePrefixSearcher->buildSearch()
#8 /srv/mediawiki/php-master/extensions/WikibaseCirrusSearch/src/WikibasePrefixSearcher.php(87): CirrusSearch\Searcher->searchOne()
#9 /srv/mediawiki/php-master/extensions/WikibaseCirrusSearch/src/EntitySearchElastic.php(308): Wikibase\Search\Elastic\WikibasePrefixSearcher->performSearch(Elastica\Query\BoolQuery)
#10 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/CombinedEntitySearchHelper.php(53): Wikibase\Search\Elastic\EntitySearchElastic->getRankedSearchResults(string, string, string, integer, boolean)
#11 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/TypeDispatchingEntitySearchHelper.php(55): Wikibase\Repo\Api\CombinedEntitySearchHelper->getRankedSearchResults(string, string, string, integer, boolean)
#12 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/SearchEntities.php(121): Wikibase\Repo\Api\TypeDispatchingEntitySearchHelper->getRankedSearchResults(string, string, string, integer, boolean)
#13 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/SearchEntities.php(254): Wikibase\Repo\Api\SearchEntities->getSearchEntries(array)
#14 /srv/mediawiki/php-master/includes/api/ApiMain.php(1583): Wikibase\Repo\Api\SearchEntities->execute()
#15 /srv/mediawiki/php-master/includes/api/ApiMain.php(531): ApiMain->executeAction()
#16 /srv/mediawiki/php-master/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#17 /srv/mediawiki/php-master/api.php(87): ApiMain->execute()
#18 /srv/mediawiki/w/api.php(3): include(string)
#19 {main}

Impact

Notes

  • Spotted on Beta Cluster logstash, which runs at MW 1.34.0-alpha.

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseCirrusSearch : masterUse proper defaults for StatementBoost

Event Timeline

Restricted Application added a project: Discovery-Search. · View Herald TranscriptJul 1 2019, 9:31 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

See also https://kibana4.wmflabs.org/goto/8db611ae2ec55e4ff1fb338c532bad81 for a very similar error message but with a lower hitcount (60+ in the last 12 hours). Latest entry:

[XRnPRKwQBHcAACYenZkAAAAG] /w/index.php?fulltext=1&ns0=1&profile=all&search=AQOLashay9559827&title=Special%3ASearch ErrorException from line 85 of /srv/mediawiki/php-master/extensions/CirrusSearch/includes/OtherIndexesUpdater.php: PHP Warning: Invalid argument supplied for foreach()

#0 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/OtherIndexesUpdater.php(85): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Search/SearchContext.php(734): CirrusSearch\OtherIndexesUpdater::getExtraIndexesForNamespaces(CirrusSearch\SearchConfig, array)
#2 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Search/SearchRequestBuilder.php(56): CirrusSearch\Search\SearchContext->getExtraIndices()
#3 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Searcher.php(467): CirrusSearch\Search\SearchRequestBuilder->build()
#4 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Searcher.php(305): CirrusSearch\Searcher->buildSearch()
#5 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/Searcher.php(181): CirrusSearch\Searcher->searchTextInternal(string)
#6 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/CirrusSearch.php(228): CirrusSearch\Searcher->search(CirrusSearch\Search\SearchQuery)
#7 /srv/mediawiki/php-master/extensions/CirrusSearch/includes/CirrusSearch.php(201): CirrusSearch\CirrusSearch->searchTextReal(CirrusSearch\Search\SearchQuery)
#8 /srv/mediawiki/php-master/includes/search/SearchEngine.php(86): CirrusSearch\CirrusSearch->doSearchText(string)
#9 /srv/mediawiki/php-master/includes/search/SearchEngine.php(172): Closure$SearchEngine::searchText()
#10 /srv/mediawiki/php-master/includes/search/SearchEngine.php(87): SearchEngine->maybePaginate(Closure$SearchEngine::searchText;1326)
#11 /srv/mediawiki/php-master/includes/specials/SpecialSearch.php(342): SearchEngine->searchText(string)
#12 /srv/mediawiki/php-master/includes/specials/SpecialSearch.php(173): SpecialSearch->showResults(string)
#13 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(571): SpecialSearch->execute(NULL)
#14 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(NULL)
#15 /srv/mediawiki/php-master/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#16 /srv/mediawiki/php-master/includes/MediaWiki.php(884): MediaWiki->performRequest()
#17 /srv/mediawiki/php-master/includes/MediaWiki.php(515): MediaWiki->main()
#18 /srv/mediawiki/php-master/index.php(42): MediaWiki->run()
#19 /srv/mediawiki/w/index.php(3): include(string)

Change 519993 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/WikibaseCirrusSearch@master] Use proper defaults for StatementBoost

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

dcausse claimed this task.Jul 1 2019, 2:23 PM
dcausse triaged this task as Medium priority.
dcausse moved this task from needs triage to Current work on the Discovery-Search board.
dcausse moved this task from In Progress to Needs review on the Discovery-Search (Current work) board.

Change 519993 merged by jenkins-bot:
[mediawiki/extensions/WikibaseCirrusSearch@master] Use proper defaults for StatementBoost

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

debt closed this task as Resolved.Jul 3 2019, 4:26 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:06 PM