Bug 370384 - KDE Partition Manager crashes while starting up
Summary: KDE Partition Manager crashes while starting up
Status: RESOLVED NOT A BUG
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2016-10-10 00:32 UTC by Clinton
Modified: 2016-10-26 12:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
output of lsblk command (1.21 KB, text/plain)
2016-10-19 08:40 UTC, Vishal Rao
Details
fdisk -l output (4.33 KB, text/plain)
2016-10-22 20:01 UTC, Ben Klopfenstein
Details
Additional backtrace output (7.41 KB, text/plain)
2016-10-22 20:03 UTC, Ben Klopfenstein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Clinton 2016-10-10 00:32:06 UTC
Application: partitionmanager (2.2.1)

Qt Version: 5.7.0
Frameworks Version: 5.27.0
Operating System: Linux 4.4.0-38-generic x86_64
Distribution: KDE neon User Edition 5.8

-- Information about the crash:
- What I was doing when the application crashed: Every trime I try to start it, the initial dialog box which shows the progress of each drive being found crashes just before completion.

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Partition Manager (partitionmanager), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fe2a88b9940 (LWP 5800))]

Thread 5 (Thread 0x7fe28f7fe700 (LWP 5882)):
#0  0x00007fe2b2c28e8d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fe2ae6a239c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe2ae6a2722 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe294719916 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fe2ae6c8bc5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fe2afede6fa in start_thread (arg=0x7fe28f7fe700) at pthread_create.c:333
#6  0x00007fe2b2c34b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7fe28ffff700 (LWP 5881)):
#0  0x00007fe2b2c28e8d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fe2ae6a239c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe2ae6a24ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe2ae6a24e9 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fe2ae6c8bc5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fe2afede6fa in start_thread (arg=0x7fe28ffff700) at pthread_create.c:333
#6  0x00007fe2b2c34b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fe29cffd700 (LWP 5878)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fe29e76a213 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#2  0x00007fe29e769937 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#3  0x00007fe2afede6fa in start_thread (arg=0x7fe29cffd700) at pthread_create.c:333
#4  0x00007fe2b2c34b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fe29ffff700 (LWP 5802)):
#0  0x00007fe2ae6e6ac9 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fe2ae6a1b51 in g_main_context_query () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe2ae6a2317 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe2ae6a24ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fe2b355323b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe2b34fdcea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe2b3322fb4 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fe2b17c47a5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007fe2b3327b98 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fe2afede6fa in start_thread (arg=0x7fe29ffff700) at pthread_create.c:333
#10 0x00007fe2b2c34b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fe2a88b9940 (LWP 5800)):
[KCrash Handler]
#4  0x00007fe2b33ae37c in QString::operator=(QString const&) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x000000000044e8a9 in ListDeviceWidgetItem::ListDeviceWidgetItem (d=..., this=0x229ee00) at /workspace/build/src/gui/listdevices.cpp:32
#6  ListDevices::updateDevices (this=0x232ae40, devices=...) at /workspace/build/src/gui/listdevices.cpp:57
#7  0x000000000045294a in MainWindow::on_m_OperationStack_devicesChanged (this=0x2298b90) at /workspace/build/src/gui/mainwindow.cpp:623
#8  0x0000000000484885 in MainWindow::qt_metacall (this=0x2298b90, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fe290040c40) at /workspace/build/obj-x86_64-linux-gnu/src/moc_mainwindow.cpp:197
#9  0x00007fe2b352ba19 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fe2b3e3258b in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007fe2b3f2f4cb in QMainWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007fe2b5f0c1e7 in KMainWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libKF5XmlGui.so.5
#13 0x00007fe2b5f50825 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libKF5XmlGui.so.5
#14 0x00007fe2b3deb89c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007fe2b3df3296 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007fe2b34ffcf8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fe2b35023bb in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007fe2b3552e13 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007fe2ae6a21a7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007fe2ae6a2400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fe2ae6a24ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007fe2b355321f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007fe2b34fdcea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007fe2b35062fc in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x0000000000428400 in main (argc=1, argv=<optimized out>) at /workspace/build/src/main.cpp:95

Reported using DrKonqi
Comment 1 Andrius Štikonas 2016-10-16 15:21:04 UTC
I can't reproduce this on Neon User Edition running on VirtualBox. Can you provide any more info? What devices or partitions are there?
Comment 2 Vishal Rao 2016-10-19 08:40:06 UTC
Created attachment 101641 [details]
output of lsblk command
Comment 3 Vishal Rao 2016-10-19 08:40:43 UTC
I faced the same issue. I have Neon 5.8 dev unstable edition, same backtrace as original reporter's. I have a SATA SSD, an NVMe m.2 SSD, an HDD, an external USB HDD, and a USB pen drive plugged in, was trying to format the pen drive when came across this issue.

Attaching output of my lsblk command, let me know if anything further required.
Comment 4 Vishal Rao 2016-10-19 13:53:17 UTC
Correction to my previous comment "was trying to format the pen drive when came across this issue" - I didn't write correct - I meant to say I also faced this issue during startup of partition manager, when it scans the devices, it lists my devices and not sure if this is important but when it reaches my /dev/nvme0n1 is when the crash happens.

Any system info I can provide? What commands to run and post output that would help?
Comment 5 Vishal Rao 2016-10-19 13:57:15 UTC
Output of running "sudo fdisk -l" minus the snipped sections of /dev/ramX items: https://paste.kde.org/p1fbzr2po
Comment 6 Andrius Štikonas 2016-10-19 13:59:38 UTC
(In reply to Vishal Rao from comment #4)
> Correction to my previous comment "was trying to format the pen drive when
> came across this issue" - I didn't write correct - I meant to say I also
> faced this issue during startup of partition manager, when it scans the
> devices, it lists my devices and not sure if this is important but when it
> reaches my /dev/nvme0n1 is when the crash happens.
> 
> Any system info I can provide? What commands to run and post output that
> would help?

Ok, knowing it might crash on nvme might be useful. I'll try to think how I can reproduce it, need to find a way to add nvme device to virtual machine since I don't have any nvme devices. But I won't be able to find time for that till weekend at the very least...
Comment 7 Ben Klopfenstein 2016-10-22 20:01:06 UTC
Created attachment 101708 [details]
fdisk -l output

I've also encountered this crash, but I've got only 2 disks installed, and one is an SD card (on which i'm running Neon). I don't have any nvme devices - only an m.2 drive with Windows and associated default OS partitions on it (sda), and the SD card with a generic Neon install (sdb).

attached fdisk -l output
Comment 8 Ben Klopfenstein 2016-10-22 20:03:33 UTC
Created attachment 101709 [details]
Additional backtrace output

My backtrace is slightly different, if only because I have more debugging symbols installed.
Comment 9 Ben Klopfenstein 2016-10-22 21:04:43 UTC
Additionally, running at the command line suggests this may be due to missing SMART support:

benklop@Thinkpad:~$ sudo partitionmanager 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Loaded backend plugin:  "pmlibpartedbackendplugin"
QLayout: Attempting to add QLayout "" to PartitionManagerWidget "m_PartitionManagerWidget", which already has a layout
QLayout: Attempting to add QLayout "" to ListDevices "m_ListDevices", which already has a layout
QLayout: Attempting to add QLayout "" to QWidget "m_ListOperations", which already has a layout
QLayout: Attempting to add QLayout "" to QWidget "m_InfoPane", which already has a layout
QLayout: Attempting to add QLayout "" to QWidget "m_TreeLog", which already has a layout
"Using backend plugin: pmlibpartedbackendplugin (1)"
"Scanning devices..."
QDBusArgument: read from a write-only object
QDBusArgument: read from a write-only object
QDBusArgument: read from a write-only object
"Device found: ATA TOSHIBA THNSFJ25"
QFileInfo::absolutePath: Constructed with empty filename
blkid: unknown file system type  ""  on  "/dev/sda3"
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
"Device found: Generic STORAGE DEVICE"
getting smart status failed for  "/dev/sdb" :  Operation not supported
QFileInfo::absolutePath: Constructed with empty filename
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = partitionmanager path = /usr/bin pid = 6138
KCrash: Arguments: /usr/bin/partitionmanager 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/tmp/runtime-root/kdeinit5__0

[1]+  Stopped                 sudo partitionmanager
benklop@Thinkpad:~$ QSocketNotifier: Invalid socket 7 and type 'Read', disabling...
QSocketNotifier: Invalid socket 12 and type 'Read', disabling...
QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
QSocketNotifier: Invalid socket 18 and type 'Read', disabling...
Comment 10 Andrius Štikonas 2016-10-22 23:59:28 UTC
Hi Ben,

Isn't m.2 drive nvme? I thought that's what nvme is...

Backtrace points to line
QListWidgetItem(QIcon::fromTheme(d.iconName()).pixmap(IconSize(KIconLoader::Desktop)), d.prettyName())

I wonder what might be going wrong here... icon Name should default to hard drive icon if icon is missing...maybe it's pretty name...
Comment 11 Vishal Rao 2016-10-23 04:02:16 UTC
In the original reporter's (and mine) stacktrace it seems to indicate operator= for QString when it's trying to read/set Device::deviceNode() so something about scanning an m.2 device (mine is NVMe) while Ben's could be m.2 "SATA" based.

Anything we (or I could do) to run/capture more debugging info?
Comment 12 Vishal Rao 2016-10-23 08:12:11 UTC
While trying to install source and building/debugging (not much success here, newbie) I noticed my stacktrace now has Device::setIconName() call as follows. doing a quick grep, it looks like only the dummy backend is calling setIconName in its scanDevice() method, unless, of course, I'm making some mistake:

Thread 1 (Thread 0x7fb4f85eb940 (LWP 5843)):
[KCrash Handler]
#4  0x00007fb4f4d5e37c in QString::operator=(QString const&) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fb4f80fc337 in Device::setIconName (this=0x7fb4d4060950, name=...) at /home/vishal/SRC/kpmcore-2.2.1+p16.04+git20161011.0712/src/core/device.h:92
#6  0x000000000044e8a9 in ListDeviceWidgetItem::ListDeviceWidgetItem (d=..., this=0xab6cc0) at /workspace/build/src/gui/listdevices.cpp:32
#7  ListDevices::updateDevices (this=0x7eef20, devices=...) at /workspace/build/src/gui/listdevices.cpp:57
#8  0x000000000045294a in MainWindow::on_m_OperationStack_devicesChanged (this=0x7d5820) at /workspace/build/src/gui/mainwindow.cpp:623
#9  0x0000000000484885 in MainWindow::qt_metacall (this=0x7d5820, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fb4d402c2c0) at /workspace/build/obj-x86_64-linux-gnu/src/moc_mainwindow.cpp:197
#10 0x00007fb4f4edba19 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
Comment 13 Vishal Rao 2016-10-23 08:13:35 UTC
I should mention if I run my local build of partitionmanager/kpmcore it does not crash, not sure if it's because I made a debug build. But when I run the one that came installed in /usr/bin I get the previously posted stacktrace crash during startup.
Comment 14 Andrius Štikonas 2016-10-23 11:10:05 UTC
(In reply to Vishal Rao from comment #13)
> I should mention if I run my local build of partitionmanager/kpmcore it does
> not crash, not sure if it's because I made a debug build. But when I run the
> one that came installed in /usr/bin I get the previously posted stacktrace
> crash during startup.

Thanks for slightly more detailed debug output. Let me look at the code and think what might be going wrong with the icon. But I am not sure if we will be able to test it if it doesn't crash with your local build.
Comment 15 Andrius Štikonas 2016-10-23 11:12:28 UTC
(In reply to Vishal Rao from comment #13)
> I should mention if I run my local build of partitionmanager/kpmcore it does
> not crash, not sure if it's because I made a debug build. But when I run the
> one that came installed in /usr/bin I get the previously posted stacktrace
> crash during startup.

Could it be you didn't build dummy backend in your local build?
Comment 16 Vishal Rao 2016-10-23 11:51:10 UTC
I have built dummy backend also as part of kpmcore and noted both the default partitionmanager binary and my built one both try to load the backends from /usr/lib/x86.../qt5/plugins folder, so I tried replacing the original with my built ones and only the default partitionmanager binary from /usr/bin crashed and not my built one.

One other difference I see is that when I run the default /usr/bin/partitionmanager it seems to trigger KDE-SU UI while my binary triggers/picks up gksudo... see different console output below during early run:

vishal@skybird:/usr/bin$ ./partitionmanager
org.kde.kdesu: Daemon not safe (not sgid), not using it.

--------

vishal@skybird:~/SRC/partitionmanager-2.2.1+p16.04+git20160920.0957/build/src$ ./partitionmanager 

(gksudo:2327): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",

(gksudo:2327): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",
Comment 17 Vishal Rao 2016-10-23 13:13:43 UTC
Just an update that while the issue occurs on my updated Neon dev unstable edition, it does not occur on a freshly installed neon user edition 5.8.2 at this time.
Comment 18 Emre Unlu 2016-10-24 20:35:48 UTC
I can reproduce this easily on KDE neon dev. ed. -stable and can get logs if needed.

forvelin@stormgarden:~$ sudo partitionmanager 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Loaded backend plugin:  "pmlibpartedbackendplugin"
QLayout: Attempting to add QLayout "" to PartitionManagerWidget "m_PartitionManagerWidget", which already has a layout
QLayout: Attempting to add QLayout "" to ListDevices "m_ListDevices", which already has a layout
QLayout: Attempting to add QLayout "" to QWidget "m_ListOperations", which already has a layout
QLayout: Attempting to add QLayout "" to QWidget "m_InfoPane", which already has a layout
QLayout: Attempting to add QLayout "" to QWidget "m_TreeLog", which already has a layout
"Using backend plugin: pmlibpartedbackendplugin (1)"
"Scanning devices..."
QDBusArgument: read from a write-only object
QDBusArgument: read from a write-only object
QDBusArgument: read from a write-only object
"Device found: ATA INTEL SSDSC2BW18"
getting temp failed for  "/dev/sda" :  No such file or directory                                                                                                                                
blkid: unknown file system type  ""  on  "/dev/sda2"                                                                                                                                            
QFileInfo::absolutePath: Constructed with empty filename                                                                                                                                        
"Partition ‘/dev/sda2’ is not properly aligned (first sector: 1001470, modulo: 2046)."                                                                                                          
KCrash: crashing... crashRecursionCounter = 2                                                                                                                                                   
KCrash: Application Name = partitionmanager path = /usr/bin pid = 4349                                                                                                                          
KCrash: Arguments: /usr/bin/partitionmanager                                                                                                                                                    
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit                                                                                                              
sock_file=/tmp/runtime-root/kdeinit5__0
Comment 19 Andrius Štikonas 2016-10-24 20:58:43 UTC
(In reply to Emre Unlu from comment #18)
> I can reproduce this easily on KDE neon dev. ed. -stable and can get logs if
> needed.

dev stable edition has the same package as dev unstable (where kpmcore is newer than partitionmanager).

But I think today there was a new build of partitionmanager, so it would be interesting to see if anything changes once it gets into neon repos.

Unfortunately console output is not really useful... There isn't anything that could help to find this crash.
Comment 20 Andrius Štikonas 2016-10-24 21:18:37 UTC
Ok, I can see crash in neon myself now. Indeed as Vishal wrote earlier, crash is gone after rebuilding exactly the same source code.

So I'm almost sure this bug is just due to ABI break in kpmcore and partition manager was not recompiled in neon dev edition...

If that's not the case please reopen this bug once newer package reaches neon (I'm not sure when it will be though).
Comment 21 Andrius Štikonas 2016-10-25 16:46:42 UTC
Just a small update:

Looks like partitionmanager packaging repository disappeared, that's there were no newer snapshots of partitionmanager for a month...

The reason for disappearance seems to be that debian removed their partitionmanager repo.

You can see in https://packages.qa.debian.org/p/partitionmanager.html that partitionmanager was removed from testing...
Comment 22 Vishal Rao 2016-10-26 12:45:20 UTC
Just FYI, got this version: 2.2.1+p16.04+git20161026.1000-0 in Neon dev unstable update just now and it seems to be working okay.