This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDE Partition Manager keeps crashing

Tags: None
(comma "," separated)
void97
Registered Member
Posts
24
Karma
0

KDE Partition Manager keeps crashing

Sat Apr 15, 2017 10:54 am
Hi,
I'm currently running KDE Neon 5.9.4 Developer Edition Stable. Since 12th April updates, KDE Partition Manager keeps crashing after password prompt. The strange thing is that after the crash it asks me to run Partition Manager without root privileges and it works, but obviously it's useless since I can do nothing without root privileges.
Any ideas?
NoNameNoBlame
Karma
0
Short answer:

Graphical PartitionTable-Editors are generally not trustworthy.
At least, they mostly lack good documentation.
And they do not tell, what they do, exactly.

Always use command line, if at all possible.


$ mount | grep '/ '
/dev/sdb4 on / type btrfs (rw,noatime,nossd,space_cache,subvolid=257,subvol=/@)


$ sudo gdisk -l /dev/sdb
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 732558336 sectors, 2.7 TiB
Logical sector size: 4096 bytes
Disk identifier (GUID): 14D1485B-1976-4CE8-916F-B031FAC89E8B
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 732558330
Partitions will be aligned on 256-sector boundaries
Total free space is 292028402 sectors (1.1 TiB)

Number Start (sector) End (sector) Size Code Name
1 256 128256 500.0 MiB EF00 ESP GrUB
2 128512 268563968 1024.0 GiB 8300 Debian BlockDevice
3 268564224 272758528 16.0 GiB 8200 Linux swap
4 272758784 406976511 512.0 GiB 8300 KDE neon BlockDevice
5 406976512 440530943 128.0 GiB A600 OpenBSD disklabel

Even if there was no crash, I'd not recommend any graphical partitioner,
if avoidable.
void97
Registered Member
Posts
24
Karma
0
Didn't know that. Then I'll use command line tools, at least for now.
Thanks.
tosky
Registered Member
Posts
210
Karma
3
I don't know the reason of the crash (but you can check the logs of apt in that date to see what has been updated).

I have to answer about the graphical tools, because the comment before is unfair and untrue. Unfair for all the people working on tools which works. Untrue because they do work (the venerable graphical installer with partitioner of Mandrake Linux helped tons of time, and gparted too).
If partitionmanager is not working for now (locally, in that environment), you can surely try gparted.


tosky, proud to be a member of KDE forums since 2008-Oct.
NoNameNoBlame
Karma
0
It's not a question of fairness to the developers.

Those are my/Your data. They represent hours of life time.
and big amounts of money.

Sometimes, You can't use graphical interfaces
(because they crash, for example).
Or Your graphics driver is broken totally.
Then You have to know the command line, anyway.


If You are a consumer with easy reproduceable
entertainment content (movies and music for the masses),
then the risk is smaller. But business…?
Lawyers? Banks? Hospitals?

Every additional (graphical) layer
on top of (non-graphical) functionality -
every additional layer - is an additional,
avoidable possible point-of-failure.

There are lots of reason, to be grateful for the
efforts of developers of graphical partitioners.

If You lack partioning knowledge, go ahead and
use them. These tools are made for You by friendly programmers.

But when Your partitioning application CRASHES during
partitioning: Kiss Your data GoodBye.

If You answer: Well… make backups!
Yes, but not everyone has them.
Not everyone has them immediately available.
And even if: They can take a very long time to
restore.

And Your employer, customer (or wife) is waiting…

Why taking the risk, if it's avoidable in the first place?
User avatar
stikonas
KDE Developer
Posts
7
Karma
0
OS
void97 wrote:Hi,
I'm currently running KDE Neon 5.9.4 Developer Edition Stable. Since 12th April updates, KDE Partition Manager keeps crashing after password prompt. The strange thing is that after the crash it asks me to run Partition Manager without root privileges and it works, but obviously it's useless since I can do nothing without root privileges.
Any ideas?


It needs to be recompiled after ABI break in kpmcore. Developer edition builds are automatic, so stuff like this happens.

By the way NoNameNoBlame, even when you do partitioning manually without graphical tools you can easily mess up. Stuff like partition boundary calculations are much better done automatically, especially in more complicated cases like LUKS where you need to take into the account that LUKS header takes some space. And don't use developer edition for enterprise development! This bug does not happen in stable edition. In fact I can't imagine any reason for crash to happen during the operation except for underlying command line tool crash.

I'm not saying data eating bugs are impossible in graphical partition manager. They are possible but very rare. If it happens that data is lost due to a reproducible bug in graphical user interface then the fix would be released very quickly.
NoNameNoBlame
Karma
0
Dear stikonas!

Exactly 3 days after Your nice posting, my graphical KDE partitioner crashed
on KDE neon User Edition. While trying to partition a USB stick.

The USB stick seems bricked, somehow. It doesn't hold any partition tables
any more. It can be partitioned from the command line without errors. But
after exiting the 'gdisk' program, there's not data written on the stick, even
if 'gdisk' before told me, it had done so successfully.

But:
Command line 'gdisk' didn't crash.
Graphical 'KDE Partition Manager' crashed.
User avatar
stikonas
KDE Developer
Posts
7
Karma
0
OS
Well, if hardware is bricked I wouldn't be too surprised that Partition Manager crashes. It probably tries to do more than simple fdisk/gdisk. E.g. if it can't read sector size (maybe that's not the case if you usb stick) it would probably have it set to 0 and then crash somewhere upon division... But in case of bricked software it's not like fdisk will magically save it...

Well, if you post backtrace I can look at it...
NoNameNoBlame
Karma
0
Step 1: The Stick enters the USB-Port:
======================================

$ dmesg | tail -fn 20

[ 339.656062] usb 2-2: new high-speed USB device number 3 using ehci-pci
[ 339.808865] usb 2-2: New USB device found, idVendor=090c, idProduct=1000
[ 339.808868] usb 2-2: New USB device strings: Mfr=0, Product=2, SerialNumber=3
[ 339.808871] usb 2-2: Product: USB DISK
[ 339.808873] usb 2-2: SerialNumber: 16032211001185
[ 339.810080] usb-storage 2-2:1.0: USB Mass Storage device detected
[ 339.810296] scsi host7: usb-storage 2-2:1.0
[ 341.209595] scsi 7:0:0:0: Direct-Access PQ: 0 ANSI: 6
[ 341.210065] sd 7:0:0:0: Attached scsi generic sg3 type 0
[ 341.211784] sd 7:0:0:0: [sdc] 122880000 512-byte logical blocks: (62.9 GB/58.6 GiB)
[ 341.214925] sd 7:0:0:0: [sdc] Write Protect is off
[ 341.214928] sd 7:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 341.216935] sd 7:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 341.230921] sd 7:0:0:0: [sdc] Attached SCSI removable disk



Step 2: 'gdisk'-check:
======================

$ sudo gdisk -l /dev/sdc
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present

Creating new GPT entries.
Disk /dev/sdc: 122880000 sectors, 58.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): F60A5AD5-F0BB-4946-91AA-B23F7C3D297C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 122879966
Partitions will be aligned on 2048-sector boundaries
Total free space is 122879933 sectors (58.6 GiB)

Number Start (sector) End (sector) Size Code Name


Step 3: Starting 'KDE Partition Manager':


Step 4: State after successfully scanning of all devices:
$ ps -Ae f | command grep part | grep -v grep
3904 ? Sl 0:00 | \_ /usr/bin/partitionmanager
3907 ? Sl 0:00 | \_ /usr/lib/x86_64-linux-gnu/libexec/kf5/kdesu -c KDE_FULL_SESSION=true XDG_RUNTIME_DIR=/run/user/1000 /usr/bin/partitionmanager --dontsu
3922 ? Ss 0:00 | \_ sh -c KDE_FULL_SESSION=true XDG_RUNTIME_DIR=/run/user/1000 /usr/bin/partitionmanager --dontsu
3923 ? Sl 0:00 | \_ /usr/bin/partitionmanager --dontsu

a1)
Under 'Devices':
/dev/sdc selected

Under 'Partition':
/dev/sdc selected

RightClick-"Properties":
Shows: Logical and Physical sector size: 512 B

RightClick-'New Partition Table':
Partition Table Type selected: GPT

Afterwards: 'Apply Pending Operation'
Result: Success; followed by
automatic rescanning of devices

Message: No valid partition table was found on this device.

a2)
Repeat with MBR scheme:
Same result. partitionmanager reports success, but then:
Message: No valid partition table was found on this device.

#########################################################

No crash so far. Now, let the crashes begin…

#########################################################
# NEXT TEST: 2 Operations pending, instead of only one.

Same as before; plus:

New MaxSize Single Ext4 partition.
Result: 2 Pending operations.

Input: Apply
Output: _C_R_A_S_H_

*** THE END ***


'drkonqi'-Window:

Executable: partitionmanager PID: 3923 Signal: Aborted (6)

# (Compare: ProcessTable above)



######################################################################################

# GDB-runs start here:

# First Run until CRASH: First test: 'run' without 'bt':

$ gdb -q /usr/bin/partitionmanager
Reading symbols from /usr/bin/partitionmanager...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/partitionmanager
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe56a4700 (LWP 5486)]
[New Thread 0x7fffdc3c4700 (LWP 5487)]
org.kde.kdesu: Daemon not safe (not sgid), not using it.

QXcbConnection: XCB error: 3 (BadWindow), sequence: 787, resource id: 29372574, major code: 40 (TranslateCoords), minor code: 0
[New Thread 0x7fffce5c2700 (LWP 5650)]
[New Thread 0x7fffce5c2700 (LWP 5651)]
[Thread 0x7fffce5c2700 (LWP 5650) exited]
[New Thread 0x7fffc9dc0700 (LWP 5652)]
[New Thread 0x7fffb3bf3700 (LWP 5653)]
[Thread 0x7fffb3bf3700 (LWP 5653) exited]
[Thread 0x7fffc9dc0700 (LWP 5652) exited]
[Thread 0x7fffce5c2700 (LWP 5651) exited]
[Thread 0x7fffe56a4700 (LWP 5486) exited]
[Thread 0x7fffdc3c4700 (LWP 5487) exited]
[Inferior 1 (process 5478) exited normally]
(gdb) quit

##############################################

# Install debugging symbols:

$ dpkg -S /usr/bin/partitionmanager
partitionmanager: /usr/bin/partitionmanager

# apt install partitionmanager-dbgsym

REPEAT:

############################################

# Second 'run' (this time with 'bt')

$ gdb -q /usr/bin/partitionmanager
Reading symbols from /usr/bin/partitionmanager...Reading symbols from /usr/lib/debug/.build-id/d4/a13092e097ef403c980077cd5a2af7517ef93b.debug...done.
done.
(gdb) bt
No stack.
(gdb) run
Starting program: /usr/bin/partitionmanager
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe56a4700 (LWP 8121)]
[New Thread 0x7fffdc3c4700 (LWP 8122)]
org.kde.kdesu: Daemon not safe (not sgid), not using it.

[New Thread 0x7fffce5c2700 (LWP 8282)]
[Thread 0x7fffce5c2700 (LWP 8282) exited]
[New Thread 0x7fffce5c2700 (LWP 8283)]
[New Thread 0x7fffcddc1700 (LWP 8284)]
[New Thread 0x7fffb3bf3700 (LWP 8285)]
[Thread 0x7fffcddc1700 (LWP 8284) exited]
[Thread 0x7fffb3bf3700 (LWP 8285) exited]
[Thread 0x7fffce5c2700 (LWP 8283) exited]
[Thread 0x7fffe56a4700 (LWP 8121) exited]
[Thread 0x7fffdc3c4700 (LWP 8122) exited]
[Inferior 1 (process 8117) exited normally]
(gdb) quit

#############################################################

Begin of most important part

#############################################################

# Third Run:

# Again: With 'sudo', this time:

$ sudo gdb -q /usr/bin/partitionmanager
[sudo] password for <normal_user>:
Reading symbols from /usr/bin/partitionmanager...Reading symbols from /usr/lib/debug/.build-id/d4/a13092e097ef403c980077cd5a2af7517ef93b.debug...done.
done.
(gdb) bt
No stack.
(gdb) run
Starting program: /usr/bin/partitionmanager
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe56a4700 (LWP 8457)]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Loaded backend plugin: "pmlibpartedbackendplugin"
[New Thread 0x7fffdf51b700 (LWP 8458)]
"Using backend plugin: pmlibpartedbackendplugin (1)"
"Scanning devices..."
[New Thread 0x7fffde0f1700 (LWP 8533)]
"Device found: WD Elements 107C"
"Partition ‘/dev/sdb1’ is not properly aligned (first sector: 256, modulo: 256)."
"Partition ‘/dev/sdb1’ is not properly aligned (last sector: 128256, modulo: 1281)."
"Partition ‘/dev/sdb2’ is not properly aligned (first sector: 128512, modulo: 1536)."
"Partition ‘/dev/sdb2’ is not properly aligned (last sector: 268563968, modulo: 1537)."
"Partition ‘/dev/sdb3’ is not properly aligned (first sector: 268564224, modulo: 1792)."
"Partition ‘/dev/sdb3’ is not properly aligned (last sector: 272758528, modulo: 1793)."
"Device found: "
getting smart status failed for "/dev/sdc" : Operation not supported
"LibParted Exception: /dev/sdc: unrecognised disk label"
"Device found: ATA WDC WD6400AAKS-4"
"Partition ‘/dev/sda1’ is not properly aligned (first sector: 40, modulo: 40)."
"Partition ‘/dev/sda1’ is not properly aligned (last sector: 409639, modulo: 40)."
"Partition ‘/dev/sda2’ is not properly aligned (first sector: 409640, modulo: 40)."
"Partition ‘/dev/sda2’ is not properly aligned (last sector: 901337895, modulo: 808)."
"Partition ‘/dev/sda3’ is not properly aligned (first sector: 901337896, modulo: 808)."
"Partition ‘/dev/sda3’ is not properly aligned (last sector: 902607431, modulo: 584)."
[Thread 0x7fffde0f1700 (LWP 8533) exited]
"Scan finished."
"Add operation: Create a new partition table (type: gpt) on ‘/dev/sdc’"
"Add operation: Create a new partition (58,58 GiB, ext4) on ‘/dev/sdc’"
[New Thread 0x7fffde0f1700 (LWP 8578)]
[New Thread 0x7fffde0f1700 (LWP 8579)]
[Thread 0x7fffde0f1700 (LWP 8578) exited]
[New Thread 0x7fffc6702700 (LWP 8580)]
[New Thread 0x7fffc417e700 (LWP 8581)]
[Thread 0x7fffc417e700 (LWP 8581) exited]
[Thread 0x7fffc6702700 (LWP 8580) exited]
"Applying operations..."
[New Thread 0x7fffc4d7f700 (LWP 8582)]
Backtrace has 10 calls on stack:
10: /lib/x86_64-linux-gnu/libparted.so.2(ped_assert+0x44) [0x7fffdf77fea4]
9: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_destroy+0x41) [0x7fffdf782bf1]
8: /usr/lib/x86_64-linux-gnu/qt5/plugins/libpmlibpartedbackendplugin.so(+0xa357) [0x7fffdfbe2357]
7: /usr/lib/x86_64-linux-gnu/qt5/plugins/libpmlibpartedbackendplugin.so(+0x9f59) [0x7fffdfbe1f59]
6: /usr/lib/x86_64-linux-gnu/libkpmcore.so.4(+0x93ef8) [0x7ffff794bef8]
5: /usr/lib/x86_64-linux-gnu/libkpmcore.so.4(_ZN9Operation7executeER6Report+0xd9) [0x7ffff79399a9]
4: /usr/lib/x86_64-linux-gnu/libkpmcore.so.4(_ZN15OperationRunner3runEv+0x1d7) [0x7ffff7921bf7]
3: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0xaeb48) [0x7ffff472db48]
2: /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7ffff10c86ba]
1: /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7ffff403a82d]

Thread 9 "m_OperationRunn" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffc4d7f700 (LWP 8582)]
0x00007ffff3f69428 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb)

# ProgressBar hangs at: "20%" of:
# [Create a new partition table (type: gpt) on '/dev/sdc']
# Cancel Button can't be pressed/doesn't react.
# Window can be moved, but on pressing window frame's
# CloseWindow Button, new window appears:
#

Application "partitionmanager" is not responding
You tried to close window "Create a new partition table (type: gpt) on ‘/dev/sdc’ — KDE Partition Manager" from application "partitionmanager" (Process ID: 8453) but the application is not responding.
Do you want to terminate this application?

#
# Because GDB has already fallen back to its '(gdb)'-prompt,
# I select 'Terminate Application partitionmanager'
# But nothing gets terminated.
# Therefore, I shoot it down by quitting GDB.


#####################################
End of most important part
#####################################




By the way, the messages about 'not properly aligned' partitions
are the result of Apple's disk utilities.
If I had done it myself manually, this nonsense wouldn't exist.

###########################################

Those were 3 reliably reproducable crashes one after
the other. Enough for today…

That's all. Hope it helps any developer(s).

User avatar
stikonas
KDE Developer
Posts
7
Karma
0
OS
Hmm, looks like crash happens somewhere in parted, so not really GUIs fault. I gave them this link but I suspect parted would just say that it's hardware fault... I think I had some similar situation before.
NoNameNoBlame
Karma
0
Thanks a lot for Your most friendly attention!

Even if there is a hardware defect at the bottom:

It looks like incomplete error-handling to me.
That's the developers' responsibility.
It can't be shifted onto faulty hardware.

Besides: How should a normal user know this true cause?

In addition: It's their program that crashes. They
will get the complaints.

I think, they will be motivated to become active
in fixing this.

Thanks, again!
User avatar
stikonas
KDE Developer
Posts
7
Karma
0
OS
Yeah, I understand. But unfortunately when crash happens in the library (in this case libparted) there is nothing that GUI can do. It cannot stop the crash from happening and show error message. I don't know why library does something this ugly. Well but stuff like that happens... Sometimes there are nasty crash bugs inside Qt or GTK libraries too.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]