Freezes when searching for "lib"

Bug #634449 reported by screamingmoron on 2010-09-09
This bug affects 3 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Mohamed Amine Ilidrissi

Bug Description

Binary package hint: software-center

Rather funny:
All other searches work fine, but if I search for "lib" in the Ubuntu Software Center 2.0.7 it locks up (in either "Installed Software" or "Get Software"); I have to "Force Quit" it. Installed packages starting with "lib" are also not showing up in "Installed Software" (specifically a package called "libticalcs2-7", which shows up in Synaptic Package Manager).

I'm using Ubuntu 10.04.1 on a Compaq Presario CQ60-419wm (Info about my hardware here:

Sorry if this bug is invalid or already mentioned.

Changed in software-center (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Michael Vogt (mvo) on 2010-09-09
Changed in software-center (Ubuntu):
milestone: none → ubuntu-10.10
Michael Vogt (mvo) wrote :

The problem is that the query parser can generate way too big querries, for lib its a 5000 entry long query. One possible fix is this, or we can limit it in and use the number there as a estimate for the amount of hits we probably get.

=== modified file 'softwarecenter/db/'
--- softwarecenter/db/ 2010-08-20 13:06:38 +0000
+++ softwarecenter/db/ 2010-09-09 21:16:30 +0000
@@ -198,6 +198,12 @@
         fuzzy_query = self.xapian_parser.parse_query(search_term,
+ # if the query size goes out of hand, omit the FLAG_PARTIAL
+ # (LP: #634449)
+ if fuzzy_query.get_length() > 1000:
+ fuzzy_query = self.xapian_parser.parse_query(
+ search_term, xapian.QueryParser.FLAG_BOOLEAN)
+ # now add categories
         fuzzy_query = _add_category_to_query(fuzzy_query)
         return [pkg_query,fuzzy_query]

After a little investigating, I found that this doesn't hang indefinitely, it just takes too much time, and it gives the impression of a freeze. However, the code you gave greatly improve the situation, so I patched it in my branch. Thank you, mvo!

screamingmoron (screamingmoron) wrote :

Fascinating! Sorry for the misinformation that it freezes forever.
What goes on inside Ubuntu is always fascinating.

Thanks! :D

summary: - Searching for "lib" crashes Ubuntu Software Center
+ Freezes when searching for "lib"
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 2.1.21

software-center (2.1.21) maverick; urgency=low

  [ Michael Vogt ]
  * fix rendering of the "Installing purchase..." overview transaction,
    it contains a icon and a proper status now (LP: #637394)
  * fix flickering when a item is purchased
  * fix incorrect signal emited when a transactiosn returns a error
  * fix history date ordering (LP: #635198), many thanks to
    Mohamed Amine IL Idrissi
  * fix missing progress in pendingview regression

  [ Gary Lasker ]
  * softwarecenter/view/,
    - fix visual flash when navigating back to a subcat
      applist from a details view (LP: #611108)

  [ Mohamed Amine IL Idrissi ]
  * softwarecenter/db/ limit the query size to 1000 matches
    so USC does not freeze, many thanks Michael Vogt (LP: #634449)
 -- Michael Vogt <email address hidden> Thu, 16 Sep 2010 01:37:44 +0200

Changed in software-center (Ubuntu):
status: Confirmed → Fix Released
Changed in software-center (Ubuntu):
assignee: nobody → Mohamed Amine IL Idrissi (ilidrissi.amine)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers