/snap/subiquity/1561/usr/bin/subiquity:ValueError:main:wrapper:log_time:block_meta:meta_clear:clear_holders:wipe_superblock:_wipe_superblock:wipe_volume:quick_zero:zero_file_at_offsets

Bug #1868177 reported by errors.ubuntu.com bug bridge
70
This bug affects 16 people
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Undecided
Unassigned
subiquity
New
Undecided
Unassigned
curtin (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding subiquity. This problem was most recently seen with package version 1561, the problem page at https://errors.ubuntu.com/problem/22688d0eeceebb79b1d78e656a7465870c664f64 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Tags: bionic eoan

Related branches

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

The tracebacks look like this:

  File "/snap/subiquity/1561/lib/python3.6/site-packages/curtin/block/clear_holders.py", line 662, in clear_holders
    shutdown_function(dev_info['device'])
  File "/snap/subiquity/1561/lib/python3.6/site-packages/curtin/block/clear_holders.py", line 323, in wipe_superblock
    _wipe_superblock(mp_dev if mp_dev else blockdev)
  File "/snap/subiquity/1561/lib/python3.6/site-packages/curtin/block/clear_holders.py", line 371, in _wipe_superblock
    exclusive=exclusive, strict=strict)
  File "/snap/subiquity/1561/lib/python3.6/site-packages/curtin/block/__init__.py", line 1127, in wipe_volume
    quick_zero(path, partitions=False, exclusive=exclusive, strict=strict)
  File "/snap/subiquity/1561/lib/python3.6/site-packages/curtin/block/__init__.py", line 1041, in quick_zero
    exclusive=exclusive, strict=strict)
  File "/snap/subiquity/1561/lib/python3.6/site-packages/curtin/block/__init__.py", line 1084, in zero_file_at_offsets
    raise ValueError(m_short.format(**msg_vals))
ValueError: /dev/sda1 (size=524288): 1048576 bytes from 0 > size.

Looks like it's probably trying to wipe an extremely small partition? I guess subiquity could prevent people from trying to reuse those.

affects: subiquity (Ubuntu) → subiquity
Revision history for this message
dann frazier (dannf) wrote :

I was googling for a MAAS deployment failure I'm seeing and this bug came up. Here's the traceback I'm seeing (full output attached):

        get_blockdev_sector_size: (log=512, phys=512)
        Running command ['lsblk', '--noheadings', '--bytes', '--pairs', '--output=ALIGNMENT,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO,FSTYPE,GROUP,KNAME,LABEL,LOG-SEC,MAJ:MIN,MIN-IO,MODE,MODEL,MOUNTPOINT,NAME,OPT-IO,OWNER,PHY-SEC,RM,RO,ROTA,RQ-SIZE,SIZE,STATE,TYPE,UUID'] with allowed return codes [0] (capture=True)
        Checking if /dev/sdd2 is a swap device
        Found swap magic: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
        wiping superblock on /dev/sdd2
        wiping /dev/sdd2 attempt 1/4
        wiping 1M on /dev/sdd2 at offsets [0, -1048576]
        finish: cmd-install/stage-partitioning/builtin/cmd-block-meta/clear-holders: FAIL: removing previous storage devices
        TIMED BLOCK_META: 5.247
        finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
        Traceback (most recent call last):
          File "/curtin/curtin/commands/main.py", line 202, in main
            ret = args.func(args)
          File "/curtin/curtin/log.py", line 97, in wrapper
            return log_time("TIMED %s: " % msg, func, *args, **kwargs)
          File "/curtin/curtin/log.py", line 79, in log_time
            return func(*args, **kwargs)
          File "/curtin/curtin/commands/block_meta.py", line 102, in block_meta
            meta_clear(devices, state.get('report_stack_prefix', ''))
          File "/curtin/curtin/commands/block_meta.py", line 1870, in meta_clear
            clear_holders.clear_holders(devices)
          File "/curtin/curtin/block/clear_holders.py", line 633, in clear_holders
            shutdown_function(dev_info['device'])
          File "/curtin/curtin/block/clear_holders.py", line 305, in wipe_superblock
            _wipe_superblock(blockdev)
          File "/curtin/curtin/block/clear_holders.py", line 339, in _wipe_superblock
            exclusive=exclusive, strict=strict)
          File "/curtin/curtin/block/__init__.py", line 1316, in wipe_volume
            quick_zero(path, partitions=False, exclusive=exclusive, strict=strict)
          File "/curtin/curtin/block/__init__.py", line 1230, in quick_zero
            exclusive=exclusive, strict=strict)
          File "/curtin/curtin/block/__init__.py", line 1273, in zero_file_at_offsets
            raise ValueError(m_short.format(**msg_vals))
        ValueError: /dev/sdd2 (size=524288): 1048576 bytes from 0 > size.
        /dev/sdd2 (size=524288): 1048576 bytes from 0 > size.

Revision history for this message
dann frazier (dannf) wrote :

I worked around the MAAS deployment issue by manually removing all partitions (parted -- mklabel gpt).

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1868177] Re: /snap/subiquity/1561/usr/bin/subiquity:ValueError:main:wrapper:log_time:block_meta:meta_clear:clear_holders:wipe_superblock:_wipe_superblock:wipe_volume:quick_zero:zero_file_at_offsets

Huh,

Never seen partitions smaller than 1MB...

Curtin could truncate the requested size to the greater of 1MB or size of
partition.

On Tue, Feb 2, 2021 at 4:05 PM dann frazier <email address hidden>
wrote:

> I worked around the MAAS deployment issue by manually removing all
> partitions (parted -- mklabel gpt).
>
> ** Also affects: curtin (Ubuntu)
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> subiquity.
> Matching subscriptions: curtin-bugs, subiquity-bugs
> https://bugs.launchpad.net/bugs/1868177
>
> Title:
>
> /snap/subiquity/1561/usr/bin/subiquity:ValueError:main:wrapper:log_time:block_meta:meta_clear:clear_holders:wipe_superblock:_wipe_superblock:wipe_volume:quick_zero:zero_file_at_offsets
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/subiquity/+bug/1868177/+subscriptions
>

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit 4339a49e to curtin on branch master.
To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=4339a49e

Changed in curtin:
status: New → Fix Committed
Revision history for this message
Dan Bungert (dbungert) wrote : Fixed in curtin version 21.3.

This bug is believed to be fixed in curtin in version 21.3. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.6 KiB)

This bug was fixed in the package curtin - 21.3-0ubuntu1

---------------
curtin (21.3-0ubuntu1) jammy; urgency=medium

  * New upstream release.
    - version to 21.3 [Dan Bungert] (LP: #1953410)
    - distro: handle ID_LIKE [Dan Bungert] (LP: #1934513)
    - block_meta: pass handlers dict to all handlers [Michael Hudson-Doyle]
    - block_meta: refactor partition verification slightly
      [Michael Hudson-Doyle]
    - block-meta: support using a raw image containing LVM volumes
      [Alexsander de Souza]
    - lsblk: adjust output to match old format [Dan Bungert]
    - curtin.commands.extract: Factor preparing sources for copying into a
      class [Michael Hudson-Doyle]
    - apt_config: tweaks to allow some functionality in partial tree as
      non-root [Michael Hudson-Doyle]
    - Add integration tests for some partitioning operations
      [Michael Hudson-Doyle]
    - command/apt: disable_components [Dan Bungert]
    - commands/apt: use python-apt for sources.list [Dan Bungert]
    - curthooks: always install shim-signed if available (when UEFI booted)
      [Michael Hudson-Doyle]
    - tox,control: fix jenkins CI jobs [Dan Bungert]
    - tests: update to demonstrate python-apt functional [Dan Bungert]
    - block:lvm: search encrypted volumes for LVM
      [Lukas Märdian] (LP: #1940687)
    - mdadm: allow installation to a syncing array
      [Michael Hudson-Doyle] (LP: #1939563)
    - vmtests: s/Groovy/Impish [Dan Bungert]
    - tweak making mountpoints private some more [Michael Hudson-Doyle]
    - curthooks: do not unconditionally copy e/n/interfaces to target
      [Michael Hudson-Doyle]
    - block: handle /dev/mapper/* in dev_path() [Lukas Märdian]
    - curthooks: do not add lvm devices filter when / is mutipathed
      [Michael Hudson-Doyle] (LP: #1895192)
    - Extend the 'format' schema for unknown fstypes [Dan Bungert]
    - move making mounts recursively private into do_unmount
      [Michael Hudson-Doyle]
    - disk_handler: fix partitioning a new RAID [Michael Hudson-Doyle]
    - curthooks:setup_zipl: use proper device path in root= arg for cmdline
      [Lukas Märdian]
    - fix tearing down ChrootableTarget when mounts appear while it is set up
      [Michael Hudson-Doyle] (LP: #1928839, #1934775)
    - Don't override PYTHON env var in bin/curtin [Dan Bungert]
    - disk_handler: check wipe field when deciding whether to reformat raids
      [Michael Hudson-Doyle] (LP: #1932976)
    - storage_config: properly handle raid containers [Michael Hudson-Doyle]
    - pylintrc: explicitly list the DISTROS generated-members [Paride Legovini]
    - block_meta: make preserve: true on a raid in a container work
      [Michael Hudson-Doyle]
    - Fix NVMe validation for namespaces with UUID
      [Ryan Norwood] (LP: #1925399)
    - meta_simple: handle multiple disks in storage config with dd-image
      [Dan Bungert] (LP: #1925722)
    - Use /proc/filesystems to decide passno
      [Dan Bungert] (LP: #1717584, LP: #1785354)
    - block_meta: fix wiping of existing dasd partition [Michael Hudson-Doyle]
    - block_meta: pass --yes to lvcreate alongside --wipesignatures=y
      [Michael Hudson-Doyle] (LP: #1923487)
    - remove 's...

Read more...

Changed in curtin (Ubuntu):
status: New → Fix Released
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.