flash-kernel 3.106ubuntu13 causes a trigger cycle when installing arm64 kernels on VMs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
flash-kernel (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
We're seeing the following error when trying to install kernel packages on cloud instances with the latest flash-kernel, 3.106ubuntu13.
sudo apt-get install --yes linux-generic
...
: /boot/vmlinuz is now a symlink to vmlinuz-
I: /boot/initrd.img is now a symlink to initrd.
Setting up linux-headers-
Setting up linux-image-generic (6.1.0.16.16) ...
Setting up linux-generic (6.1.0.16.16) ...
Processing triggers for man-db (2.11.2-1) ...
Processing triggers for flash-kernel (3.106ubuntu13) ...
flash-kernel: requested kernel 6.1.0-16-generic is in state triggers-pending.
flash-kernel: deferring update (trigger activated)
dpkg: cycle found while processing triggers:
chain of packages whose triggers are or may be responsible:
flash-kernel -> linux-image-
packages' pending triggers which are or may be unresolvable:
linux-
flash-kernel: flash-kernel
dpkg: error processing package linux-image-
triggers looping, abandoned
Processing triggers for flash-kernel (3.106ubuntu13) ...
flash-kernel: requested kernel 6.1.0-16-generic is in state half-configured.
flash-kernel: deferring update (trigger activated)
Processing triggers for flash-kernel (3.106ubuntu13) ...
flash-kernel: requested kernel 6.1.0-16-generic is in state half-configured.
flash-kernel: deferring update (trigger activated)
Processing triggers for flash-kernel (3.106ubuntu13) ...
flash-kernel: requested kernel 6.1.0-16-generic is in state half-configured.
flash-kernel: deferring update (trigger activated)
dpkg: cycle found while processing triggers:
chain of packages whose triggers are or may be responsible:
flash-kernel -> flash-kernel -> flash-kernel -> flash-kernel
packages' pending triggers which are or may be unresolvable:
flash-kernel: flash-kernel
dpkg: error processing package flash-kernel (--configure):
triggers looping, abandoned
Errors were encountered while processing:
linux-
flash-kernel
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
I was able to reproduce this on an aws image with serial 20230306, but not on one with serial 20230303 (which was using flash-kernel 3.106ubuntu12. I also see this on the latest google cloud images.
I had a nasty feeling this might rear its head on some platform. The question in this case is: why is the kernel stuck in half-configured state?
The new flash-kernel test is expecting that to resolve to "installed" before it can proceed because otherwise it risks flashing the kernel, but failing to flash the initrd (or flashing an invalid initrd).
In fact, that looks like the correct decision here because I don't see the initramfs-tools trigger firing to generate the initrd? The line at the top ("I: /boot/initrd.img is now a symlink to initrd. img-6.1. 0-16-generic" ) doesn't mean the initrd exists, just that the symlink has been created and at this stage, at least on Xilinx and Pi images, that means the symlink is dead and definitely should not be flashed; once the kernel package is fully "installed", we can be certain the initrd exists and is correct.