apt-get automatically starts and uses 100% CPU forever after each boot

Bug #665580 reported by Adriano dos Santos Fernandes
66
This bug affects 13 people
Affects Status Importance Assigned to Milestone
APT
Fix Released
Unknown
apt (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

After upgraded from Ubuntu 10.04 to 10.10, at each boot apt-get starts and remains active forever using 100% CPU.

When the update notification is shown and I try to update from it, it remains paused waiting for apt-get to stop.

It never stop. I always need to kill it.

I see similar report here: http://ubuntuforums.org/showthread.php?t=1596379

My problem didn't just "disappeared".

Edit: The Problem is occured in Ubuntu 10.10 without Upgrade too. Pleaxe fix it on Ubuntu 10.10 too.

Tags: apt-get

Related branches

Sam (samwho)
affects: ubuntu → apt (Ubuntu)
Revision history for this message
Torsten Spindler (tspindler) wrote :

Which version of apt is installed on your system? Is it updated to 0.8.3ubuntu7?

On the command line you can do a
$ dpkg -s apt | grep ^Version

Changed in apt (Ubuntu):
status: New → Incomplete
Revision history for this message
Adriano dos Santos Fernandes (adrianosf-gmail) wrote :

Yes.
Version: 0.8.3ubuntu7

Changed in apt (Ubuntu):
status: Incomplete → New
Revision history for this message
nopayne (jebcor) wrote :

I have the same problem on a Mythbuntu 10.10 machine with apt 0.8.3ubuntu7. Here's what the process tree looks like:

  |-anacron,22094 -s
  | `-sh,22162 -c nice run-parts --report /etc/cron.daily
  | `-run-parts,22164 --report /etc/cron.daily
  | `-apt,22170 /etc/cron.daily/apt
  | `-apt-get,22487 -qq -y update
  | |-bzip2,22499
  | |-cdrom,22491
  | |-gpgv,22494
  | `-http,22490

I can confirm that this problem comes back later on even if I kill apt-get (probably because the script is scheduled to run daily).

Revision history for this message
Faruk (faruk-kasumovic-gmail) wrote :

I think this is related to update manager settings,
solution is here:
http://ubuntuforums.org/showthread.php?t=1593135

I have same problem, apt-get is started daily by cron job, and it dose not stop running
until killed. So I try to run same command as cron was, excluding "-qq"
(quite no any info printed to stdout from apt-get in case -qq argument)

So I typed following:

      sudo apt-get -y update

After updating from online repositories,
it stop, and it was asking for Mavercik CD to be mounted.
It would wait for ever, and cause cron job runs it with -qq option
it probably ends in kind of infinite loop using 100% one of CPU cores.
Above posted link solve the problem.

This could be reported as bug for apt-get when using quiet option,
have no idea what could be good solution and better alert for dead lock
situations like this then high CPU usage :-).

I installed by upgrading Lucid Lynx using ubuntu-10.10-alternate-amd64.iso
Most probably there is cause for incorrect update manager settings.

Revision history for this message
Adriano dos Santos Fernandes (adrianosf-gmail) wrote :

Thanks, Faruk!

This seems to solved the problem I had.

Revision history for this message
nopayne (jebcor) wrote :

Faruk's solution worked for me too.

I upgraded via the .iso image as well so I guess there's a bug in there somewhere.

Changed in apt:
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.8.9ubuntu1

---------------
apt (0.8.9ubuntu1) natty; urgency=low

  * re-merged from the debian-sid bzr branch
  * merged lp:~mvo/apt/mvo, this brings two new commands:
    - apt-get download binary-pkgname to download a deb
    - apt-get changelog binary-pkgname to display the changelog
  * cmdline/apt-get.cc:
    - if the changelog download failed, do not show the generic error
      but point to launchpad instead

apt (0.8.9) unstable; urgency=low

  [ Christian Perrier ]
  * Fix "typos" in French manpages translations. Thanks to
    Cyril Brulebois for bashing me.
  * Drop useless untranslatable sections from apt.8

  [ Programs translations ]
  * Slovenian update by Andrej Žnidaršič and Rosetta Slovenian team
  ! German update by Holger Wansing. Closes: #603619

  [ David Kalnischkies ]
  * apt-pkg/aptconfiguration.cc:
    - evaluate Acquire::Languages= before LANG= (Closes: #602573)
  * apt-pkg/orderlist.cc:
    - try fixing before removing even if the fix is hidden in
      a provides, hidden in the #590438 testcase
  * apt-pkg/algorithms.cc:
    - if the package was explicitly marked as ToRemove don't
      consider it as a candidate for FixByInstall
  * apt-pkg/depcache.cc:
    - don't install previously not installed providers in a try
      to statisfy a "Breaks: provides" dependency by upgrade
  * cmdline/acqprogress.cc:
    - don't ask the user for media change if quiet >= 2, stdout is not
      a tty and assume-yes, force-yes or trivial-only option is set to
      avoid cpu eating endless loops in unattended runs like apt.cron
      (Closes: #602354, LP: #665580)
 -- Michael Vogt <email address hidden> Thu, 18 Nov 2010 15:02:14 +0100

Changed in apt (Ubuntu):
status: New → Fix Released
Changed in apt:
status: New → Fix Released
Revision history for this message
Benjamin (nailartcenter) wrote :

Please fix it for Ubuntu 10.10 too. It's not good to lie the bug in Ubuntu 10.10 so on.

My version is

dpkg -s apt | grep ^Version
Version: 0.8.3ubuntu7.1

description: updated
Revision history for this message
Daira Hopwood (daira) wrote :

This was a critical performance regression in 10.10, and certainly should be fixed there.

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.