[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

Debian Bug report logs - #1078166
apt-daily.service is sometimes executed during package installation

version graph

Package: apt; Maintainer for apt is APT Development Team <deity@lists.debian.org>; Source for apt is src:apt (PTS, buildd, popcon).

Reported by: Vincent Lefevre <vincent@vinc17.net>

Date: Wed, 7 Aug 2024 14:36:01 UTC

Severity: normal

Found in version apt/2.9.7

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#1078166; Package apt. (Wed, 07 Aug 2024 14:36:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
New Bug report received and forwarded. Copy sent to APT Development Team <deity@lists.debian.org>. (Wed, 07 Aug 2024 14:36:03 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vincent Lefevre <vincent@vinc17.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: apt-daily.service is sometimes executed during package installation
Date: Wed, 7 Aug 2024 16:33:40 +0200
Package: apt
Version: 2.9.7
Severity: normal

The installation/upgrade of some packages reloads the systemd daemons,
which occasionally has the effect to execute the apt-daily service,
which runs "/usr/lib/apt/apt.systemd.daily update".

This is silly, because precisely at this time, either there already
is a /var/lib/dpkg/lock-frontend lock (due to the installation) and
the command fails, or if the frontend, like aptitude, releases the
lock temporarily, this may make installation by the frontend fail.
In any case, this is not satisfactory.

If the "apt.systemd.daily update" must be run at this time (reload
of systemd daemons), there is a major problem. Otherwise, it should
be run at a later time, so that there is a high probability that
the installation has finished, avoiding a lock failure. Or why not
completely relying on a randomized timer?

-- Package-specific info:

-- (no /etc/apt/preferences present) --


-- (no /etc/apt/preferences.d/* present) --


-- (/etc/apt/sources.list present, but not submitted) --


-- (no /etc/apt/sources.list.d/* present) --


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.10.3-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages apt depends on:
ii  adduser                 3.137
ii  base-passwd             3.6.4
ii  debian-archive-keyring  2023.4
ii  gpgv                    2.2.43-8
ii  libapt-pkg6.0t64        2.9.7
ii  libc6                   2.39-6
ii  libgcc-s1               14.2.0-1
ii  libgnutls30t64          3.8.6-2
ii  libseccomp2             2.5.5-1+b1
ii  libstdc++6              14.2.0-1
ii  libsystemd0             256.4-2

Versions of packages apt recommends:
ii  ca-certificates  20240203

Versions of packages apt suggests:
ii  apt-doc         2.9.7
ii  aptitude        0.8.13-6
ii  dpkg-dev        1.22.11
ii  gnupg           2.2.43-8
pn  powermgmt-base  <none>

-- Configuration Files:
/etc/logrotate.d/apt changed [not included]

-- no debconf information

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#1078166; Package apt. (Wed, 07 Aug 2024 14:45:03 GMT) (full text, mbox, link).


Acknowledgement sent to Julian Andres Klode <jak@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Wed, 07 Aug 2024 14:45:04 GMT) (full text, mbox, link).


Message #10 received at 1078166@bugs.debian.org (full text, mbox, reply):

From: Julian Andres Klode <jak@debian.org>
To: Vincent Lefevre <vincent@vinc17.net>, 1078166@bugs.debian.org
Cc: systemd@packages.debian.org
Subject: Re: Bug#1078166: apt-daily.service is sometimes executed during package installation
Date: Wed, 7 Aug 2024 16:42:56 +0200
On Wed, Aug 07, 2024 at 04:33:40PM GMT, Vincent Lefevre wrote:
> Package: apt
> Version: 2.9.7
> Severity: normal
> 
> The installation/upgrade of some packages reloads the systemd daemons,
> which occasionally has the effect to execute the apt-daily service,
> which runs "/usr/lib/apt/apt.systemd.daily update".
> 
> This is silly, because precisely at this time, either there already
> is a /var/lib/dpkg/lock-frontend lock (due to the installation) and
> the command fails, or if the frontend, like aptitude, releases the
> lock temporarily, this may make installation by the frontend fail.
> In any case, this is not satisfactory.
> 
> If the "apt.systemd.daily update" must be run at this time (reload
> of systemd daemons), there is a major problem. Otherwise, it should
> be run at a later time, so that there is a high probability that
> the installation has finished, avoiding a lock failure. Or why not
> completely relying on a randomized timer?


As I mentioned in the other thread, we do not do anything with the
systemd services. We do restart the timers, which I guess could mess
up the randomization or something?

But I don't know, I'd need more info from systemd people.
-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en



Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#1078166; Package apt. (Wed, 07 Aug 2024 15:09:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Wed, 07 Aug 2024 15:09:03 GMT) (full text, mbox, link).


Message #15 received at 1078166@bugs.debian.org (full text, mbox, reply):

From: Vincent Lefevre <vincent@vinc17.net>
To: Julian Andres Klode <jak@debian.org>, 1078166@bugs.debian.org, systemd@packages.debian.org
Subject: Re: Bug#1078166: apt-daily.service is sometimes executed during package installation
Date: Wed, 7 Aug 2024 17:06:23 +0200
On 2024-08-07 16:42:56 +0200, Julian Andres Klode wrote:
> As I mentioned in the other thread, we do not do anything with the
> systemd services. We do restart the timers, which I guess could mess
> up the randomization or something?
> 
> But I don't know, I'd need more info from systemd people.

Additional details: I can see in the apt-daily.timer file

[Timer]
 6,18:00
RandomizedDelaySec=12h
Persistent=true

and it seems that

  systemctl --system daemon-reload >/dev/null || true

sometimes has the effect to execute the service immediately, thus
ignoring the randomization.

If randomization is currently ignored for some reason, there should
at least be an option to preserve the randomization at the reload
of the daemons. The observed behavior of systemd does not seem to
be documented in the systemd.timer(5) man page.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Dec 5 03:45:51 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.