Package: unattended-upgrades
Version: 2.11+nmu1
Severity: important

I have apt-listbugs hooked into apt here, and running:

    unattended-upgrade -v --dry-run

Results in an infinite loop. It's hard to tell where exactly it's
happening because I can't actually catch the beginning in my
scrollback, but it looks like this:


Are you sure you want to install/upgrade the above packages? [Y/n/?/...] 
     y     - continue the APT installation.
     n     - stop the APT installation.
   <num>   - query the specified bug number
             (uses querybts as user anarcat).
  #<num>   - same as <num>.
   b<id>   - same as <num>, but query the bug identified by <id>.
     r     - redisplay bug lists.
     c     - compose bug lists in HTML.
     w     - display bug lists in HTML
             (uses sensible-browser as user anarcat).
 d <num>.. - dodge bugs <num> by pinning affected packages
             (restart APT session to enable).
 d b<id>.. - dodge bugs identified by <id> by pinning affected packages
             (restart APT session to enable).
 p <pkg>.. - pin packages <pkg>
             (restart APT session to enable).
 p         - pin all the above packages
             (restart APT session to enable).
 i <num>   - mark bug number <num> as ignored.
 i b<id>   - mark the bug identified by <id> as ignored.
 i         - mark all the above bugs as ignored.
     u     - undo all the dodge/pin/ignore operations done so far.
     ?     - print this help.
Are you sure you want to install/upgrade the above packages? [Y/n/?/...] 
     y     - continue the APT installation.
     n     - stop the APT installation.
   <num>   - query the specified bug number
             (uses querybts as user anarcat).
  #<num>   - same as <num>.
   b<id>   - same as <num>, but query the bug identified by <id>.
     r     - redisplay bug lists.
     c     - compose bug lists in HTML.
     w     - display bug lists in HTML
             (uses sensible-browser as user anarcat).
 d <num>.. - dodge bugs <num> by pinning affected packages
             (restart APT session to enable).
 d b<id>.. - dodge bugs identified by <id> by pinning affected packages
             (restart APT session to enable).
 p <pkg>.. - pin packages <pkg>
             (restart APT session to enable).
 p         - pin all the above packages
             (restart APT session to enable).
 i <num>   - mark bug number <num> as ignored.
 i b<id>   - mark the bug identified by <id> as ignored.
 i         - mark all the above bugs as ignored.
     u     - undo all the dodge/pin/ignore operations done so far.
     ?     - print this help.
Are you sure you want to install/upgrade the above packages? [Y/n/?/...] 
     y     - continue the APT installation.
     n     - stop the APT installation.
^CInterrupted
Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 2757, in <module>
    sys.exit(main(options))
             ^^^^^^^^^^^^^
  File "/usr/bin/unattended-upgrade", line 2233, in main
    res = run(options, rootdir, mem_log, logfile_dpkg,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/unattended-upgrade", line 2599, in run
    pkg_install_success = do_install(cache,
                          ^^^^^^^^^^^^^^^^^
  File "/usr/bin/unattended-upgrade", line 1763, in do_install
    pkg_install_success = upgrade_normal(
                          ^^^^^^^^^^^^^^^
  File "/usr/bin/unattended-upgrade", line 1090, in upgrade_normal
    res, error = cache_commit(cache, logfile_dpkg, verbose)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/unattended-upgrade", line 1078, in cache_commit
    res = cache.commit(install_progress=iprogress)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 652, in commit
    res = self.install_archives(pm, install_progress)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 599, in 
install_archives
    res = install_progress.run(pm)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/apt/progress/base.py", line 231, in run
    res = self.wait_child()
          ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/apt/progress/base.py", line 295, in 
wait_child
    select.select([self.status_stream], [], [], self.select_timeout)
KeyboardInterrupt
E:Sub-process /usr/bin/apt-listbugs apt received signal 2., E:Failure running 
script /usr/bin/apt-listbugs apt

It looks like there's this weird interaction between
unattended-upgrade and listbugs that keeps feeding listbugs's stdin
with invalid input instead of just closing the pipe or something.

Interestingly, if I try to log the output, apt-listbugs fails in some
other way:

$ sudo unattended-upgrade -v --dry-run 2>&1  | tee uu.log
Starting unattended upgrades script
Allowed origins are: origin=Debian,codename=trixie,label=Debian, 
origin=Debian,codename=trixie,label=Debian-Security, 
origin=Debian,codename=trixie-security,label=Debian-Security
Initial blacklist: grub-pc
Initial whitelist (not strict): 
Option --dry-run given, *not* performing real actions
Packages that will be upgraded: 7zip android-libart android-libnativebridge 
android-libnativeloader ansible ansible-mitogen apt apt-utils aspell aspell-fr 
astrometry.net bats beets bind9-dnsutils bind9-host bind9-libs binutils 
binutils-common binutils-multiarch binutils-x86-64-linux-gnu breeze 
breeze-cursor-theme breeze-wallpaper bsdextrautils bsdutils castxml chromium 
chromium-common chromium-sandbox comerr-dev console-setup console-setup-linux 
criu db-util dexdump dh-debputy diffoscope-minimal e2fsprogs eject elm-compiler 
elpa-go-mode elpa-php-mode elpa-with-editor evolution-data-server-common fdisk 
ghostscript gir1.2-gstreamer-1.0 gir1.2-pango-1.0 gnome-user-share golang-1.22 
golang-1.22-doc golang-1.22-go golang-1.22-src golang-1.23 golang-1.23-doc 
golang-1.23-go golang-1.23-src golang-github-prometheus-common-dev gqrx-sdr 
gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-libav gstreamer1.0-plugins-base 
gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools 
gstreamer1.0-x hdf5-tools installation-report iptables iputils-ping 
kactivitymanagerd kde-style-breeze keyboard-configuration kglobalacceld 
kwayland-integration kwin-style-breeze libapt-pkg6.0t64 libarmadillo14 
libarpack2t64 libaspell15 libastrometry0t64 libbinutils libblkid-dev libblkid1 
libboost-atomic1.83-dev libboost-atomic1.83.0 libboost-chrono1.83-dev 
libboost-chrono1.83.0t64 libboost-context1.83.0 libboost-date-time1.83-dev 
libboost-date-time1.83.0 libboost-filesystem1.83-dev libboost-filesystem1.83.0 
libboost-iostreams1.83.0 libboost-locale1.83.0 libboost-log1.83.0 
libboost-program-options1.83-dev libboost-program-options1.83.0 
libboost-python1.83.0 libboost-regex1.83-dev libboost-regex1.83.0 
libboost-serialization1.83-dev libboost-serialization1.83.0 
libboost-system1.83-dev libboost-system1.83.0 libboost-test1.83-dev 
libboost-test1.83.0 libboost-thread1.83-dev libboost-thread1.83.0 
libboost1.83-dev libc-bin libc-dev-bin libc-devtools libc-l10n libc6 libc6-dbg 
libc6-dev libc6-i386 libcamel-1.2-64t64 libcom-err2 libcompel1 libctf-nobfd0 
libctf0 libdebconfclient0 libebackend-1.2-11t64 libebook-1.2-21t64 
libebook-contacts-1.2-4t64 libecal-2.0-3 libedata-book-1.2-27t64 
libedataserver-1.2-27t64 libetonyek-0.1-1 libewf2 libext2fs-dev libext2fs2t64 
libfdisk1 libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3 
libfftw3-quad3 libfftw3-single3 libflite1 libges-1.0-0 libgmp-dev libgmp10 
libgmpxx4ldbl libgpg-error0 libgprofng0 libgs-common libgs10 libgs10-common 
libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 
libhdf5-103-1t64 libhdf5-hl-100t64 libip4tc2 libip6tc2 libkdecorations2-6 
libkdecorations2private11 libkglobalacceld0 liblouis-data liblouis20 
libmount-dev libmount1 libmypaint-1.5-1 libmypaint-common libneon27t64 
libneon27t64-gnutls libpango-1.0-0 libpango1.0-dev libpango1.0-doc 
libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 libplasma6 
libplasmaactivities6 libplasmaquick6 libproj25 libpython3.12-dev 
libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 
libpython3.13-minimal libpython3.13-stdlib libqrencode4 librados2 librbd1 
libsframe1 libsidplayfp6 libsmartcols1 libsqlcipher1 libss2 
libsysprof-capture-4-dev libtag1v5 libtag1v5-vanilla libuuid1 libvmdk1 
libwireplumber-0.5-0 libxsimd-dev libxtables12 libzvbi-common libzvbi0t64 
linkchecker llm locales locales-all login logsave lzip mount ncat nmap 
nmap-common pango1.0-tools pci.ids plasma-activities-bin plasma-desktoptheme 
plzip podman podman-docker proj-bin proj-data puppet puppet-agent pv 
python-apt-common python3-apt python3-astrometry python3-asttokens 
python3-bottle python3-cmd2 python3-contourpy python3-enrich python3-fs 
python3-hypothesis python3-libvirt python3-lz4 python3-mitogen 
python3-pkg-resources python3-pycriu python3-pydantic python3-qrcode 
python3-setuptools python3-setuptools-whl python3-six python3-tornado 
python3-ufolib2 python3.12 python3.12-dev python3.12-doc python3.12-minimal 
python3.12-tk python3.12-venv python3.13 python3.13-minimal python3.13-tk 
qemu-block-extra qemu-system-arm qemu-system-common qemu-system-data 
qemu-system-gui qemu-system-modules-opengl qemu-system-modules-spice 
qemu-system-ppc qemu-system-x86 qemu-user qemu-user-binfmt qemu-user-static 
qemu-utils qrencode rfkill sq strace swaks systemsettings twine tzdata 
tzdata-legacy util-linux util-linux-extra uuid-dev uuid-runtime virt-p2v 
wireplumber yt-dlp
Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
=/usr/bin/unattended-upgrade:769: DeprecationWarning: This process (pid=90529) 
is multi-threaded, use of fork() may lead to deadlocks in the child.
  pid = os.fork()
grave bugs of chromium (131.0.6778.85-1 → 131.0.6778.108-1) <Outstanding>
 b1 - #1089181 - chromium: security update wants to remove chromium package 
itself
   Merged with: 1089182 1089189 1089216 1089224
Summary:
 chromium(1 bug)
Restart APT session to enable pinning for the following 1 package:
 chromium
**********************************************************************
****** Exiting with an error in order to stop the installation. ******
**********************************************************************
E:Sub-process /usr/bin/apt-listbugs apt returned an error code (10), E:Failure 
running script /usr/bin/apt-listbugs apt
Exception happened during upgrade.
Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 1078, in cache_commit
    res = cache.commit(install_progress=iprogress)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 656, in commit
    raise SystemError("installArchives() failed")
SystemError: installArchives() failed
Installing the upgrades failed!
error message: installArchives() failed
dpkg returned a error! See 
/var/log/unattended-upgrades/unattended-upgrades-dpkg.log for details
Packages that were successfully auto-removed: 
Packages that are kept back: 
The list of kept packages can't be calculated in dry-run mode.

/var/log/unattended-upgrades/unattended-upgrades-dpkg.log doesn't log
anything.

removing --dry-run seems to fix that problem.

a.

-- System Information:
Debian Release: trixie/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.11.10-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.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 unattended-upgrades depends on:
ii  debconf [debconf-2.0]      1.5.87
ii  lsb-base                   11.6
ii  lsb-release                12.1-1
ii  python3                    3.12.6-1
ii  python3-apt                2.9.0+b2
ii  python3-dbus               1.3.2-5+b4
ii  python3-distro-info        1.12
ii  sysvinit-utils [lsb-base]  3.11-1
ii  ucf                        3.0043+nmu1
ii  xz-utils                   5.6.3-1+b1

Versions of packages unattended-upgrades recommends:
ii  cron [cron-daemon]  3.0pl1-189
ii  systemd-sysv        257~rc3-1

Versions of packages unattended-upgrades suggests:
ii  bsd-mailx                       8.1.2-0.20220412cvs-1
ii  needrestart                     3.7-3.3
ii  postfix [mail-transport-agent]  3.9.0-4
ii  powermgmt-base                  1.37+nmu1
ii  python3-gi                      3.50.0-3+b1

-- debconf information:
* unattended-upgrades/enable_auto_updates: false

Reply via email to