Update-notifier triggers an aptdaemon launch on start up

Bug #587004 reported by Jérôme
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
aptdaemon (Ubuntu)
Invalid
Low
Unassigned
Declined for Lucid by Sebastien Bacher
Maverick
Invalid
Low
Unassigned
update-notifier (Ubuntu)
Fix Released
Low
Unassigned
Declined for Lucid by Sebastien Bacher
Maverick
Fix Released
Low
Unassigned

Bug Description

Binary package hint: aptdaemon

Just after logging in. I need to launch my applications.

However aptd is running at the same time and it is consuming a lot of memory.

This can lead my system to swap memory to my disk and thus it slows down the whole system.

This gives the end user the feeling that the system has a slow startup. The startup is slower with Xubuntu/LXDE/openbox than with Microsoft Windows Millenium which was shipped with my laptop.

I don't know the underlying but I think there are 3 issues which makes each other have more consequences :
- does atpd consume too much memory (isn't it a memory leak, poor optimization, ... ) ?
- does atpd needs to be launched just after logging in ?
- more memory consumption means more data to be read from the disk while loading the program (thus increasing the cache memory consumption and increasing the startup time)

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: aptdaemon 0.11+bzr345-0ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
Architecture: i386
Date: Fri May 28 21:13:37 2010
InstallationMedia: Xubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100427.1)
PackageArchitecture: all
ProcEnviron:
 LANG=fr_FR.utf8
 SHELL=/bin/bash
SourcePackage: aptdaemon

Revision history for this message
Jérôme (jerome-bouat) wrote :
Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Aptdaemon should only be started on request by software-center and not by default on startup.

What does a lot of memory mean? Perhaps you should use Synaptic instead of software-center on your 10 years (?) old machine.

Are you familiar with the terminal? Could you switch to a terminal before the graphical login and check if aptd is already running?

Changed in aptdaemon (Ubuntu):
status: New → Incomplete
Revision history for this message
Jérôme (jerome-bouat) wrote :

Note that I'm not using any apt related program when aptd is running after logging in.

> Perhaps you should use Synaptic instead of software-center on your 10 years (?) old machine.

I can't find a 13" laptop with 4/3 form factor screen anymore. This form factor is the best for my real world work. Moreover, I will buy my next laptop when there will be a linux distro shipped with it instead of a MacOS, M. Windows. Finally, why a new version of a software could make change a reliable hardware which is working like a timepiece.

I dumped the list of processes just after startup before and after logging in with gdm.

Revision history for this message
Jérôme (jerome-bouat) wrote :

aptd seems to be launched when logged in into a desktop environment.

Revision history for this message
Jérôme (jerome-bouat) wrote :

The differences between the 2 cases (before and after gdm login) shows that aptd is launched after logging in into the desktop environment.

Changed in aptdaemon (Ubuntu):
status: Incomplete → New
Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Could you please append the entries of AptDaemon from syslog /var/log/syslog? Would be interesting why aptdaemon was called.

Changed in aptdaemon (Ubuntu):
status: New → Incomplete
Revision history for this message
Jérôme (jerome-bouat) wrote :

I attached the snapshot of /var/log/syslog since the last system startup.

Changed in aptdaemon (Ubuntu):
status: Incomplete → New
summary: - aptd triggers memory swap just after the startup
+ Aptdaemon gets started by an unknown application at login
Revision history for this message
Sebastian Heinlein (glatzor) wrote : Re: Aptdaemon gets started by an unknown application at login

This is caused by update-notifier. It checks for active transaction in src/reboot.c.
It should check if the name org.debian.apt is used on the bus before, since no running aptdaemon - no active transactions.

summary: - Aptdaemon gets started by an unknown application at login
+ Update-notifier triggers a aptdaemon launch on start up
summary: - Update-notifier triggers a aptdaemon launch on start up
+ Update-notifier triggers an aptdaemon launch on start up
Changed in aptdaemon (Ubuntu):
status: New → Confirmed
Changed in update-notifier (Ubuntu):
status: New → Confirmed
Changed in update-notifier (Ubuntu):
importance: Undecided → Low
Changed in aptdaemon (Ubuntu):
importance: Undecided → Low
status: Confirmed → Invalid
Revision history for this message
Michael Vogt (mvo) wrote :

Is:
"""
bus=dbus.SystemBus()
obj=bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus')
interface=dbus.Interface(obj, 'org.freedesktop.DBus')
aptd_running = "org.debian.org" in interface.ListNames()
"""
the best way for testing this ? Inflated 10 times of course because it has
to be done in C ? Or is there a low-level dbus method that is better suited?

Revision history for this message
Sebastian Heinlein (glatzor) wrote : Re: [Bug 587004] Re: Update-notifier triggers an aptdaemon launch on start up

bus = dbus.SystemBus()
try:
    bus.get_name_owner("org.debian.apt")
except DBusException:
    pass

Michael Vogt (mvo)
Changed in update-notifier (Ubuntu Maverick):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 0.105ubuntu1

---------------
update-notifier (0.105ubuntu1) maverick; urgency=low

  * src/reboot.c:
    - avoid triggering a aptdaemon launch when checking for
      pending transactions (LP: #587004)
 -- Michael Vogt <email address hidden> Fri, 03 Sep 2010 10:00:54 +0200

Changed in update-notifier (Ubuntu Maverick):
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.