2x100% CPU and memory usage growth when performing partition modifications via udisks

Bug #689593 reported by Delan Azabani
166
This bug affects 49 people
Affects Status Importance Assigned to Milestone
udisks
Confirmed
Critical
udisks (Ubuntu)
Incomplete
Medium
Unassigned

Bug Description

When unsetting the bootable flag on a partition using palimpsest, the following things happen:

- udisks-helper-modify-partition and udisks-daemon processes use 100% CPU each
- udisks-daemon chews about 18MiB of memory each second

This problem exists regardless of whether the partition is mounted or not.

natty
gnome-disk-utility 2.32.1-0ubuntu3
udisks 1.0.2-1

Robert Roth (evfool)
affects: ubuntu → gnome-disk-utility (Ubuntu)
Revision history for this message
David Beswick (dlbeswick) wrote :

Hi, I also just suffered this problem in Natty. Memory usage peaked at over 12gb virtual and the operation lasted for over 10 minutes. The memory situation resolved after this time with the udisks-daemon process ending, but palimpsest indicates that it's still waiting for the bootable flag operation to complete by the spinning circles in the partition. The partition was mounted at the time. I was trying to invert the bootable flag state, i.e. for device sdb1 to have 'bootable', and for device sb2 to not have the flag.

david@desktop:~$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot Start End Blocks Id System
/dev/sdb1 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdb2 * 13 14594 117115904 7 HPFS/NTFS

Linux desktop 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Changed in gnome-disk-utility (Ubuntu):
status: New → Confirmed
Revision history for this message
Nedenom (nedenom) wrote :

I have the same problem with an USB stick in 12.04, trying to unset the bootable flag.

Revision history for this message
Reuben Thomas (rrt) wrote :

Same here in 12.10, when using Startup Disk Creator.

Revision history for this message
Reuben Thomas (rrt) wrote :

By the way, not even a comment from an Ubuntu maintainer for 2 years, and yet using Startup Disk Creator is the official way to create install media. Imagine the scenario which must've happened more than once:

Ubuntu Enthusiast: Here, I'll make you a USB stick so you can try it…wait…oh, my computer's frozen!
Potential Ubuntu user: Thanks, I'll stick with Windows/Mac OS.
[optional: Ubuntu Enthusiast: Yeah, I think I might switch back.]

Revision history for this message
Otus (jan-varho) wrote :

I have this in 12.10. When I try to erase the USB with Startup Disk Creator, the two threads start using 100% CPU each and balloon to tens of gigabytes of memory in a matter of minutes.

I've stored the raw usb disk contents (dd if=/dev/sdc) in case that's helpful to a developer, but it's 8GB so I won't store it forever and can't host it anywhere accessible over the internet.

Revision history for this message
Andrew (andrewkvalheim) wrote :

In case it's of use, I've also captured an image of my SanDisk SDCZ40-016G immediately after encountering this bug when trying to install ubuntu-13.04-beta2-desktop-amd64.iso using Startup Disk Creator in Ubuntu 12.10. The image is 1.6 GB compressed. Let me know if you need a copy.

Max Bowsher (maxb)
summary: - 2x100% CPU and memory usage growth when setting bootable flag in
- palimpsest
+ 2x100% CPU and memory usage growth when performing partition
+ modifications via udisks
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in usb-creator (Ubuntu):
status: New → Confirmed
Revision history for this message
Janne Savikko (jsavikko) wrote :

I stumbled upon this bug when erasing USB-key with Startup Disk Creator, and found out following:

These commands consume 100% CPU:
/usr/lib/udisks/udisks-daemon
udisks-helper-modify-partition /dev/sdb 1048576 7962886144 0x0c boot

When stracing processes of those commands, both are stuck printing couple of strings over and over again:
"Error: Can't have a partition outside the disk!\nnew_size=7962886144 but resulting size, 7961022464, smaller than requested\n"

I'll be happy to provide more information if needed.

Revision history for this message
midenok (midenok) wrote :
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

  1) hmm ok; so how many of you still have this old bug
  2) and can any of you trigger it either on 13.10 or 12.04 ?
  3) Does it only happen with some thumb drives or does it happen to any drive you try this with?

Dave

no longer affects: gnome-disk-utility (Ubuntu)
no longer affects: usb-creator (Ubuntu)
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Flipped to the ubuntu udisks package since that's what's hanging.

Changed in udisks (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Øyvind Stegard (oyvindstegard) wrote :

Just got hit by this exact problem when trying to erase a USB drive using startup disk creator in Ubuntu 13.04.

ID 0781:5406 SanDisk Corp. Cruzer Micro U3 (4GB)

(And I've seen it several times before as well, but just assumed the bug would get fixed eventually and haven't bothered looking into it.)

Revision history for this message
Øyvind Stegard (oyvindstegard) wrote :

I erased existing FAT32 partition on USB drive with fdisk, and that allowed me to successfully transfer a Ubuntu 13.10 image to the drive using startup disk creator.

Revision history for this message
midenok (midenok) wrote :
Revision history for this message
In , midenok (midenok) wrote :

Affected version: 1.0.4-8

Investigation:

https://github.com/midenok/linux/issues/2

Changed in udisks:
importance: Undecided → Unknown
status: New → Unknown
Revision history for this message
midenok (midenok) wrote :

Btw, it *does* affect every related utility (including usb-creator, gnome-disk-utility).

Changed in udisks:
importance: Unknown → Critical
status: Unknown → Confirmed
Revision history for this message
midenok (midenok) wrote :

Everyone, please ask upstream author to fix it. Otherwise, we can wait for years.

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.