Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1036033: upgrade-reports: bullseye -> bookworm kernel package upgrade fails when ddcci-dkms package installed

53 views
Skip to first unread message

Tim Small

unread,
May 13, 2023, 12:12:01 PM5/13/23
to
Package: upgrade-reports
Severity: normal
X-Debbugs-Cc: t...@seoss.co.uk

(Please provide enough information to help the Debian
maintainers evaluate the report efficiently - e.g., by filling
in the sections below.)

My previous release is: bullseye
I am upgrading to: bookworm
Upgrade date: 2023-05-06
Method: apt dist-upgrade

Contents of /etc/apt/sources.list:


deb http://deb.debian.org/debian/ bookworm main non-free non-free-firmware contrib
deb-src http://deb.debian.org/debian/ bookworm main non-free non-free-firmware contrib

# Security updates
deb http://security.debian.org bookworm-security main contrib non-free non-free-firmware
deb-src http://security.debian.org bookworm-security main contrib non-free non-free-firmware

# bookworm-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware


deb http://deb.debian.org/debian-debug/ bookworm-debug main
# for security updates
deb http://deb.debian.org/debian-debug/ bookworm-proposed-updates-debug main

- Was the system pre-update a 'pure' system only containing packages
from the previous release? If not, which packages were not from that
release?

yes

- Did any packages fail to upgrade?

linux-image-6.1.0-7-amd64

With the ddcci-dkms installed, and enabled for building before the
upgrade, the following occurred during upgrade:

/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-7-amd64.
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/ddcci/0.3.3/source/dkms.conf does not exist.
dkms: autoinstall for kernel: 6.1.0-7-amd64 failed!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-6.1.0-7-amd64 (--configure):
installed linux-image-6.1.0-7-amd64 package post-installation script subprocess returned error exit status 1
Setting up linux-headers-6.1.0-7-amd64 (6.1.20-2) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-7-amd64.
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/ddcci/0.3.3/source/dkms.conf does not exist.
dkms: autoinstall for kernel: 6.1.0-7-amd64 failed!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-6.1.0-7-amd64.postinst line 11.
dpkg: error processing package linux-headers-6.1.0-7-amd64 (--configure):
installed linux-headers-6.1.0-7-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-headers-amd64:
linux-headers-amd64 depends on linux-headers-6.1.0-7-amd64 (= 6.1.20-2); however:
Package linux-headers-6.1.0-7-amd64 is not configured yet.

dpkg: error processing package linux-headers-amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-6.1.0-7-amd64 (= 6.1.20-2); however:
Package linux-image-6.1.0-7-amd64 is not configured yet.

dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-6.1.0-7-amd64
linux-headers-6.1.0-7-amd64
linux-headers-amd64
linux-image-amd64


- Were there any problems with the system after upgrading?


Further Comments/Problems:


Please attach the output of "COLUMNS=200 dpkg -l" (or "env COLUMNS ...",
depending on your shell) from before and after the upgrade so that we
know what packages were installed on your system.

Andreas Beckmann

unread,
May 14, 2023, 4:50:16 PM5/14/23
to
On 14/05/2023 19.43, Paul Gevers wrote:
>> /etc/kernel/postinst.d/dkms:
>> dkms: running auto installation service for kernel 6.1.0-7-amd64.
>> Error! Could not locate dkms.conf file.
>> File: /var/lib/dkms/ddcci/0.3.3/source/dkms.conf does not exist.
>> dkms: autoinstall for kernel: 6.1.0-7-amd64 failed!

How has ddcci-dkms been installed?
How did the dkms.conf go missing?
Please show the current layout of the source tree:
ls -laR /usr/src/ddcci-*
Why hasn't ddcci been upgraded to the bookworm version (0.4.2)?

Andreas

PS: I don't see any errors during piuparts upgrade tests of ddcci-dkms +
linux-headers-amd64

PPS: Of course the bullseye version (0.3.3) will fail to build for a 6.1
kernel (if it gets that far), but that's nothing unexpected

PPPS: if you install the bookworm version of ddcci-dkms, it should a)
restore the missing file and b) be compatible with current kernels

Tim Small

unread,
Jun 6, 2023, 6:50:04 AM6/6/23
to
Hi Stephen,

Sorry for the delay - busy with family, work and other matters... I've
restored a backup to a VM, and re-run the upgrade there, taking care to
follow exactly the upgrade instructions at:

https://www.debian.org/releases/testing/amd64/release-notes.en.pdf

...this lead to a recurrence of the failure.

It looks like the problem is that the call to:

dkms remove -m ddcci -v 0.3.3

...which is made by /var/lib/dpkg/info/ddcci-dkms.prerm isn't working.

On the restored backup, running this command manually doesn't uninstall
the module, it also doesn't print any output - it just exits with return
code 0.

When the same ddcci-dkms 0.3.3-1 package is installed and built on a
brand new Debian 11 VM, the prerm script works as expected and
uninstalls correctly (and verbosely). This sounds like the same
(correct) behaviour which you saw in your testing.

I'll try and look into what's causing the dkms script to silently no-op
on the failing VM in the next day or so, and let you know what I find.

Cheers,

Tim.

Tim Small

unread,
Jun 11, 2023, 4:10:04 AM6/11/23
to
This took a while to track down - sorry for the delay.

The machine which was being upgraded had a non-functional shim in place
instead of rpm. This had been done to satisfy a hardware-vendor
provided firmware upgrade, which would not work unless an rpm executable
was found on the system (despite the fact that the firmware upgrade did
not use rpm).

dkms preferentially uses rpm (even on Debian) to try and determine the
architecture of the running system (instead of other methods such as
`uname -m` or `dpkg --print-architecture`).

dkms uses the architecture which it has determined to store compiled
modules at /var/lib/dkms/$module/$version/$kernelver/$arch/modules/

This use of a non-functional rpm resulted in dkms setting its internal
architecture to the empty string. This made dkms work correctly whilst
installing modules (storing the resulting modules without the $arch path
componenent) e.g. to
/var/lib/dkms/ddcci/0.3.3/5.10.0-14-amd64/module/ddcci.ko and also
detect the presence of already installed modules, but also resulted in
it silently failing when asked to remove modules.

If this is considered a bug, then it would seem reasonable for dkms to
treat it's internal architecture variable being set to the empty string
to be an error condition, and to exit and/or to fall back to using other
methods of determining the architecture (which it does on Debian systems
which don't have an rpm binary installed).

Andreas Beckmann

unread,
Jun 11, 2023, 7:40:05 AM6/11/23
to
Control: reassign -1 dkms
Control: severity -1 important

Hi Tim,

thanks for tracking this down and the detailed description.
I already have a fix to not use rpm at all on Debian based systems
(mainly because it creates an empty unused rpm database), but that was a
bit too late for being included in bookworm (right now available in
experimental).
I'll try to reproduce your issue and make dkms fail with a meaningful
error message on empty $arch.

Andreas

Andreas Beckmann

unread,
Jun 11, 2023, 1:10:04 PM6/11/23
to
Control: tag -1 - moreinfo + upstream
Control: retitle -1 dkms: throws up after digesting an empty "$arch"
Control: forwarded -1 https://github.com/dell/dkms/pull/334

to reproduce in a sid chroot:

# ln -s /bin/true /usr/bin/rpm
# apt-get install dkms linux-headers-amd64
...
# apt-get install dkms-test-dkms
...

# apt-get install --reinstall dkms-test-dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded.
Need to get 0 B/9484 B of archives.
After this operation, 0 B of additional disk space will be used.
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78, <> line 1.)
debconf: falling back to frontend: Readline
(Reading database ... 31482 files and directories currently installed.)
Preparing to unpack .../dkms-test-dkms_3.0.11-1_all.deb ...
Unpacking dkms-test-dkms (3.0.11-1) over (3.0.11-1) ...
Setting up dkms-test-dkms (3.0.11-1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
Removing old dkms_test-1.0 DKMS files...
Loading new dkms_test-1.0 DKMS files...
Error! DKMS tree already contains: dkms_test-1.0
You cannot add the same module/version combo more than once.
dpkg: error processing package dkms-test-dkms (--configure):
installed dkms-test-dkms package post-installation script subprocess returned error exit status 3
Errors were encountered while processing:
dkms-test-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

# apt-get install --reinstall dkms-test-dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for dkms-test-dkms:amd64

# apt-get remove dkms-test-dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
dkms-test-dkms
0 upgraded, 0 newly installed, 1 to remove and 8 not upgraded.
1 not fully installed or removed.
After this operation, 22.5 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 31650 files and directories currently installed.)
Removing dkms-test-dkms (3.0.11-1) ...

# apt-get install dkms-test-dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
dkms-test-dkms
0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Need to get 0 B/9484 B of archives.
After this operation, 22.5 kB of additional disk space will be used.
Selecting previously unselected package dkms-test-dkms.
(Reading database ... 31643 files and directories currently installed.)
Preparing to unpack .../dkms-test-dkms_3.0.11-1_all.deb ...
Unpacking dkms-test-dkms (3.0.11-1) ...
Setting up dkms-test-dkms (3.0.11-1) ...
Removing old dkms_test-1.0 DKMS files...
Loading new dkms_test-1.0 DKMS files...
Error! DKMS tree already contains: dkms_test-1.0
You cannot add the same module/version combo more than once.
dpkg: error processing package dkms-test-dkms (--configure):
installed dkms-test-dkms package post-installation script subprocess returned error exit status 3
Errors were encountered while processing:
dkms-test-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

In the end I had to clean up with
rm -rf /var/lib/dkms/dkms_test
to get back to a sane state


Andreas
0 new messages