hangs when remote search provider performs expensive operation

Bug #1756826 reported by Iain Lane
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-calculator (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
Bionic
Fix Released
High
Marco Trevisan (Treviño)
gnome-shell (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
Bionic
Fix Released
High
Marco Trevisan (Treviño)
gnome-software (Ubuntu)
Fix Released
Medium
Robert Ancell
Bionic
Fix Released
Medium
Marco Trevisan (Treviño)
nautilus (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
Bionic
Fix Released
High
Marco Trevisan (Treviño)

Bug Description

[ Impact ]

Doing a search in the shell might lead to unresponsive processes that are not terminated when the search is cancelled or when the gnome-shell overlay is closed.

[ Test case for GNOME-Shell and Nautilus ]

1. Run ubuntu session with gnome-shell, and open a system monitor (htop, top, gnome one)
2. Open gnome shell overlay (hit super, or got to activity)
3. Search for a short string (3 chars let's say) that matches many files you know you have
4. Close the overlay (press super again, hit escape twice)
5. The nautilus process should stop using CPU once the overlay is closed

[ Test case for GNOME-Shell and GNOME-Calculator ]

1. Run ubuntu session with gnome-shell, and open a system monitor (htop, top, gnome one)
2. Open gnome shell overlay (hit super, or got to activity)
3. Type "10!!!"
4. Close the overlay (press super again, hit escape twice)
5. The gnome-calculator process should stop using CPU once the overlay is closed

[ Regression Potential ]

Nautilus search results returned are missing elements when continuously update the search string, gnome-calculator computations via the shell might not work as expected.

----

I have a maildir for my mail. My computer's name is "nightingale", and this name is in the filenames in the maildir. I have a lot of email!

When I search for "tilix" to start a terminal after logging in, Nautilus goes crazy consuming CPU. This is because I have to type "ti" to type "tilix" and "ti" is a substring of "nightingale". This is submitted as a search string to the nautilus search provider and apparently isn't cancelled when I close the entry - I checked the GError and it's NULL.

A similar thing happens with the ctrl-f search in nautilus itself.

We talked about this on IRC and I provided some traces and stuff. Linking to the log to avoid having to fetch those out into files. :-)

  https://irclogs.ubuntu.com/2018/03/14/%23ubuntu-desktop.html#t15:58

Related branches

Iain Lane (laney)
Changed in nautilus (Ubuntu Bionic):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in gnome-shell (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in gnome-shell (Ubuntu Bionic):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
importance: Undecided → High
status: New → Triaged
Changed in nautilus (Ubuntu):
status: Triaged → In Progress
summary: - hangs when locate search provider matches a lot of files
+ hangs when remote search provider performs expensive operation
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.26.4-0ubuntu3

---------------
nautilus (1:3.26.4-0ubuntu3) cosmic; urgency=medium

  * d/p/ubuntu/shell-search-provider-implement-XUbuntuCancel-to-request-.patch:
    shell-search-provider: implement XUbuntuCancel to request pending
    search cancellation from gnome-shell (LP: #1756826)

 -- Marco Trevisan (Treviño) <email address hidden> Thu, 30 Aug 2018 18:15:24 -0500

Changed in nautilus (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.3 KiB)

This bug was fixed in the package gnome-shell - 3.29.92-1ubuntu1

---------------
gnome-shell (3.29.92-1ubuntu1) cosmic; urgency=medium

  * Merge with debian, remaining changes:
    + Replace gnome-backgrounds dep with ubuntu-wallpapers and Suggests
      gnome-themes-standard-data, gnome-backgrounds
    + Add some Recommends:
      - ubuntu-session (| gnome-session) to have the ubuntu session available
      - xserver-xorg-legacy
      - yaru-theme-gnome-shell for the default ubuntu theming
    + Update debian/gbp.conf with Ubuntu settings
    + gnome-shell-common.install: Install Ubuntu mode
    + gnome-shell-common.prerm: Remove deprecated ubuntu theme alternative
    + ubuntu/desktop_detect.patch:
      - add caching for desktop detection to avoid querying the current
        desktop env variable as iterate through the list each time. For the
        time of the Shell process, we can expect this env variable to stay
        stable.
    + ubuntu/smarter_alt_tab.patch:
      - quick alt-tab (without showing up the switcher) switch only between
        the last window of the last 2 applications to be focused instead of
        raising all windows of those apps.
    + ubuntu/lightdm-user-switching.patch:
      - Allow user switching when using LightDM.
    + ubuntu/lock_on_suspend.patch
      - Respect Ubuntu's lock-on-suspend setting.
    + ubuntu/gdm.patch
      - as gdm is system-wide and not session-wide, ensure gdm has an ubuntu
        styling by default, not impacting the gnome user session though.
    + ubuntu/background_login.patch
      - Change default background color as we modified the default GDM color
        for our ubuntu session. Change it as well here, still applying the
        background noise loading.
    + ubuntu/gdm_alternatives.patch
      - Add support for GDM3 theme alternatives
    + ubuntu/block_mode_extension_update.patch
      - Don't allow ubuntu mode extension to update
    + optional-hot-corner.patch
      - enable patch proposed by upstream developer already in package (but
        not in series) to add a settings for optional hot corner activation.
    + volume-Add-back-sound-feedback-on-scroll.patch
      - Fix regression causing missing feedback on volume slider scroll
    + st-texture-cache-Cancel-sliced-image-loading-on-target-ac.patch
      - Fix possible crash on cache loading
    + js-ui-Choose-some-actors-to-cache-on-the-GPU.patch
      - Improve rendering of shell elements moving rendering to GPU
    + main-show-an-error-message-on-gnome-shell-crash.patch,
      global-make-possible-to-set-debug-flags-dynamically.patch,
      main-increase-the-granularity-of-backtraces-in-SHELL_DEBU.patch,
      main-add-backtrace-crashes-all-and-backtrace-all.patch,
      sessionMode-add-support-for-debugFlags-parameter.patch:
      - Improve debug JS tracing for crash reports
    + st-scroll-view-Handle-the-case-where-scrollbars-are-NULL.patch,
      st-scroll-view-Remove-scrollbars-references-on-dispose.patch:
      - Fix crash on theme changes
    + js-main-Throw-error-if-no-valid-default-stylesheet-is-fou.patch:
      - Show errors if no stylesheet is found
    + debian/rules:
      - Run dh_translations and ...

Read more...

Changed in gnome-shell (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Fixed in gnome-calculator 1:3.29.91-1ubuntu2

Changed in gnome-calculator (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
importance: Undecided → Medium
status: New → Fix Released
Changed in gnome-calculator (Ubuntu Bionic):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in gnome-shell (Ubuntu Bionic):
status: Triaged → In Progress
Changed in nautilus (Ubuntu Bionic):
status: Triaged → In Progress
description: updated
Changed in gnome-software (Ubuntu):
assignee: nobody → Andrea Azzarone (azzar1)
Changed in gnome-software (Ubuntu Bionic):
assignee: nobody → Andrea Azzarone (azzar1)
Changed in gnome-software (Ubuntu):
status: New → In Progress
Changed in gnome-software (Ubuntu Bionic):
status: New → Triaged
Changed in gnome-software (Ubuntu):
importance: Undecided → Medium
Changed in gnome-software (Ubuntu Bionic):
importance: Undecided → Medium
Revision history for this message
Andrea Azzarone (azzar1) wrote :

@robert-ancell the required work to fix this in gnome-software has been merged here (https://gitlab.gnome.org/Community/Ubuntu/gnome-software/merge_requests/6) but they have not been updated in cosmic. Do you mind taking a look? Thanks :)

Changed in gnome-software (Ubuntu):
assignee: Andrea Azzarone (azzar1) → Robert Ancell (robert-ancell)
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 3.30.2-0ubuntu3

---------------
gnome-software (3.30.2-0ubuntu3) cosmic; urgency=medium

  * debian/patches/0024-shell-search-provider-implement-XUbuntuCancel.patch
    - implement XUbuntuCancel to request pending search cancellation from
      gnome-shell (LP: #1756826)

 -- Robert Ancell <email address hidden> Thu, 11 Oct 2018 12:25:34 +1300

Changed in gnome-software (Ubuntu):
status: Fix Committed → Fix Released
Changed in gnome-software (Ubuntu Bionic):
status: Triaged → In Progress
assignee: Andrea Azzarone (azzar1) → Marco Trevisan (Treviño) (3v1n0)
Changed in gnome-calculator (Ubuntu):
importance: Medium → High
Changed in gnome-calculator (Ubuntu Bionic):
importance: Medium → High
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

So, I've verified this for:

LANG=C apt-cache policy gnome-shell
gnome-shell:
  Installed: 3.28.4-0ubuntu18.04.3

LANG=C apt-cache policy gnome-software
gnome-software:
  Installed: 3.28.1-0ubuntu4.18.04.14

LANG=C apt-cache policy nautilus
nautilus:
  Installed: 1:3.26.4-0~ubuntu18.04.5

HOWEVER...

There's a regression in gnome-calculator 1:3.28.2-1~ubuntu18.04.2, but we've already uploaded a 1:3.28.2-1~ubuntu18.04.3 version in queue that fixes the issue.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

I want to mention to the release team, that the regression in gnome-calculator DOES NOT affect the other packages, so them can be considered verified and be sent to updates safely (not to block waiting for them), while only gnome-calculator needs an update.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Iain, or anyone else affected,

Accepted gnome-calculator into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-calculator/1:3.28.2-1~ubuntu18.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gnome-calculator (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Confirmed working also with new calculator

apt-cache policy gnome-calculator
gnome-calculator:
  Installato: 1:3.28.2-1~ubuntu18.04.3
  Candidato: 1:3.28.2-1~ubuntu18.04.3

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.26.4-0~ubuntu18.04.5

---------------
nautilus (1:3.26.4-0~ubuntu18.04.5) bionic; urgency=medium

  * d/p/ubuntu/shell-search-provider-implement-XUbuntuCancel-to-request-.patch:
    - shell-search-provider: implement XUbuntuCancel to request pending search
      cancellation from gnome-shell (LP: #1756826)

 -- Marco Trevisan (Treviño) <email address hidden> Fri, 25 Oct 2019 05:38:04 +0200

Changed in nautilus (Ubuntu Bionic):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 3.28.1-0ubuntu4.18.04.14

---------------
gnome-software (3.28.1-0ubuntu4.18.04.14) bionic; urgency=medium

  * debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch
    - implement XUbuntuCancel to request pending search cancellation from
      gnome-shell (LP: #1756826)

 -- Marco Trevisan (Treviño) <email address hidden> Thu, 21 Nov 2019 14:06:35 +0100

Changed in gnome-software (Ubuntu Bionic):
status: In Progress → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gnome-shell has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-shell - 3.28.4-0ubuntu18.04.3

---------------
gnome-shell (3.28.4-0ubuntu18.04.3) bionic; urgency=medium

  * d/p/ubuntu/search-call-XUbuntuCancel-method-on-providers-when-no-dat.patch:
    - Add support for cancelling remote search providers when the overlay
      is closed (and actually stop searches when requested from UI, LP: #1756826)
  * debian/rules: Honour nocheck parameter

 -- Marco Trevisan (Treviño) <email address hidden> Fri, 25 Oct 2019 05:23:08 +0200

Changed in gnome-shell (Ubuntu Bionic):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-calculator - 1:3.28.2-1~ubuntu18.04.3

---------------
gnome-calculator (1:3.28.2-1~ubuntu18.04.3) bionic; urgency=medium

  * d/p/search-provider-stop-normalizing-the-equation-twice.patch:
    - Don't normalize multiple times an equation, fixing issues with decimal
      numbers computations (fixes a regression introduced with previous
      patch set in order to fix LP: #1756826)
  * d/p/Use-GLib.List.deep_copy-to-fix-type-argument-mismatch.patch:
    - Fix a build issue when compiling with vala 0.40.17 (LP: #1857005)

gnome-calculator (1:3.28.2-1~ubuntu18.04.2) bionic; urgency=medium

  * d/p/search-provider-Use-async-calls-cancel-search-on-inactivi.patch,
    d/p/search-provider-renew-inactivity-timeout-at-each-calculat.patch,
    d/p/search-provider-Use-lower-inactivity-timeout.patch,
    d/p/search-provider-simplify-solve_subprocess.patch,
    d/p/search-provider-cache-equations-avoiding-spawning-calcula.patch,
    d/p/search-provider-cancel-the-current-process-on-new-calcula.patch,
    d/p/search-provider-cache-only-a-limited-number-of-equations.patch,
    d/p/search-provider-Handle-errors-gracefully.patch,
    d/p/ubuntu/search-provider-Cancel-operations-on-XUbuntuCancel.patch:
    - Make search provider async and support XUbuntuCancel method to
      stop expensive operations that might lead to an unresponsive
      process (LP: #1756826)

 -- Marco Trevisan (Treviño) <email address hidden> Thu, 19 Dec 2019 13:05:27 +0100

Changed in gnome-calculator (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.