Last modified: 2013-10-02 06:45:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45544, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43544 - Should return error message (rather than "zero results") when search fails
Should return error message (rather than "zero results") when search fails
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
MWSearch (Other open bugs)
unspecified
All All
: High normal with 2 votes (vote)
: ---
Assigned To: Munagala Ramanath (Ram)
: platformeng
: 43553 (view as bug list)
Depends on:
Blocks: 35691 42423 47761 54865
  Show dependency treegraph
 
Reported: 2012-12-31 21:38 UTC by Rob Lanphier
Modified: 2013-10-02 06:45 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Ruby script to reproduce failure (1.57 KB, application/x-ruby)
2013-01-25 00:59 UTC, Munagala Ramanath (Ram)
Details

Description Rob Lanphier 2012-12-31 21:38:18 UTC
Per bug 42423 comment #17, it would be much better if we received an error when the search index is broken rather than receiving "0 results", as what currently happens.  This assumes that Lucene actually returns a useful error message that gets tossed, rather than providing MediaWiki with 0 results in this case.
Comment 2 Andre Klapper 2013-01-01 11:51:29 UTC
*** Bug 43553 has been marked as a duplicate of this bug. ***
Comment 3 Tim Starling 2013-01-07 01:35:16 UTC
For RMI errors, of the kind which were the cause of "zero results" being returned last time I debugged a Lucene problem, there are error handling issues in multiple parts of the stack:

* The SearchEngine interface in the core has no way to report errors to SpecialSearch (short of throwing an exception).
* MWSearch makes no attempt to extract an error message from the body of HTTP 500 errors, it just returns null.
* In lucene-search-2, some RMIMessengerClient methods respond to network errors by returning an empty result set, instead of returning an error status as they should.
Comment 4 Tim Starling 2013-01-10 01:38:18 UTC
We should at least log errors to UDP.
Comment 5 Munagala Ramanath (Ram) 2013-01-25 00:59:27 UTC
Created attachment 11684 [details]
Ruby script to reproduce failure

Sends the same search query 100 times with a delay 10s between iterations. I ran
it a few times and was able to reproduce the failure every time sometimes very
quickly, sometimes after around 70 iterations.
Comment 6 Nemo 2013-02-04 13:22:34 UTC
I disagree on this being an enhancement: it's an actual bug because it's highly misleading.
Comment 7 Foroa 2013-02-04 15:28:51 UTC
Sorry, but this is as critical as bug 42423. A system that fails to report failed searches (but reports nothing found) is plain misleading and makes that users loose confidence in the system, especially at the rate it fails, sometimes 100 % during minutes. At least, it should state try again.
Comment 8 Munagala Ramanath (Ram) 2013-03-25 17:38:21 UTC
Over the weekend my script was again able to reproduce the "zero results"
error so the issue is still with us; some log analysis indicates that failure of the 'highlight' call due to socket timeouts may be the problem so returning a
failure in this case is easy to do; the broader issue of why we are getting
socket timeouts is more difficult.
Comment 9 Munagala Ramanath (Ram) 2013-03-26 02:30:51 UTC
https://gerrit.wikimedia.org/r/#/c/55841/
Instruments code to dump entire GlobalConfiguration singleton to a file to aid
debugging.
Comment 10 Munagala Ramanath (Ram) 2013-03-28 01:39:39 UTC
https://gerrit.wikimedia.org/r/#/c/56354/
Adds better error handling to return an error status instead of hiding internal errors and falsely reporting "zero results". Similar changes to the PHP side of things mentioned by TimS in comment 3 above are still being worked on.
Comment 11 Munagala Ramanath (Ram) 2013-04-03 20:38:52 UTC
https://gerrit.wikimedia.org/r/#/c/57350/
https://gerrit.wikimedia.org/r/#/c/57368/

I've pushed fixes to the PHP side in the above 2 commits. Apparently Chad has
also been working on this and his slightly different fixes are here:

https://gerrit.wikimedia.org/r/#/c/57337/
https://gerrit.wikimedia.org/r/#/c/57336/
Comment 12 Chad H. 2013-04-04 20:15:30 UTC
I amended mine based off our discussion on IRC/e-mail, and combines both approaches.
Comment 13 Gerrit Notification Bot 2013-04-08 21:18:18 UTC
https://gerrit.wikimedia.org/r/57350 (Gerrit Change Idb42d64987164ba099228b154729c9c86af7407f) | change ABANDONED [by Ram]
Comment 14 Gerrit Notification Bot 2013-04-08 21:19:34 UTC
https://gerrit.wikimedia.org/r/57368 (Gerrit Change Ic07ce8f32be8358fbb2f5a60f3c8c324cb27694c) | change ABANDONED [by Ram]
Comment 15 Andre Klapper 2013-04-18 09:42:56 UTC
Chad's patches in https://gerrit.wikimedia.org/r/#/c/57336/ and https://gerrit.wikimedia.org/r/#/c/57337/ got merged, but that broke ApiQuerySearch (see bug 47353).
Comment 16 Gerrit Notification Bot 2013-04-22 01:23:24 UTC
https://gerrit.wikimedia.org/r/56354 (Gerrit Change Ibeef63f45a3276e870afbcadbd08c7bd2967b9e6) | change APPROVED and MERGED [by Tim Starling]
Comment 17 Andre Klapper 2013-04-22 15:27:43 UTC
All three patches (that I'm aware of) got merged, can this be closed as FIXED or is more needed?
Comment 18 Munagala Ramanath (Ram) 2013-04-22 21:53:06 UTC
Let's wait for it to be deployed (in a few days, hopefully) before closing.
Comment 19 Gerrit Notification Bot 2013-04-29 01:02:29 UTC
https://gerrit.wikimedia.org/r/55841 (Gerrit Change I178fba54a42173bce0b941f143bbc5ecf2bac15d) | change ABANDONED [by Tim Starling]
Comment 20 Foroa 2013-04-29 06:39:04 UTC
Search failure has been seen a couple of times at Commons last days.
Comment 21 Nemo 2013-04-29 07:12:24 UTC
(In reply to comment #20)
> Search failure has been seen a couple of times at Commons last days.

Yes, I saw it too yesterday. Sometimes it's nice to see errors. ;)
Comment 22 Munagala Ramanath (Ram) 2013-04-30 00:16:06 UTC
Closing this since we are now seeing proper errors instead of spurious "zero results".
Comment 23 Nemo 2013-09-30 06:55:05 UTC
(In reply to comment #4)
> We should at least log errors to UDP.

Tim, should this be filed as separate bug report? The log was (re)enabled and then disabled as too spammy on April 24: a1c62a08.
Currently we have:

MWSearch_body.php
500:                                                    wfDebugLog( 'mwsearch', "Search timeout requesting $searchUrl" );
508:                                            wfDebugLog( 'mwsearch', 'Search backend error: ' . $m[1] );

Maybe the second log could be removed/renamed so that we can at least have some way to count the first.
Comment 24 Nemo 2013-10-02 06:45:38 UTC
(In reply to comment #23)
> (In reply to comment #4)
> > We should at least log errors to UDP.
> 
> Tim, should this be filed as separate bug report? The log was (re)enabled and
> then disabled as too spammy on April 24: a1c62a08.
> Currently we have:
> 
> MWSearch_body.php
> 500:                                                    wfDebugLog(
> 'mwsearch',
> "Search timeout requesting $searchUrl" );
> 508:                                            wfDebugLog( 'mwsearch',
> 'Search
> backend error: ' . $m[1] );
> 
> Maybe the second log could be removed/renamed so that we can at least have
> some
> way to count the first.

That was filed as bug 54865.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links