[SRU] cannot format when no partition table is present

Bug #1300361 reported by Dimitri John Ledkov
114
This bug affects 23 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned
usb-creator (Ubuntu)
Fix Released
Critical
Dimitri John Ledkov
Trusty
Fix Released
High
Yu Ning

Bug Description

[Impact]
cannot erase the disk when no partition table is present

[Test Case]
cat /dev/zero >> /dev/sdX to erase the partition table (you can ctrl-c immediately, it's enough that the first bits are erased)

[Regression Potential]
Should not affect negatively the normal use case (=usb stick with partition table, one partition vfat formatted).

Related branches

Changed in usb-creator (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Dimitri John Ledkov (xnox)
Revision history for this message
Yu Ning (yuningdodo) wrote :

I can reproduce this issue in my side, and the backtrace is the same with bug #1305020

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

In my case the backtrace was "AttributeError: 'NoneType' object has no attribute 'get_cached_property'" (bug #1307622) in the case of no partition table, and it changed to the same backtrace as bug #1305020 after I added a (DOS) partition table: bug #1307627

Ara Pulido (ara)
Changed in oem-priority:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package usb-creator - 0.2.60

---------------
usb-creator (0.2.60) utopic; urgency=medium

  * Correctly detect partition-table less parent devices.
  * Rescan partitions, after creating fresh partition table.
  * Ignore errors from synchronisations after wipefs calls. (LP: #1300361)
  * Allow operation over loop devices, for ease of testing.
 -- Dimitri John Ledkov <email address hidden> Fri, 25 Jul 2014 14:22:02 +0100

Changed in usb-creator (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Ara Pulido (ara) wrote :

Can we have this fix SRUed in Trusty, please?

Changed in oem-priority:
status: Triaged → In Progress
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 1300361] Re: cannot format when no partition table is present

On 30 July 2014 15:54, Ara Pulido <email address hidden> wrote:
> Can we have this fix SRUed in Trusty, please?
>

It's fixed for me, but please do test it on up-to-date usb-creator &
udisks2 on utopic.

And one of certification and/or sustaining engineers would need to
handle SRUs for the above two patches / packages, as I will not have
time to complete them by end of next week. I'm happy to review &
sponsor SRUs if someone prepares them.

--
Regards,

Dimitri.

Revision history for this message
Launchpad Janitor (janitor) wrote : Re: cannot format when no partition table is present

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in usb-creator (Ubuntu Trusty):
status: New → Confirmed
Revision history for this message
Yu Ning (yuningdodo) wrote :

I am attempt to backport Dimitri's patches to trusty. His patches are for usb-creator and udisks2, the udisks2 patch was already reverted in utopic, so I didn't backport it; and with the usb-creator patch only, the issue still can be reproduced. Could anyone help to verify if the issue is still fixed in utopic?

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Yu: I'm not sure so this is pure guessing, but bug #1059872 mentions another package, util-linux, in a related problem that has a fix in utopic but not yet in trusty. Of course, the whole new util-linux can't be SRU:d to trusty, but I wonder if that single fix "wipefs properly cleans up fs signatures" could be found, and would it help with this?

Or maybe there's something else in https://code.launchpad.net/~usb-creator-hackers/usb-creator/trunk needed that hasn't been backported to trusty, since there are quite many commits.

Revision history for this message
Yu Ning (yuningdodo) wrote :

@Timo, thanks for the reminder, let me check if I can locate and backport the util-linux patch.

Revision history for this message
Yu Ning (yuningdodo) wrote :

I verified with utopic, this issue is still reproduced with usb-creator 0.2.62 (as well as latest udisks2, util-linux, etc.).

Revision history for this message
Yu Ning (yuningdodo) wrote :

I have proposed a patch which should fix this issue:
https://code.launchpad.net/~yuningdodo/usb-creator/usb-creator.lp1361474+lp1300361-recreate-udisks-client/+merge/232693

Will anyone give it a try?

Revision history for this message
Yu Ning (yuningdodo) wrote :

Anyway, I think the util-linux patches are necessary for this bug, otherwise it will popup the timed out error.

Revision history for this message
Yu Ning (yuningdodo) wrote :

Hi, I have proposed two patches for this issue on trusty:

https://code.launchpad.net/~yuningdodo/ubuntu/trusty/usb-creator/usb-creator.lp1361474+lp1300361-recreate-udisks-client/+merge/232852
https://code.launchpad.net/~yuningdodo/ubuntu/trusty/util-linux/util-linux.backport-utopic-2.25-8ubuntu1/+merge/232848

With these two patches I can erase the usb stick successfully in below situations on trusty:
1. dos partition table and at least one partition
2. dos partition table without any partition
3. no partition table

For anyone who would like to give them a try, please refer to bug #1059872 comment #49 on how to build the backported util-linux.

Changed in usb-creator (Ubuntu Trusty):
importance: Undecided → High
description: updated
summary: - cannot format when no partition table is present
+ [SRU] cannot format when no partition table is present
Changed in usb-creator (Ubuntu Trusty):
assignee: nobody → Yu Ning (yuningdodo)
status: Confirmed → In Progress
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Dimitri, or anyone else affected,

Accepted usb-creator into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/usb-creator/0.2.56.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in usb-creator (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Yu Ning (yuningdodo) wrote :

I made some tests on trusty with usb-creator-{common,gtk} 0.2.56.3.

1. create a usbstick with no partition table
2. erase it with usb-creator-gtk

I can erase it without popup error, but after the erasing it prompt "There is not enough free space for this image." and the "Make Startup Disk" button is inactivated. But if I erase it again now the prompt disappears and the button is activated, and I can burn the ISO image successfully.

So I think the issue is properly fixed. I'll update the tags for Trusty.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package usb-creator - 0.2.56.3

---------------
usb-creator (0.2.56.3) trusty-proposed; urgency=medium

  [ Brian Murray ]
  * udisks/backend.py: fix some calls to mount_sync that were missed in the
    port to the UDisks2 API. Thanks to Marc Culler for the patch.
    (LP: #1279987)

  [ Yu Ning ]
  * usb-creator-helper: use parent object only if there is a parent.
    (LP: #1380041)
  * usb-creator-helper: re-create the udisks client otherwise it will not
    return the newly created device or partition. (LP: #1361474, #1300361)
  * usb-creator-helper: use parted instead of udisks2 to create the new
    partition table since udisks2 uses wipefs to erase the old partition
    table, however partition table erasing is not supported in wipefs yet in
    trusty, and that would cause a timed out error.
 -- Brian Murray <email address hidden> Thu, 18 Dec 2014 14:48:14 -0800

Changed in usb-creator (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for usb-creator has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Ara Pulido (ara)
Changed in oem-priority:
status: In Progress → 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.