Bug #10987

Tails Installer sometimes fails with: No support for modifying a partition a table of type `PMBR'

Added by intrigeri 2016-01-24 18:51:14 . Updated 2018-02-06 18:02:53 .

Status:
Resolved
Priority:
Elevated
Assignee:
intrigeri
Category:
Installation
Target version:
Start date:
2016-01-24
Due date:
% Done:

0%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Installer
Deliverable for:

Description

I’ve seen it on Jenkins, and it was reported during the initial porting to udisks2, as the source code says:

        # XXX: this sometimes fails with:
        # tails_installer.creator.py, line 940, in partition_device
        #    system_partition.call_set_type_sync(ESP_GUID,
        #        GLib.Variant('a{sv}', None))
        # Error: udisks-error-quark:
        # GDBus.Error:org.freedesktop.UDisks2.Error.NotSupported:
        # No support for modifying a partition a table of type `PMBR' (11)

Subtasks


Related issues

Related to Tails - Bug #16168: USB image creation sometimes fails with: GLib.Error: udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.NotSupported: No support for modifying a partition a table of type `PMBR' (11) Resolved 2018-11-29

History

#1 Updated by intrigeri 2016-01-24 18:57:15

  • related to Bug #10720: Tails Installer freezes when calling system_partition.call_set_name_sync in partition_device added

#2 Updated by intrigeri 2016-01-24 19:25:18

  • related to deleted (Bug #10720: Tails Installer freezes when calling system_partition.call_set_name_sync in partition_device)

#3 Updated by intrigeri 2016-01-24 19:25:23

  • Priority changed from Normal to Elevated
  • Parent task set to Bug #10988

#4 Updated by intrigeri 2016-01-24 19:28:30

  • Assignee set to alant

Alan, I think it’s a regression brought by the port to UDisks 2. Can you please have a look?

#5 Updated by intrigeri 2016-02-19 10:40:03

  • Assignee changed from alant to intrigeri
  • Target version set to Tails_2.3

No answer from Alan in almost a month => I’ll give it a try. No promise though.

#6 Updated by intrigeri 2016-04-16 15:41:07

  • Target version changed from Tails_2.3 to Tails_2.4

#7 Updated by intrigeri 2016-05-16 13:22:38

  • Target version changed from Tails_2.4 to Tails_2.5

#8 Updated by intrigeri 2016-07-19 05:13:48

  • Description updated
  • Target version changed from Tails_2.5 to Hole in the Roof

udisks_linux_partition_set_type_sync calls udisks_partition_table_get_type_, that apparently returns “PMBR” while we expect “gpt”. I think that util-linux’ libblkid/src/partitions/gpt.c has some of the code used for detecting the type.

I don’t understand why the partition table is sometimes recognized as PMBR, and sometimes as gpt. It might be that one of the errors we ignore earlier in partition_device causes this problem further down the road… or that there’s some race condition. I cannot really debug this further without being able to reproduce this problem here, so I’ll mark this as a Hole in the Roof. Once I get a complete debug log I can re-add this to some time-constrained target version. I’ll keep an eye on this problem as part of Bug #10720, and will see if it still happens on Jenkins.

Note that the code path used when it works (type == “gpt”) basically just runs sgdisk, so perhaps we could do that ourselves without using udisks. But then, the call to _set_partition_flags -> call_set_flags_sync that’s done via udisks is likely to fail for the same reason, and we would be back to square one: if udisks sees the partition table as non-GPT, it likely won’t be able either to set partition flags that are GPT-specific.

#9 Updated by intrigeri 2016-07-21 02:27:16

In 4.4.10+dfsg-0tails1+bugfix.10720~3.gbpe9be10 I’ve seen _set_partition_flags fail with the same error message on Jenkins:

[creator.py:818 (partition_device)] INFO: Partitioning device /dev/sda
[creator.py:821 (partition_device)] DEBUG: Creating partition table
[creator.py:846 (partition_device)] DEBUG: Creating partition
[creator.py:284 (popen)] DEBUG: sync
[creator.py:879 (partition_device)] DEBUG: partitions: [<PartitionProxy object at 0xf61e10a4 (UDisksPartitionProxy at 0x982f270)>]
[creator.py:284 (popen)] DEBUG: sync
[creator.py:900 (partition_device)] DEBUG: partitions: [<PartitionProxy object at 0xf61e10a4 (UDisksPartitionProxy at 0x982f270)>]
[gui.py:259 (run)] ERROR: udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.NotSupported: No support for modifying a partition a table of type `PMBR' (11)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tails_installer/gui.py", line 196, in run
    self.live.partition_device()
  File "/usr/lib/python2.7/dist-packages/tails_installer/creator.py", line 903, in partition_device
    self._set_partition_flags(system_partition, SYSTEM_PARTITION_FLAGS)
  File "/usr/lib/python2.7/dist-packages/tails_installer/creator.py", line 222, in _set_partition_flags
    None)
Error: udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.NotSupported: No support for modifying a partition a table of type `PMBR' (11)
[gui.py:260 (run)] DEBUG: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tails_installer/gui.py", line 196, in run
    self.live.partition_device()
  File "/usr/lib/python2.7/dist-packages/tails_installer/creator.py", line 903, in partition_device
    self._set_partition_flags(system_partition, SYSTEM_PARTITION_FLAGS)
  File "/usr/lib/python2.7/dist-packages/tails_installer/creator.py", line 222, in _set_partition_flags
    None)
Error: udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.NotSupported: No support for modifying a partition a table of type `PMBR' (11)

#10 Updated by intrigeri 2016-07-22 04:22:30

I expect I’ll see that more often on https://jenkins.tails.boum.org/job/test_Tails_ISO_bugfix-10720-installer-freezes-on-jenkins/ now, given Tails Installer now goes past the previous failures there and start hitting this one occasionally. Then I might have time to work on this during the 2.6 or 2.7 cycle.

#12 Updated by intrigeri 2016-08-19 00:41:47

Tails Installer debug log:
2016-08-18 14:33:27,995 [creator.py:1338 (get_extlinux_version)] WARNING: extlinux not found! Only FAT filesystems will be supported
2016-08-18 14:33:28,059 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/block_devices/sda
2016-08-18 14:33:28,061 [creator.py:673 (detect_supported_drives)] DEBUG: {'bootable': None,
 'device': '/dev/sda',
 'free': None,
 'fstype': '',
 'fsversion': '',
 'is_device_big_enough': True,
 'is_optical': False,
 'label': 'QEMU-QEMU-HARDDISK-1-0000:00:05.0-2',
 'model': 'QEMU HARDDISK',
 'mount': None,
 'mounted_partitions': set([]),
 'parent': None,
 'parent_size': None,
 'parent_udi': None,
 'size': 4294967296L,
 'udi': '/org/freedesktop/UDisks2/block_devices/sda',
 'uuid': '',
 'vendor': 'QEMU'}
2016-08-18 14:33:28,065 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/drives/QEMU_DVD_ROM_QM00009
2016-08-18 14:33:28,067 [creator.py:593 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/drives/QEMU_DVD_ROM_QM00009 which is not a block device
2016-08-18 14:33:28,067 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/Manager
2016-08-18 14:33:28,067 [creator.py:593 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/Manager which is not a block device
2016-08-18 14:33:28,067 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/block_devices/sr0
2016-08-18 14:33:28,069 [creator.py:625 (detect_supported_drives)] WARNING: Skipping device '/org/freedesktop/UDisks2/block_devices/sr0' connected to '' interface
2016-08-18 14:33:28,070 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/block_devices/loop7
2016-08-18 14:33:28,070 [creator.py:599 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/block_devices/loop7 which has no associated drive
2016-08-18 14:33:28,070 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/block_devices/loop6
2016-08-18 14:33:28,070 [creator.py:599 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/block_devices/loop6 which has no associated drive
2016-08-18 14:33:28,070 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/block_devices/loop5
2016-08-18 14:33:28,071 [creator.py:599 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/block_devices/loop5 which has no associated drive
2016-08-18 14:33:28,071 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/block_devices/loop4
2016-08-18 14:33:28,071 [creator.py:599 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/block_devices/loop4 which has no associated drive
2016-08-18 14:33:28,071 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/block_devices/loop3
2016-08-18 14:33:28,073 [creator.py:599 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/block_devices/loop3 which has no associated drive
2016-08-18 14:33:28,073 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/block_devices/loop2
2016-08-18 14:33:28,073 [creator.py:599 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/block_devices/loop2 which has no associated drive
2016-08-18 14:33:28,073 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/block_devices/loop1
2016-08-18 14:33:28,075 [creator.py:599 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/block_devices/loop1 which has no associated drive
2016-08-18 14:33:28,075 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/block_devices/loop0
2016-08-18 14:33:28,075 [creator.py:599 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/block_devices/loop0 which has no associated drive
2016-08-18 14:33:28,076 [creator.py:591 (detect_supported_drives)] DEBUG: looking at /org/freedesktop/UDisks2/drives/QEMU_QEMU_HARDDISK_1_0000_3a00_3a05_2e0_2
2016-08-18 14:33:28,076 [creator.py:593 (detect_supported_drives)] DEBUG: skip /org/freedesktop/UDisks2/drives/QEMU_QEMU_HARDDISK_1_0000_3a00_3a05_2e0_2 which is not a block device
2016-08-18 14:33:28,076 [creator.py:692 (detect_supported_drives)] DEBUG: {}
2016-08-18 14:33:28,076 [gui.py:451 (add_devices)] DEBUG: drives: {'/dev/sda': {'size': 4294967296L, 'is_optical': False, 'vendor': 'QEMU', 'fsversion': '', 'parent': None, 'bootable': None, 'is_device_big_enough': True, 'mount': None, 'parent_size': None, 'mounted_partitions': set([]), 'free': None, 'label': 'QEMU-QEMU-HARDDISK-1-0000:00:05.0-2', 'fstype': '', 'parent_udi': None, 'device': '/dev/sda', 'model': 'QEMU HARDDISK', 'udi': '/org/freedesktop/UDisks2/block_devices/sda', 'uuid': ''}}
2016-08-18 14:33:33,253 [creator.py:514 (_set_drive)] DEBUG: /dev/sda selected: {'size': 4294967296L, 'is_optical': False, 'vendor': 'QEMU', 'fsversion': '', 'parent': None, 'bootable': None, 'is_device_big_enough': True, 'mount': None, 'parent_size': None, 'mounted_partitions': set([]), 'free': None, 'label': 'QEMU-QEMU-HARDDISK-1-0000:00:05.0-2', 'fstype': '', 'parent_udi': None, 'device': '/dev/sda', 'model': 'QEMU HARDDISK', 'udi': '/org/freedesktop/UDisks2/block_devices/sda', 'uuid': ''}
2016-08-18 14:33:35,149 [creator.py:783 (unmount_device)] DEBUG: Entering unmount_device for '/dev/sda'
2016-08-18 14:33:35,150 [creator.py:786 (unmount_device)] DEBUG: {'bootable': None,
 'device': '/dev/sda',
 'free': None,
 'fstype': '',
 'fsversion': '',
 'is_device_big_enough': True,
 'is_optical': False,
 'label': 'QEMU-QEMU-HARDDISK-1-0000:00:05.0-2',
 'model': 'QEMU HARDDISK',
 'mount': None,
 'mounted_partitions': set([]),
 'parent': None,
 'parent_size': None,
 'parent_udi': None,
 'size': 4294967296L,
 'udi': '/org/freedesktop/UDisks2/block_devices/sda',
 'uuid': '',
 'vendor': 'QEMU'}
2016-08-18 14:33:35,152 [creator.py:284 (popen)] DEBUG: sync
2016-08-18 14:33:38,182 [creator.py:284 (popen)] DEBUG: /sbin/sgdisk --print /dev/sda
2016-08-18 14:33:38,310 [creator.py:820 (partition_device)] INFO: Partitioning device /dev/sda
2016-08-18 14:33:38,311 [creator.py:823 (partition_device)] DEBUG: Creating partition table
2016-08-18 14:33:39,547 [creator.py:846 (partition_device)] DEBUG: Creating partition
2016-08-18 14:33:40,474 [creator.py:862 (partition_device)] DEBUG: Ignoring error GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error wiping newly created partition /dev/sda1: Command-line `wipefs -a "/dev/sda1"' exited with non-zero exit status 1: wipefs: error: /dev/sda1: probing initialization failed: No such file or directory

2016-08-18 14:33:40,474 [creator.py:284 (popen)] DEBUG: sync
2016-08-18 14:33:46,669 [creator.py:284 (popen)] DEBUG: sync
2016-08-18 14:33:51,751 [gui.py:259 (run)] ERROR: udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.NotSupported: No support for modifying a partition a table of type `PMBR' (11)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tails_installer/gui.py", line 196, in run
    self.live.partition_device()
  File "/usr/lib/python2.7/dist-packages/tails_installer/creator.py", line 888, in partition_device
    self._set_partition_flags(system_partition, SYSTEM_PARTITION_FLAGS)
  File "/usr/lib/python2.7/dist-packages/tails_installer/creator.py", line 222, in _set_partition_flags
    None)
Error: udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.NotSupported: No support for modifying a partition a table of type `PMBR' (11)
2016-08-18 14:33:51,756 [gui.py:260 (run)] DEBUG: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tails_installer/gui.py", line 196, in run
    self.live.partition_device()
  File "/usr/lib/python2.7/dist-packages/tails_installer/creator.py", line 888, in partition_device
    self._set_partition_flags(system_partition, SYSTEM_PARTITION_FLAGS)
  File "/usr/lib/python2.7/dist-packages/tails_installer/creator.py", line 222, in _set_partition_flags
    None)
Error: udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.NotSupported: No support for modifying a partition a table of type `PMBR' (11)
    And I "Clone & Install" Tails to USB drive "mbr"                                                                     # features/step_definitions/usb.rb:110
      FindFailed: can not find USBInstallationComplete.png on the screen.
      Line ?, in File ? (RuntimeError)
      ./features/step_definitions/usb.rb:83:in `rescue in usb_install_helper'
      ./features/step_definitions/usb.rb:76:in `usb_install_helper'
      ./features/step_definitions/usb.rb:112:in `/^I "Clone & Install" Tails to USB drive "([^"]+)"$/'
      features/usb_install.feature:68:in `And I "Clone & Install" Tails to USB drive "mbr"'

#13 Updated by intrigeri 2018-01-04 07:51:32

  • Status changed from Confirmed to Resolved

No news here since a year and ssh jenkins.lizard grep -i -E 'PMBR|org\.freedesktop\.UDisks2\.Error\.NotSupported' /var/lib/jenkins/jobs/test_Tails_ISO_*/builds/*/archive/build-artifacts/debug.log outputs nothing. So I think this was fixed in udisks2 in Stretch, or the way we now use it does not trigger the bug anymore. Let’s close this bug for now and reopen if it ever happens again.

#14 Updated by intrigeri 2018-02-06 18:02:53

  • Target version deleted (Hole in the Roof)

#15 Updated by intrigeri 2018-11-29 09:27:08

  • related to Bug #16168: USB image creation sometimes fails with: GLib.Error: udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.NotSupported: No support for modifying a partition a table of type `PMBR' (11) added