Test tests/nested/manual/core20-to-core22 is broken

Bug #1979197 reported by Michael Vogt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned

Bug Description

The tests/nested/manual/core20-to-core22 is currently failing. The system does not boot after a remodel.

Here is some debug information from "ubuntu-boot":
"""
root@top:/tmp/tmp/work-dir/images# mount /dev/mapper/loop104p3 /mnt/
root@top:/tmp/tmp/work-dir/images# ls -al /mnt/EFI/ubuntu/
total 20
drwxr-xr-x 3 root root 4096 Jun 20 11:21 .
drwxr-xr-x 4 root root 4096 Jun 20 11:13 ..
-rw-r--r-- 1 root root 1611 Jun 20 11:13 grub.cfg
-rw-r--r-- 1 root root 1024 Jun 20 11:21 grubenv
lrwxrwxrwx 1 root root 30 Jun 20 11:19 kernel.efi -> pc-kernel_1021.snap/kernel.efi
drwxr-xr-x 2 root root 4096 Jun 9 18:33 pc-kernel_1032.snap
lrwxrwxrwx 1 root root 30 Jun 20 11:21 try-kernel.efi -> pc-kernel_1032.snap/kernel.efi
"""
Note that kernel.efi is a broken symlink, i.e. there is no "pc-kernel_1021".

And here from "ubuntu-data":
"""
root@top:/tmp/tmp/work-dir/images# mount /dev/mapper/loop104p5 /mnt/
root@top:/tmp/tmp/work-dir/images# cat /mnt/system-data/var/lib/snapd/modeenv
mode=run
current_recovery_systems=20220620
good_recovery_systems=20220620
base=core22_197.snap
try_base=core20_1550.snap
base_status=try
current_kernels=pc-kernel_1021.snap,pc-kernel_1032.snap
model=FpA2tgNE8bUrUKSOhE6SOpsMdlcEJkDL/my-model
grade=dangerous
model_sign_key_id=u2EnPKDpHm8Or1VWwjs3duNosoBpFS4Da-c6vRQHPKwdllDOlQ02_JFGrxZDe03C
current_kernel_command_lines=["snapd_recovery_mode=run console=ttyS0 console=tty1 panic=-1"]
"""

Revision history for this message
Michael Vogt (mvo) wrote :
Download full text (8.6 KiB)

Turns out the failure is because of:
"""
$ snap debug state --change=3 ~/tmp/state.json
Lanes ID Status Spawn Ready Kind Summary
0 75 Undo today at 11:15 CEST today at 11:16 CEST prerequisites Ensure prerequisites for "core22" are available
0 76 Undo today at 11:15 CEST today at 11:16 CEST download-snap Download snap "core22" (197) from channel "latest/edge"
0 77 Undo today at 11:15 CEST today at 11:16 CEST validate-snap Fetch and check assertions for snap "core22" (197)
0 109 Undone today at 11:15 CEST today at 11:21 CEST create-recovery-system Create recovery system with label "20220620-1"
0 110 Undone today at 11:15 CEST today at 11:21 CEST finalize-recovery-system Finalize recovery system with label "20220620-1"
0 78 Undone today at 11:15 CEST today at 11:21 CEST mount-snap Mount snap "core22" (197)
0 79 Undone today at 11:15 CEST today at 11:21 CEST copy-snap-data Copy snap "core22" data
0 80 Undone today at 11:15 CEST today at 11:21 CEST setup-profiles Setup snap "core22" (197) security profiles
0 81 Undone today at 11:15 CEST today at 11:21 CEST link-snap Make snap "core22" (197) available to the system
0 82 Undone today at 11:15 CEST today at 11:21 CEST auto-connect Automatically connect eligible plugs and slots of snap "core22"
0 83 Undone today at 11:15 CEST today at 11:21 CEST set-auto-aliases Set automatic aliases for snap "core22"
0 84 Undone today at 11:15 CEST today at 11:21 CEST setup-aliases Setup snap "core22" aliases
0 85 Undone today at 11:15 CEST today at 11:21 CEST run-hook Run install hook of "core22" snap if present
0 86 Undone today at 11:15 CEST today at 11:21 CEST start-snap-services Start snap "core22" (197) services
0 87 Undone today at 11:15 CEST today at 11:21 CEST run-hook Run health check of "core22" snap
0 111 Hold today at 11:15 CEST today at 11:21 CEST set-model Set new model assertion
1 55 Undo today at 11:15 CEST today at 11:15 CEST prerequisites Ensure prerequisites for "pc-kernel" are available
1 56 Undo today at 11:15 CEST today at 11:16 CEST download-snap Download snap "pc-kernel" (1021) from channel "22/edge"
1 57 Undo today at 11:15 CEST today at 11:16 CEST validate-snap Fetch and check assertions for snap "pc-kernel" (1021)
1 58 Undone today at 11:15 CEST today at 11:21 CEST mount-snap Mount snap "pc-kernel" (1021)
1 59 Undone today at 11:15 CEST today at 11:21 CEST run-hook Run pre-refresh hook of "pc-kernel" snap if present
1 60 Undone today at 11:15 CEST today at 11:21 CEST stop-snap-services Stop snap "pc-kernel" services
1 61 Undone today at 11:15 CEST today at 11:21 CEST remove-aliases Remove aliases for snap "pc-kernel"
1 62 Undon...

Read more...

Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :
Download full text (68.9 KiB)

Managed to collect the state and debug logs:

maciek-borzecki@ubuntu:~$ sudo snap debug state /var/lib/snapd/state.json --change 3
Lanes ID Status Spawn Ready Kind Summary
0 75 Done today at 11:24 UTC today at 11:30 UTC prerequisites Ensure prerequisites for "core22" are available
0 76 Undone today at 11:24 UTC today at 11:30 UTC download-snap Download snap "core22" (197) from channel "latest/edge"
0 77 Done today at 11:24 UTC today at 11:30 UTC validate-snap Fetch and check assertions for snap "core22" (197)
0 109 Undone today at 11:24 UTC today at 11:30 UTC create-recovery-system Create recovery system with label "20220620-1"
0 110 Undone today at 11:24 UTC today at 11:30 UTC finalize-recovery-system Finalize recovery system with label "20220620-1"
0 78 Undone today at 11:24 UTC today at 11:30 UTC mount-snap Mount snap "core22" (197)
0 79 Undone today at 11:24 UTC today at 11:30 UTC copy-snap-data Copy snap "core22" data
0 80 Undone today at 11:24 UTC today at 11:30 UTC setup-profiles Setup snap "core22" (197) security profiles
0 81 Undone today at 11:24 UTC today at 11:30 UTC link-snap Make snap "core22" (197) available to the system
0 82 Undone today at 11:24 UTC today at 11:30 UTC auto-connect Automatically connect eligible plugs and slots of snap "core22"
0 83 Undone today at 11:24 UTC today at 11:30 UTC set-auto-aliases Set automatic aliases for snap "core22"
0 84 Undone today at 11:24 UTC today at 11:30 UTC setup-aliases Setup snap "core22" aliases
0 85 Undone today at 11:24 UTC today at 11:30 UTC run-hook Run install hook of "core22" snap if present
0 86 Undone today at 11:24 UTC today at 11:30 UTC start-snap-services Start snap "core22" (197) services
0 87 Undone today at 11:24 UTC today at 11:30 UTC run-hook Run health check of "core22" snap
0 111 Hold today at 11:24 UTC today at 11:30 UTC set-model Set new model assertion
1 55 Done today at 11:24 UTC today at 11:30 UTC prerequisites Ensure prerequisites for "pc-kernel" are available
1 56 Undone today at 11:24 UTC today at 11:30 UTC download-snap Download snap "pc-kernel" (1021) from channel "22/edge"
1 57 Done today at 11:24 UTC today at 11:30 UTC validate-snap Fetch and check assertions for snap "pc-kernel" (1021)
1 58 Undone today at 11:24 UTC today at 11:30 UTC mount-snap Mount snap "pc-kernel" (1021)
1 59 Undone today at 11:24 UTC today at 11:30 UTC run-hook Run pre-refresh hook of "pc-kernel" snap if present
1 60 Undone today at 11:24 UTC today at 11:30 UTC stop-snap-services Stop snap "pc-kernel" services
1 61 Undone today at 11:24 UTC today at 11:30 UTC remove-aliases Remove aliases for snap "pc-kernel"
1 62 Undone to...

Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

more state information:

---
91 Mount snap "pc" (127)
  2022-06-20T12:15:46Z ERROR cannot remodel to an incompatible gadget: incompatible layout change: incompatible structure #4 ("ubuntu-save") change: cannot change structure size from 16777216 to 33554432
maciek-borzecki@ubuntu:~$ ls /boot/grub/
grub.cfg grubenv kernel.efi pc-kernel_1032.snap try-kernel.efi
maciek-borzecki@ubuntu:~$ ls -l /boot/grub/
total 12
-rw-r--r-- 1 root root 1611 Jun 20 12:02 grub.cfg
-rw-r--r-- 1 root root 1024 Jun 20 12:15 grubenv
lrwxrwxrwx 1 root root 30 Jun 20 12:14 kernel.efi -> pc-kernel_1021.snap/kernel.efi
drwxr-xr-x 2 root root 4096 Jun 9 16:33 pc-kernel_1032.snap
lrwxrwxrwx 1 root root 30 Jun 20 12:15 try-kernel.efi -> pc-kernel_1032.snap/kernel.efi

maciek-borzecki@ubuntu:~$ cat /var/lib/snapd/modeenv
mode=run
current_recovery_systems=20220620
good_recovery_systems=20220620
base=core22_197.snap
try_base=core20_1518.snap
base_status=try
current_kernels=pc-kernel_1021.snap,pc-kernel_1032.snap
model=FpA2tgNE8bUrUKSOhE6SOpsMdlcEJkDL/my-model
grade=dangerous
model_sign_key_id=u2EnPKDpHm8Or1VWwjs3duNosoBpFS4Da-c6vRQHPKwdllDOlQ02_JFGrxZDe03C
current_kernel_command_lines=["snapd_recovery_mode=run console=ttyS0 console=tty1 panic=-1"]

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.