Page MenuHomePhabricator

InvalidArgumentException: Invalid sort: last_edit_asc=1
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request URL: /w/index.php?search=sort+asc&sort=last_edit_asc=1
Request ID: XS3fUwpAAEAAAAr4aPkAAACA

message
[{exception_id}] {exception_url}   InvalidArgumentException from line 335 of /srv/mediawiki/php-1.34.0-wmf.14/includes/search/SearchEngine.php: Invalid sort: last_edit_asc=1. Must be one of: relevance, just_match, none, incoming_links_asc, incoming_links_
trace
#0 /srv/mediawiki/php-1.34.0-wmf.14/includes/specials/SpecialSearch.php(321): SearchEngine->setSort(string)
#1 /srv/mediawiki/php-1.34.0-wmf.14/includes/specials/SpecialSearch.php(173): SpecialSearch->showResults(string)
#2 /srv/mediawiki/php-1.34.0-wmf.14/includes/specialpage/SpecialPage.php(571): SpecialSearch->execute(NULL)
#3 /srv/mediawiki/php-1.34.0-wmf.14/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(NULL)
#4 /srv/mediawiki/php-1.34.0-wmf.14/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#5 /srv/mediawiki/php-1.34.0-wmf.14/includes/MediaWiki.php(884): MediaWiki->performRequest()
#6 /srv/mediawiki/php-1.34.0-wmf.14/includes/MediaWiki.php(515): MediaWiki->main()
#7 /srv/mediawiki/php-1.34.0-wmf.14/index.php(42): MediaWiki->run()
#8 /srv/mediawiki/w/index.php(3): include(string)
#9 {main}

Impact

To be determined.

Notes

Appeared on group0 deploy of 1.34.0-wmf.14

https://www.mediawiki.org/wiki/MediaWiki_1.34/wmf.14#CirrusSearch

  • 349c5547 - tests: Remove zerowiki, closed by Max Semenik
  • 245964aa - build: Upgrade phan-taint-check-plugin from 1.5.x to 2.0.1 by James D. Forrester
  • 7b8009be - Remove CirrusSearchRequestSet code (task T226436) by Andrew Otto
  • e1deb4b3 - Log failing RedirectsAndIncomingLinks searches (task T227691) by Erik Bernhardson
  • 8c05b343 - RedirectsAndIncomingLinks: succeede or fail, but not both (task T227691) by Erik Bernhardson
  • 4cf427e9 - Add FetchPhaseConfigBuilder (task T190130) by David Causse

Event Timeline

Restricted Application added a project: Discovery-Search. · View Herald TranscriptJul 16 2019, 2:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
hashar updated the task description. (Show Details)Jul 16 2019, 2:58 PM
hashar triaged this task as High priority.Jul 16 2019, 4:50 PM
hashar added a subscriber: hashar.

Train blockers are unbreak now usually, then I am not sure how bad it is. Over 7 days there have been just 6 occurrences and they seem like end users altering the query manually. Hardly qualifies as a blocker to me?

Train blockers are unbreak now usually, then I am not sure how bad it is. Over 7 days there have been just 6 occurrences and they seem like end users altering the query manually. Hardly qualifies as a blocker to me?

I only see it twice in the last 7 days: https://logstash.wikimedia.org/goto/0a3b4e67337d16ddce4ba3deb16f6c94 (yes that is limited to the wmf.14 src path, but I didn't see anything from wmf.13)

Waiting on opinion from @EBernhardson :)

Off the top of my head, this seems like a possible culprit: https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AdvancedSearch/+/510934/

At the backend level this should return some sort of search warning and not an uncaught exception. This does not need to block the train.

EBernhardson lowered the priority of this task from High to Medium.Jul 16 2019, 5:31 PM
debt added a subscriber: debt.

moving to current work - we should create the patch for this random weirdness so it doesn't bother RelEng anymore :)

Change 524829 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/core@master] Validate sort order in Special:Search

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

Thank you Erik for the follow up patch :-]

Change 524829 merged by jenkins-bot:
[mediawiki/core@master] Validate sort order in Special:Search

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

hashar closed this task as Resolved.Jul 24 2019, 10:17 AM

Solved by @EBernhardson . No need to backport to wmf branches since that is a rare occurrence and happened previously. Thank you Erik!

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