Bug 363216 - Copying partition into another twice and creating a new partition table results in a crash
Summary: Copying partition into another twice and creating a new partition table resul...
Status: RESOLVED FIXED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (other bugs)
Version First Reported In: Git
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-18 12:28 UTC by Andrius Štikonas
Modified: 2016-05-19 15:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrius Štikonas 2016-05-18 12:28:31 UTC
Copying partition into another twice and creating a new partition table results in a crash.

Reproducible: Always

Steps to Reproduce:
1. Copy partition into another
2. Repeat step 1 with the same partitions
3. Create a new partition table

Actual Results:  
Crash

Expected Results:  
New empty partition table is created.

Application: KDE Partition Manager (partitionmanager), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f37df679880 (LWP 18120))]

Thread 2 (Thread 0x7f37b49f5700 (LWP 18274)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f37e708ba6a in g_cond_wait_until () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f37e701bbd9 in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f37e701c1fb in g_async_queue_timeout_pop () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f37e706e2ca in ?? () from /usr/lib64/libglib-2.0.so.0
#5  0x00007f37e706d875 in ?? () from /usr/lib64/libglib-2.0.so.0
#6  0x00007f37e84ea474 in start_thread (arg=0x7f37b49f5700) at pthread_create.c:334
#7  0x00007f37ea82c6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f37df679880 (LWP 18120)):
[KCrash Handler]
#6  0x00007f37eee480c5 in Operation::insertPreviewPartition (this=0x27b16e0, device=..., p=...) at /home/andrius/repositories/kde/kpmcore/src/ops/operation.cpp:54
#7  0x00007f37eee514cd in CopyOperation::undo (this=0x27b16e0) at /home/andrius/repositories/kde/kpmcore/src/ops/copyoperation.cpp:117
#8  0x0000000000454c0e in MainWindow::onApplyAllOperations (this=0x21639b0) at /home/andrius/repositories/kde/partitionmanager/src/gui/mainwindow.cpp:722
#9  0x000000000048d680 in MainWindow::qt_static_metacall (_o=0x21639b0, _c=QMetaObject::InvokeMetaMethod, _id=20, _a=0x7ffdffd6bac0) at /home/andrius/repositories/kde/partitionmanager/build/src/moc_mainwindow.cpp:211
#10 0x00007f37eb64fe1a in QMetaObject::activate (sender=0x238dd00, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3713
#11 0x00007f37ebe05e02 in QAction::triggered(bool) () from /usr/lib64/libQt5Widgets.so.5
#12 0x00007f37ebe08288 in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007f37ebf0dfa0 in ?? () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007f37ebf0e0d4 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQt5Widgets.so.5
#15 0x00007f37ebfd2b1a in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQt5Widgets.so.5
#16 0x00007f37ebe52a98 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#17 0x00007f37ebfd2bf9 in QToolButton::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#18 0x00007f37ebe0fa3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#19 0x00007f37ebe155c9 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#20 0x00007f37eb62803d in QCoreApplication::notifyInternal (this=0x7ffdffd6c8b0, receiver=0x23fa710, event=0x7ffdffd6bfd0) at kernel/qcoreapplication.cpp:965
#21 0x00007f37ebe144c2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQt5Widgets.so.5
#22 0x00007f37ebe6ceeb in ?? () from /usr/lib64/libQt5Widgets.so.5
#23 0x00007f37ebe6f42b in ?? () from /usr/lib64/libQt5Widgets.so.5
#24 0x00007f37ebe0fa3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#25 0x00007f37ebe14ebe in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#26 0x00007f37eb62803d in QCoreApplication::notifyInternal (this=0x7ffdffd6c8b0, receiver=0x240b8c0, event=0x7ffdffd6c3f0) at kernel/qcoreapplication.cpp:965
#27 0x00007f37eb946c17 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib64/libQt5Gui.so.5
#28 0x00007f37eb948a45 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib64/libQt5Gui.so.5
#29 0x00007f37eb930bb8 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Gui.so.5
#30 0x00007f37d8f20160 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#31 0x00007f37e7046f97 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#32 0x00007f37e70471f0 in ?? () from /usr/lib64/libglib-2.0.so.0
#33 0x00007f37e704729c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#34 0x00007f37eb674faf in QEventDispatcherGlib::processEvents (this=0x20f6260, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#35 0x00007f37eb626f2a in QEventLoop::exec (this=this@entry=0x7ffdffd6c780, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#36 0x00007f37eb62e0cc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#37 0x000000000041c1a8 in main (argc=2, argv=0x7ffdffd6c9f8) at /home/andrius/repositories/kde/partitionmanager/src/main.cpp:89
Comment 1 Andrius Štikonas 2016-05-19 15:40:49 UTC
Git commit 4278172f35af11eaf6efd872645ad8015cc79839 by Andrius Štikonas.
Committed on 19/05/2016 at 15:40.
Pushed by stikonas into branch 'master'.

Iterate over operation stack backwards.

M  +10   -7    src/core/operationstack.cpp

http://commits.kde.org/kpmcore/4278172f35af11eaf6efd872645ad8015cc79839