ppc64le: `/usr/lib/grub/powerpc-ieee1275/prep-bootdev` hangs during upgrade

Bug #1915007 reported by Paul Menzel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Doing `apt upgrade`

    2021-02-08 10:41:20 upgrade grub-ieee1275:ppc64el 2.04-1ubuntu26 2.04-1ubuntu26.8

the postinst hangs:

```
root 236284 0.0 0.0 18304 9536 ? S 09:59 0:00 sudo apt full-upgrade
root 236285 0.0 0.0 77376 64256 ? S 09:59 0:04 \_ apt full-upgrade
root 253209 0.0 0.0 21440 14336 pts/1 Ss+ 11:10 0:04 \_ /usr/bin/dpkg --status-fd 45 --configure --pending
root 305396 0.0 0.0 33408 24896 pts/1 S+ 11:19 0:00 \_ /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/grub-ieee1275.postinst configure 2.04-1ubuntu26
root 305407 0.0 0.0 12032 5632 pts/1 S+ 11:19 0:00 \_ /bin/bash /var/lib/dpkg/info/grub-ieee1275.postinst configure 2.04-1ubuntu26
root 305520 0.0 0.0 8960 3328 pts/1 D+ 11:19 0:00 \_ /usr/lib/grub/powerpc-ieee1275/prep-bootdev
```

Trying to debug a little `sudo /usr/lib/grub/powerpc-ieee1275/prep-bootdev -l` hangs too. strace shows, that it hangs when opening the non-existing `/dev/sdf`:

```
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop1 7:1 0 65.3M 1 loop /snap/lxd/19012
loop2 7:2 0 54M 1 loop /snap/core18/1987
loop3 7:3 0 91.1M 1 loop /snap/core/10582
loop4 7:4 0 54M 1 loop /snap/core18/1946
loop5 7:5 0 91.1M 1 loop /snap/core/10575
loop6 7:6 0 65.3M 1 loop /snap/lxd/19163
sda 8:0 1 931.5G 0 disk
├─sda1 8:1 1 7M 0 part
└─sda2 8:2 1 931.5G 0 part /var/lib/docker/btrfs
sdb 8:16 1 931.5G 0 disk /amd/flughafenberlinbrandenburgwillybrandt/0
sr0 11:0 1 1024M 0 rom
sr1 11:1 1 1024M 0 rom
sr2 11:2 1 1024M 0 rom
sr3 11:3 1 1024M 0 rom
$ sudo strace -ff /usr/lib/grub/powerpc-ieee1275/prep-bootdev -l
[…]
lstat("/dev", {st_mode=S_IFDIR|0755, st_size=4920, ...}) = 0
lstat("/dev/sdc", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x20), ...}) = 0
stat("/dev/sdc", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x20), ...}) = 0
openat(AT_FDCWD, "/dev/sdc", O_RDONLY) = -1 ENOMEDIUM (No medium found)
openat(AT_FDCWD, "/dev/sdc", O_RDONLY) = -1 ENOMEDIUM (No medium found)
lstat("/dev", {st_mode=S_IFDIR|0755, st_size=4920, ...}) = 0
lstat("/dev/sdd", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x30), ...}) = 0
stat("/dev/sdd", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x30), ...}) = 0
openat(AT_FDCWD, "/dev/sdd", O_RDONLY) = -1 ENOMEDIUM (No medium found)
openat(AT_FDCWD, "/dev/sdd", O_RDONLY) = -1 ENOMEDIUM (No medium found)
lstat("/dev", {st_mode=S_IFDIR|0755, st_size=4920, ...}) = 0
lstat("/dev/sde", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x40), ...}) = 0
stat("/dev/sde", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x40), ...}) = 0
openat(AT_FDCWD, "/dev/sde", O_RDONLY) = -1 ENOMEDIUM (No medium found)
openat(AT_FDCWD, "/dev/sde", O_RDONLY) = -1 ENOMEDIUM (No medium found)
lstat("/dev", {st_mode=S_IFDIR|0755, st_size=4920, ...}) = 0
lstat("/dev/sdf", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x50), ...}) = 0
stat("/dev/sdf", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x50), ...}) = 0
openat(AT_FDCWD, "/dev/sdf", O_RDONLY
```

```
$ sudo fdisk -l
Disk /dev/loop1: 65.28 MiB, 68444160 bytes, 133680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop2: 54.4 MiB, 56668160 bytes, 110680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop3: 91.6 MiB, 95477760 bytes, 186480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop4: 53.99 MiB, 56590336 bytes, 110528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop5: 91.6 MiB, 95477760 bytes, 186480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop6: 65.29 MiB, 68456448 bytes, 133704 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000NX0313
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 242ACBC1-F70A-4E15-91B8-8340D055F79B

Device Start End Sectors Size Type
/dev/sda1 2048 16383 14336 7M PowerPC PReP boot
/dev/sda2 16384 1953523711 1953507328 931.5G Linux filesystem

Disk /dev/sdb: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000NX0313
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

```

Revision history for this message
Paul Menzel (paulmenzel) wrote :
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.