partiioning: sfdisk silently failing on i/o errors

Bug #2063609 reported by Olivier Gayot
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
subiquity
Triaged
Low
Unassigned

Bug Description

We got multiple private reports of partitioning failing with the sfdisk command failing silently when exit status 1.

Example:

        New situation:
        Disklabel type: gpt
        Disk identifier: $UUID_REDACTED

        Device Start End Sectors Size Type
        /dev/sda1 2048 4095 2048 1M BIOS boot
        /dev/sda2 4096 67106815 67102720 32G Linux filesystem
        An error occured handling 'disk-sda': ProcessExecutionError - Unexpected error while running command.

Another example:

        New situation:
        Disklabel type: gpt
        Disk identifier: $UUID_REDACTED

        Device Start End Sectors Size Type
        /dev/sdc1 2048 2203647 2201600 1G EFI System
        /dev/sdc2 2203648 1465145343 1462941696 697.6G Linux filesystem
        An error occured handling 'disk-sdc': ProcessExecutionError - Unexpected error while running command.
        Command: ['sfdisk', '--no-reread', '/dev/sdc', '--no-tell-kernel']

In all the reports so far, the kernel seems to report some sort of i/o errors with the relevant drive.

Looking for things such in Syslog.txt or InstallerJournal.txt just before sfdisk.

* ubuntu kernel: I/O error, dev $device, sector 0 op 0x1:(WRITE) flags [...]
* ubuntu kernel: critical medium error, dev $device, sector $sector op 0x0:(READ) [...]
* ubuntu kernel: critical medium error, dev $device, sector $sector op 0x1:(WRITE) [...]

I wonder if there is a flag we can pass to sfdisk to be more verbose. The manpage mentions the following variables:

       SFDISK_DEBUG=all
           enables sfdisk debug output.

       LIBFDISK_DEBUG=all
           enables libfdisk debug output.

       LIBBLKID_DEBUG=all
           enables libblkid debug output.

       LIBSMARTCOLS_DEBUG=all
           enables libsmartcols debug output.

       LOCK_BLOCK_DEVICE=<mode>
           use exclusive BSD lock. The mode is "1" or "0". See --lock for more details.

We can experiment and see what's manageable from the logs standpoint

Olivier Gayot (ogayot)
summary: - partiioning: sfdisk silently failing
+ partiioning: sfdisk silently failing on i/o errors
Changed in subiquity:
importance: Undecided → Low
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.