update-manager hangs for 10 seconds

Bug #33097 reported by Chris Moore
24
Affects Status Importance Assigned to Milestone
synaptic (Ubuntu)
Invalid
Medium
Michael Vogt

Bug Description

once I've applied all the outstanding patches, and the update manager is telling me my system is up to date, if I click 'reload' at the bottom, the following happens:

1. after a pause of about a second, a small window called "downloading package information" appears. it very quickly verifies that there's nothing new to download, and disappears again after about a second.

2. the "software updates" window (where I clicked 'reload') is all greyed out. none of the buttons are operational, and nothing appears to be happening. there's no modal sub-window, no progress bar, no CPU in use, no disk activity, nothing. this lasts for 8 to 10 seconds - long enough to have me reaching for the web browser to report that it's hung

3. after 8 to 10 seconds a new small window appears, called "checking for available updates". the progress bar zips from left to right 4 times, "building dependancy tree", then the small window goes away leaving me with the "software updates" window. the "help", "reload" and "close" buttons are now available again.

The bug is that step 2 hangs for 8 to 10 seconds, apparently doing nothing, with no "please wait" message, or anything to suggest that it hasn't crashed. It doesn't look good for an important application like the update manager to be hanging like this.

Revision history for this message
Chris Moore (dooglus) wrote : screenshot

This is what I see for the 8 to 10 seconds that the application is hanging.

Revision history for this message
Chris Moore (dooglus) wrote :

I should have mentioned. This happens with at least versions 0.42.2ubuntu6 and 0.42.2ubuntu5 of update-manager, and the machine I'm using is a 2.2GHz Intel P4 laptop with a 6Mb net connection.

Revision history for this message
Chris Moore (dooglus) wrote :

For completeness, here's how long apt-get commands take to run from the command line:

$ time sudo apt-get update; time sudo apt-get upgrade; time sudo apt-get dist-upgrade

[...]
Hit http://archive.ubuntu.com dapper/multiverse Sources
Fetched 1B in 0s (2B/s)
Reading package lists... Done

real 0m0.719s
user 0m0.063s
sys 0m0.033s
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

real 0m0.766s
user 0m0.558s
sys 0m0.085s
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade...Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

real 0m0.652s
user 0m0.517s
sys 0m0.094s

ie. each is less than a second.

Revision history for this message
Chris Moore (dooglus) wrote :

I've looked in to this a bit more and found that this command is the one which is hanging:

  sudo /usr/sbin/synaptic --hide-main-window --non-interactive --parent-window-id 29360131 --update-at-startup

And contrary to my previous claim, the CPU is flat out (100%) for the whole time it's hanging.

Revision history for this message
Chris Moore (dooglus) wrote :

chris@chrislap:~$ time sudo /usr/sbin/synaptic --hide-main-window --non-interactive --parent-window-id 29360131 --update-at-startup

real 0m11.276s
user 0m8.391s
sys 0m0.280s

Revision history for this message
Chris Moore (dooglus) wrote : this makes it a lot faster...

... but is it safe?

I found that when synaptic is run to update the package list, it updates the package list very quickly and then spends a lot of time sorting a big list of package names into alphabetical order 13 times. Yes, the same list is sorted 13 times. It seems like the results of the sort aren't even used, so my patch simply returns immediately after updating the package list if the '--hide-main-window' flag is specified to synaptic.

Is that safe?

Revision history for this message
Chris Moore (dooglus) wrote : stack traces for the 13 sorts

I see the same list of 18603 packages being sorted 13 times.

Here are the 13 backtraces, one per sort, caused when I run:

  sudo ./synaptic --hide-main-window --non-interactive --parent-window-id 29360131 --update-at-startup

with these 2 lines in my sources.list:

  deb http://archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
  deb-src http://archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Thanks for your detailed bug report.

I hope that you haven't been discouraged by the huge lack of response. Time is very rare at the moment, but your bug report will be considered.

Regards,

Sebastian

Changed in update-manager:
assignee: nobody → mvo
Changed in update-manager:
status: Unconfirmed → Confirmed
Revision history for this message
Adam Niedling (krychek) wrote :

That "hang" is about 2-3 seconds for me in Intrepid. The mouse pointer also suggests that it didn't freeze. I don't think this is a bug. Is this still an issue for you? If so which version of Ubuntu are you using now?

Changed in synaptic:
status: Confirmed → Invalid
Revision history for this message
Chris Moore (dooglus) wrote : Re: [Bug 33097] Re: update-manager hangs for 10 seconds

On Thu, Nov 27, 2008 at 7:25 PM, Adam Niedling <email address hidden> wrote:
> Is
> this still an issue for you? If so which version of Ubuntu are you using
> now?

It's no longer an issue for me. I got tired of the lack of response
to pretty much every bug I raised and switched to debian.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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