Bug 361450

Summary: Plasma crashes on umounting CDRom
Product: [Plasma] plasmashell Reporter: alan.henry.williams
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: crash CC: bhush94, bugrprt21882, frasou, heinz.weiser, plasma-bugs, sylvain
Priority: NOR Keywords: drkonqi
Version: 5.5.5   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Plasma crashed when CD unmout (device notifier)

Description alan.henry.williams 2016-04-06 11:53:55 UTC
Application: plasmashell (5.5.5)

Qt Version: 5.5.1
Operating System: Linux 4.4.6-200.fc22.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed:
1) mount /media/cdrom (... ok - mounted r/o).
2) ... access files from cdrom - ok. This step is not essential.
3) unmount cdrom in device notifier.
4) enter requested password in dialogue.
5) Plasma crashes.

The crash can be reproduced every time.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f85fb072900 (LWP 4986))]

Thread 9 (Thread 0x7f85db295700 (LWP 4989)):
#0  0x00007f85f29e957d in poll () from /lib64/libc.so.6
#1  0x00007f85f8e9f182 in _xcb_conn_wait () from /lib64/libxcb.so.1
#2  0x00007f85f8ea0c77 in xcb_wait_for_event () from /lib64/libxcb.so.1
#3  0x00007f85dd217da9 in QXcbEventReader::run() () from /lib64/libQt5XcbQpa.so.5
#4  0x00007f85f35f73de in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#5  0x00007f85f1d2f555 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f85f29f4ded in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f85d884a700 (LWP 4990)):
#0  0x00007f85f29e957d in poll () from /lib64/libc.so.6
#1  0x00007f85edf95dbc in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f85edf95ecc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f85f382eecb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f85f37d5eca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f85f35f2434 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f85f79389b5 in QQmlThreadPrivate::run() () from /lib64/libQt5Qml.so.5
#7  0x00007f85f35f73de in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007f85f1d2f555 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f85f29f4ded in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f85d0d06700 (LWP 4992)):
#0  0x00007f85f1d34540 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f85d1fe66da in radeon_drm_cs_emit_ioctl () from /usr/lib64/dri/r600_dri.so
#2  0x00007f85d1fe5e37 in impl_thrd_routine () from /usr/lib64/dri/r600_dri.so
#3  0x00007f85f1d2f555 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f85f29f4ded in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f85c8cc8700 (LWP 4993)):
#0  0x00007f85edfdaec9 in g_mutex_lock () from /lib64/libglib-2.0.so.0
#1  0x00007f85edf94ea4 in g_main_context_release () from /lib64/libglib-2.0.so.0
#2  0x00007f85edf95d76 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#3  0x00007f85edf95ecc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4  0x00007f85f382eecb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f85f37d5eca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#6  0x00007f85f35f2434 in QThread::exec() () from /lib64/libQt5Core.so.5
#7  0x00007f85f79389b5 in QQmlThreadPrivate::run() () from /lib64/libQt5Qml.so.5
#8  0x00007f85f35f73de in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#9  0x00007f85f1d2f555 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f85f29f4ded in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f85c31b1700 (LWP 4994)):
#0  0x00007f85edfdaec9 in g_mutex_lock () from /lib64/libglib-2.0.so.0
#1  0x00007f85edf95da2 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f85edf95ecc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f85f382eecb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f85f37d5eca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f85f35f2434 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f85f79389b5 in QQmlThreadPrivate::run() () from /lib64/libQt5Qml.so.5
#7  0x00007f85f35f73de in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007f85f1d2f555 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f85f29f4ded in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f85c18ae700 (LWP 4995)):
#0  0x00007f85f1d34540 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f85fa78f514 in QTWTF::TCMalloc_PageHeap::scavengerThread() () from /lib64/libQt5Script.so.5
#2  0x00007f85fa78f559 in QTWTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /lib64/libQt5Script.so.5
#3  0x00007f85f1d2f555 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f85f29f4ded in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f8539d51700 (LWP 4996)):
#0  0x00007f85edf95804 in g_main_context_check () from /lib64/libglib-2.0.so.0
#1  0x00007f85edf95d60 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f85edf95ecc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f85f382eecb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f85f37d5eca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f85f35f2434 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f85f84e58d6 in QQuickPixmapReader::run() () from /lib64/libQt5Quick.so.5
#7  0x00007f85f35f73de in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007f85f1d2f555 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f85f29f4ded in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f852d450700 (LWP 5003)):
#0  0x00007f85f36a794a in qt_gettime() () from /lib64/libQt5Core.so.5
#1  0x00007f85f382c949 in QTimerInfoList::updateCurrentTime() () from /lib64/libQt5Core.so.5
#2  0x00007f85f382ceb5 in QTimerInfoList::timerWait(timespec&) () from /lib64/libQt5Core.so.5
#3  0x00007f85f382e2ae in timerSourcePrepare(_GSource*, int*) () from /lib64/libQt5Core.so.5
#4  0x00007f85edf9535d in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#5  0x00007f85edf95ceb in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#6  0x00007f85edf95ecc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#7  0x00007f85f382eecb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#8  0x00007f85f37d5eca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#9  0x00007f85f35f2434 in QThread::exec() () from /lib64/libQt5Core.so.5
#10 0x00007f852f0a2397 in KCupsConnection::run() () from /lib64/libkcupslib.so
#11 0x00007f85f35f73de in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#12 0x00007f85f1d2f555 in start_thread () from /lib64/libpthread.so.0
#13 0x00007f85f29f4ded in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f85fb072900 (LWP 4986)):
[KCrash Handler]
#5  0x00007f85f3806c4a in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#6  0x00007f85f5ceb022 in KJob::result(KJob*, KJob::QPrivateSignal) () from /lib64/libKF5CoreAddons.so.5
#7  0x00007f85f5cebd91 in KJob::finishJob(bool) () from /lib64/libKF5CoreAddons.so.5
#8  0x00007f85307801cc in SolidDeviceJob::start() () from /usr/lib64/qt5/plugins/plasma/dataengine/plasma_engine_soliddevice.so
#9  0x00007f85f8c2f5e4 in Plasma::ServiceJob::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /lib64/libKF5Plasma.so.5
#10 0x00007f85f3808161 in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#11 0x00007f85f4d8c41c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#12 0x00007f85f4d918e6 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#13 0x00007f85f37d873b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#14 0x00007f85f37dab36 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#15 0x00007f85f382eaa3 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5Core.so.5
#16 0x00007f85edf95a8a in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#17 0x00007f85edf95e20 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#18 0x00007f85edf95ecc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#19 0x00007f85f382eeaf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#20 0x00007f85f37d5eca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#21 0x00007f85f37ddfac in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#22 0x00000000004314da in main ()

Reported using DrKonqi
Comment 1 frasou 2016-08-28 22:01:53 UTC
Created attachment 100835 [details]
Plasma crashed when CD unmout (device notifier)
Comment 2 David Edmundson 2016-08-29 15:25:58 UTC
Git commit 19e1d474d99acb6fdfb46751742aa3e9abebf392 by David Edmundson.
Committed on 29/08/2016 at 15:25.
Pushed by davidedmundson into branch 'Plasma/5.7'.

Don't set Service as parent to KJob

Summary:
Otherwise Solid ejects a device
Plasma removes the device from the notifier
The notifier kills SolidDeviceService (directly)
That kills the SolidDeviceJob
This leaves SolidDeviceJob still in the middle of SolidDeviceJob::start() with "this"
now referring to a dangling pointer.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D2623

M  +1    -1    dataengines/soliddevice/soliddeviceservice.cpp

http://commits.kde.org/plasma-workspace/19e1d474d99acb6fdfb46751742aa3e9abebf392
Comment 3 David Edmundson 2017-07-19 17:10:55 UTC
*** Bug 377426 has been marked as a duplicate of this bug. ***
Comment 4 David Edmundson 2017-07-19 17:11:01 UTC
*** Bug 382507 has been marked as a duplicate of this bug. ***
Comment 5 David Edmundson 2017-07-30 22:46:47 UTC
*** Bug 372446 has been marked as a duplicate of this bug. ***
Comment 6 David Edmundson 2017-07-30 22:46:50 UTC
*** Bug 382790 has been marked as a duplicate of this bug. ***
Comment 7 David Edmundson 2017-09-04 09:14:54 UTC
*** Bug 384248 has been marked as a duplicate of this bug. ***