Partitions display wrong in gnome -disks - ok in gparted

Bug #1641308 reported by hockenberry on 2016-11-12
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
High
Colin Watson
Xenial
High
Unassigned
Bionic
High
Unassigned

Bug Description

The partitions displayed by gnome-disk-utility are wrong. When i use gparted the partitions displayed are correct.

The display became wrong after i deleted 1 partition from the disk using gnome-disk-utility.

Here is a screenshot of the 2 tools vision of the same disk:
http://pasteboard.co/PjWpqeNzi.png

Here is the fdisk:
hippo@hippo-camp:~$ sudo fdisk -l
[sudo] password for hippo:
Disk /dev/sdc: 465,8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1c0966b0

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 63 758587953 758587891 361,7G 7 HPFS/NTFS/exFAT
/dev/sdc3 758589438 903041023 144451586 68,9G 5 Extended
/dev/sdc5 758589440 903041023 144451584 68,9G 83 Linux

hippo@hippo-camp:~$ lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04

gnome-disk-utility:
  Installed: 3.18.3.1-1ubuntu1
  Candidate: 3.18.3.1-1ubuntu1
  Version table:
 *** 3.18.3.1-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

gparted:
  Installed: 0.25.0-1
  Candidate: 0.25.0-1
  Version table:
 *** 0.25.0-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

I get *very nervous* when tools that have write access to partitions can't display them properly.

Good hunt
Matt

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: gnome-disk-utility 3.18.3.1-1ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-47.68-generic 4.4.24
Uname: Linux 4.4.0-47-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Nov 12 12:16:39 2016
ExecutablePath: /usr/bin/gnome-disks
InstallationDate: Installed on 2016-10-11 (31 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: gnome-disk-utility
UpgradeStatus: No upgrade log present (probably fresh install)

hockenberry (hockenberry32) wrote :
hockenberry (hockenberry32) wrote :

After initial reporting: i close the app and relaunch it, same problem, partitions are still wrongly displayed in disks.

hockenberry (hockenberry32) wrote :

Relaunching the app does not solve the issue but rebooting does:
https://dl.dropboxusercontent.com/u/1307844/ubuntu_bug_disks2.png

Launchpad Janitor (janitor) wrote :

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

Changed in gnome-disk-utility (Ubuntu):
status: New → Confirmed
kurac palac (ko-te-jebe) wrote :

Same thing here + regular crashing when executing commands (format, SMART, disk imaging)

description: updated
description: updated
hockenberry (hockenberry32) wrote :

i fixed the broken link in the original post (dropbox has decided to break things without notice to the user...), welcome pasteboard.co!

hockenberry (hockenberry32) wrote :
hockenberry (hockenberry32) wrote :
hockenberry (hockenberry32) wrote :
Changed in gnome-disk-utility (Ubuntu):
importance: Undecided → High

17.10 still happening

kurac palac (ko-te-jebe) wrote :

Why is still no one assigned to this?

Jerzy Orlowski (jerzyorlowski) wrote :

I have the same problem. I have an encryoted partition on extended volume and I cannot manage it. gnome-disks does not work (shows free space). Gparted does not suppport modifying encrypted disks.

Francis Chin (chinf) wrote :

I see a similar problem with incorrect partition information in gnome-disk-utility. I am not sure if it's exactly the same as the OP's issue as in my case the problem is solely triggered by running GParted, and not by the deletion/modification of partitions as mentioned by the OP.

I suspect that GParted is somehow causing udisks2 to report incorrect information. Running "udisksctl info -b /dev/<partition device>" for the extended partition (the one that's incorrectly displayed by gnome-disk-utility) - shows the Block object's Size is 0 instead of 1024 and "IsContainer" value is false instead of true. Rebooting restores the values to be correct.

If the OP is still around and can confirm that udisksctl also shows incorrect partition data in their case, then perhaps this bug would be better assigned to the udisks2 package rather than gnome-disk-utility (there is an upstream bug tracker in Gitlab for the latter in any case).

My testing so far has only been on 16.04; there is a newer udisks2 packaged with 18.04 onwards, so if time permits I'll try and replicate this there too.

hockenberry (hockenberry32) wrote :

OP here, unfortunately I changed my PC since reporting this bug and further testing would be irrevelant. Not sure what you mention is similar though. My issue was with the gnome disk utility, gparted worked perfectly.

Francis Chin (chinf) wrote :

I've tested with 18.04 and the newer udisks also shows the same behaviour.

From further digging I've found that there is an open issue for a udisks partition property loss bug which seems to be an exact match at https://github.com/storaged-project/udisks/issues/425

Francis Chin (chinf) wrote :

Re: comment #14: I never said GParted wasn't working - I said that in my case running GParted was causing Disks (gnome-disk-utility) to show buggy behaviour.

From reading the udisks2 issue, the problem seems to do with the udev change event that's triggered either by running GParted or making partition changes using gnome-disk-utility, so our cases may have the same root cause. Running "udevadm info <partition device>" before and after the triggering action also shows the loss of partition info for me.

Perhaps udev is the next place to look, as per udisks issue 425?

Bougron (francis-bougron) wrote :

Hello
tested today with DAILLY COSMIC!!!!

The partitions displayed by gnome-disk-utility are good the first time.

But stopping gnone-disk-utility, and using gparted ONLY to SEE and stopping it.
then reusing gnomme-dish-utility show that extended partition shows that the extended partition has disappeared.

Bougron (francis-bougron) wrote :

Of course, it is DAILY DISCO (19.04), See sncreemshot.

Vincent Raspal (vinraspa) wrote :

Hello.
I have the same problem on both ubuntu 16.04 and 18.10.
The problem appeared after removing a logical partition from and extended.

* The extended partition is correctly displayed in gnome-disk-utility after system start up
* The extended partition does not show anymore in gnome-disk-utility after gparted is launched (until next startup).
* The extended partition does not show anymore in gnome-disk-utility after creating then removing a new logical partition in gnome-disk-utility (until next startup).
* The extended partition is correctly displayed in gparted.

Sancho (san.san) wrote :

Hi,
I'm on Cinnamon Mint 19.0 / 19.1 and have the same problem:
After starting GParted once, the partition info for GNOME Disks (extended partition only) is permanently lost, even without any action in GParted.
The corruption shows the extended partition empty, but it is not.
Also see https://gitlab.gnome.org/GNOME/gparted/issues/33
Please, it's time to move!

Sebastien Bacher (seb128) wrote :

Thanks for the comment here, it would make more sense to write your finding on the upstream report though since Ubuntu doesn't have a dedicated udisk/gdu maintainer and it's more likely that the info are useful upstream

Sancho (san.san) wrote :

Even if it would, I (n00b) don't know what you mean by "upstream".
In Debian they still have serious udisks probs with add-, change-, update events (#571, 572, 573, 574, 581, 613), but I fail to see the context to simply opening GParted.
And I don't gitMi$o, sorry.

pothos (pothos) wrote :

Found the problem: The Debian source for the libparted package does not include the patch introduced by commit c6dc6e5d in 2015 (No official parted release since 2014, so picking commits is unfortunately needed).

Colin Watson (cjwatson) on 2019-04-15
affects: gnome-disk-utility (Ubuntu) → parted (Ubuntu)
Colin Watson (cjwatson) on 2019-04-15
Changed in parted (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → Colin Watson (cjwatson)
hockenberry (hockenberry32) wrote :

OP here. When I see this thread I wonder how a gnome-disk problem can become a parted one. Did anyone read my bug report???

Colin Watson (cjwatson) wrote :

@hockenberry32: I don't think your sarcasm is warranted. gnome-disks uses udisks2, which uses libblockdev, which uses libparted. I confirmed gnome-disks misbehaviour with extended partitions that was fixed by cherry-picking the parted fix mentioned in comment #23.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package parted - 3.2-25

---------------
parted (3.2-25) unstable; urgency=medium

  * Cherry-pick from upstream:
    - libparted: BLKPG_RESIZE_PARTITION uses bytes, not sectors (closes:
      #926735, LP: #1641308).

 -- Colin Watson <email address hidden> Mon, 15 Apr 2019 15:38:11 +0100

Changed in parted (Ubuntu):
status: Fix Committed → Fix Released
Colin Watson (cjwatson) on 2019-04-16
Changed in parted (Ubuntu Xenial):
importance: Undecided → High
Changed in parted (Ubuntu Bionic):
importance: Undecided → High
Changed in parted (Ubuntu Xenial):
status: New → Triaged
Changed in parted (Ubuntu Bionic):
status: New → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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