Bug 400701

Summary: plasma crash on QXcbConnection::getSelectionOwner [no dupes from 5.20 or later]
Product: [Plasma] plasmashell Reporter: Evgeniy <l1e9w76>
Component: generic-crashAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED UPSTREAM    
Severity: crash CC: accounts+kde, andrasszerencses1, bingmybong, cemkalyoncu, FrankMaerkle, freekdekruijf, guenter.k, j.andradas, jodr666, kde, marcelo.jimenez, meven29, nate, notmart, nuclide.DG, plasma-bugs, smallville7123, szotsaki
Priority: NOR Keywords: drkonqi
Version: 5.13.5   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description Evgeniy 2018-11-05 13:45:30 UTC
Application: plasmashell (5.13.5)

Qt Version: 5.11.1
Frameworks Version: 5.50.0
Operating System: Linux 4.18.16-300.fc29.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
usader did not allow to reboot the OS, the command xkill, crusader was killed and plasma collapsed

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

Thread 10 (Thread 0x7f17ddb13700 (LWP 10009)):
#0  0x00007f189b32b301 in poll () from /lib64/libc.so.6
#1  0x00007f17edc70675 in poll_func () from /lib64/libpulse.so.0
#2  0x00007f17edc61c58 in pa_mainloop_poll () from /lib64/libpulse.so.0
#3  0x00007f17edc622a2 in pa_mainloop_iterate () from /lib64/libpulse.so.0
#4  0x00007f17edc62350 in pa_mainloop_run () from /lib64/libpulse.so.0
#5  0x00007f17edc705bd in thread () from /lib64/libpulse.so.0
#6  0x00007f17edbd206c in internal_thread_func () from /usr/lib64/pulseaudio/libpulsecommon-12.2.so
#7  0x00007f189b06058e in start_thread () from /lib64/libpthread.so.0
#8  0x00007f189b336513 in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7f17dd308700 (LWP 1660)):
#0  0x00007f189b32b301 in poll () from /lib64/libc.so.6
#1  0x00007f17edc70675 in poll_func () from /lib64/libpulse.so.0
#2  0x00007f17edc61c58 in pa_mainloop_poll () from /lib64/libpulse.so.0
#3  0x00007f17edc622a2 in pa_mainloop_iterate () from /lib64/libpulse.so.0
#4  0x00007f17edc62350 in pa_mainloop_run () from /lib64/libpulse.so.0
#5  0x00007f17edc705bd in thread () from /lib64/libpulse.so.0
#6  0x00007f17edbd206c in internal_thread_func () from /usr/lib64/pulseaudio/libpulsecommon-12.2.so
#7  0x00007f189b06058e in start_thread () from /lib64/libpthread.so.0
#8  0x00007f189b336513 in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f17df9a2700 (LWP 1622)):
#0  0x00007f189b32b301 in poll () from /lib64/libc.so.6
#1  0x00007f18986d45a6 in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007f18986d46d0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f189b9d8acb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f189b98739b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f189b7eef16 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f17ec1857db in KCupsConnection::run() () from /lib64/libkcupslib.so
#7  0x00007f189b7f83ab in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007f189b06058e in start_thread () from /lib64/libpthread.so.0
#9  0x00007f189b336513 in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f17ee6a3700 (LWP 1480)):
#0  0x00007f189b326e64 in read () from /lib64/libc.so.6
#1  0x00007f189871aaa0 in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007f18986d409b in g_main_context_check () from /lib64/libglib-2.0.so.0
#3  0x00007f18986d4550 in ?? () from /lib64/libglib-2.0.so.0
#4  0x00007f18986d46d0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#5  0x00007f189b9d8acb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#6  0x00007f189b98739b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#7  0x00007f189b7eef16 in QThread::exec() () from /lib64/libQt5Core.so.5
#8  0x00007f189d7e778a in QQuickPixmapReader::run() () from /lib64/libQt5Quick.so.5
#9  0x00007f189b7f83ab in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#10 0x00007f189b06058e in start_thread () from /lib64/libpthread.so.0
#11 0x00007f189b336513 in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f17effff700 (LWP 1443)):
#0  0x00007f189b32b301 in poll () from /lib64/libc.so.6
#1  0x00007f18986d45a6 in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007f18986d46d0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f189b9d8acb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f189b98739b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f189b7eef16 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f189b7f83ab in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007f189b06058e in start_thread () from /lib64/libpthread.so.0
#8  0x00007f189b336513 in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f17f6511700 (LWP 1285)):
#0  0x00007f189b06667c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f17f9fd0933 in ?? () from /usr/lib64/dri/nouveau_dri.so
#2  0x00007f17f9fd068b in ?? () from /usr/lib64/dri/nouveau_dri.so
#3  0x00007f189b06058e in start_thread () from /lib64/libpthread.so.0
#4  0x00007f189b336513 in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f187b3fa700 (LWP 1242)):
#0  0x00007f189b06667c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f189e19ef5a in QTWTF::TCMalloc_PageHeap::scavengerThread() () from /lib64/libQt5Script.so.5
#2  0x00007f189e19efc5 in QTWTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /lib64/libQt5Script.so.5
#3  0x00007f189b06058e in start_thread () from /lib64/libpthread.so.0
#4  0x00007f189b336513 in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f18891c7700 (LWP 1213)):
#0  0x00007f189b32b301 in poll () from /lib64/libc.so.6
#1  0x00007f18986d45a6 in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007f18986d46d0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f189b9d8acb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f189b98739b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f189b7eef16 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f189d556209 in QQmlThreadPrivate::run() () from /lib64/libQt5Qml.so.5
#7  0x00007f189b7f83ab in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007f189b06058e in start_thread () from /lib64/libpthread.so.0
#9  0x00007f189b336513 in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f188a40c700 (LWP 1173)):
#0  0x00007f189b326e64 in read () from /lib64/libc.so.6
#1  0x00007f189871aaa0 in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007f18986d409b in g_main_context_check () from /lib64/libglib-2.0.so.0
#3  0x00007f18986d4550 in ?? () from /lib64/libglib-2.0.so.0
#4  0x00007f18986d46d0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#5  0x00007f189b9d8acb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#6  0x00007f189b98739b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#7  0x00007f189b7eef16 in QThread::exec() () from /lib64/libQt5Core.so.5
#8  0x00007f189cacbc89 in QDBusConnectionManager::run() () from /lib64/libQt5DBus.so.5
#9  0x00007f189b7f83ab in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#10 0x00007f189b06058e in start_thread () from /lib64/libpthread.so.0
#11 0x00007f189b336513 in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f1898042100 (LWP 1113)):
[KCrash Handler]
#6  0x00007f188b1ad3ee in QXcbConnection::getSelectionOwner(unsigned int) const () from /lib64/libQt5XcbQpa.so.5
#7  0x00007f188b1a811f in QXcbClipboard::mimeData(QClipboard::Mode) () from /lib64/libQt5XcbQpa.so.5
#8  0x00007f189d924cab in QQuickTextControl::canPaste() const () from /lib64/libQt5Quick.so.5
#9  0x00007f189d92d912 in QQuickTextEdit::q_canPasteChanged() () from /lib64/libQt5Quick.so.5
#10 0x00007f189d931f60 in QQuickTextEdit::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /lib64/libQt5Quick.so.5
#11 0x00007f189d932cb3 in QQuickTextEdit::qt_metacall(QMetaObject::Call, int, void**) () from /lib64/libQt5Quick.so.5
#12 0x00007f189d4a60e7 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) () from /lib64/libQt5Qml.so.5
#13 0x00007f189b9b06e7 in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#14 0x00007f189bd37f65 in QClipboard::emitChanged(QClipboard::Mode) () from /lib64/libQt5Gui.so.5
#15 0x00007f188b1a9290 in QXcbClipboard::handleXFixesSelectionRequest(xcb_xfixes_selection_notify_event_t*) () from /lib64/libQt5XcbQpa.so.5
#16 0x00007f188b1b148b in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () from /lib64/libQt5XcbQpa.so.5
#17 0x00007f188b1b1ef3 in QXcbConnection::processXcbEvents() () from /lib64/libQt5XcbQpa.so.5
#18 0x00007f189b9b1346 in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#19 0x00007f189c39ab05 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#20 0x00007f189c3a2220 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#21 0x00007f189b988456 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#22 0x00007f189b98b62b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#23 0x00007f189b9d8d27 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5Core.so.5
#24 0x00007f18986d426d in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#25 0x00007f18986d4638 in ?? () from /lib64/libglib-2.0.so.0
#26 0x00007f18986d46d0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#27 0x00007f189b9d8ab3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#28 0x00007f188b242d95 in QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5XcbQpa.so.5
#29 0x00007f189b98739b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#30 0x00007f189b98f466 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#31 0x000055e780bb19cf in ?? ()
#32 0x00007f189b25d413 in __libc_start_main () from /lib64/libc.so.6
#33 0x000055e780bb1e1e in _start ()
[Inferior 1 (process 1113) detached]

Reported using DrKonqi
Comment 1 Marco Martin 2018-12-14 16:52:34 UTC
*** Bug 399593 has been marked as a duplicate of this bug. ***
Comment 2 David Edmundson 2020-06-13 23:35:41 UTC
*** Bug 422911 has been marked as a duplicate of this bug. ***
Comment 3 David Edmundson 2020-06-13 23:35:46 UTC
*** Bug 422585 has been marked as a duplicate of this bug. ***
Comment 4 David Edmundson 2020-06-13 23:35:53 UTC
*** Bug 421845 has been marked as a duplicate of this bug. ***
Comment 5 David Edmundson 2020-06-13 23:35:59 UTC
*** Bug 420496 has been marked as a duplicate of this bug. ***
Comment 6 David Edmundson 2020-06-13 23:36:06 UTC
*** Bug 408510 has been marked as a duplicate of this bug. ***
Comment 7 David Edmundson 2020-06-13 23:36:12 UTC
*** Bug 416066 has been marked as a duplicate of this bug. ***
Comment 8 Marcelo Jimenez 2020-06-14 13:23:22 UTC
Created attachment 129347 [details]
New crash information added by DrKonqi

plasmashell (5.19.0) using Qt 5.15.0

- What I was doing when the application crashed:

The crash has happened while I had just logged in. I had not actually started to do any work.

-- Backtrace (Reduced):
#4  0x00007f8ac352f320 in QXcbConnection::getSelectionOwner(unsigned int) const (this=0x55dbefe068e0, atom=<optimized out>) at qxcbconnection_basic.h:71
#5  0x00007f8ac3529d28 in QXcbClipboard::getSelectionOwner(unsigned int) const (atom=<optimized out>, this=0x7f8abc0063c0) at ./qxcbobject.h:53
#6  0x00007f8ac3529d28 in QXcbClipboard::mimeData(QClipboard::Mode) (this=0x7f8abc0063c0, mode=QClipboard::Clipboard) at qxcbclipboard.cpp:322
[...]
#9  0x00007f8ac7af0020 in doActivate<false>(QObject*, int, void**) (sender=0x55dbf0957dc0, signal_index=6, argv=0x7ffe74746b20, argv@entry=0x0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
[...]
#11 0x00007f8ac8364d43 in QClipboard::dataChanged() (this=<optimized out>) at .moc/moc_qclipboard.cpp:186
Comment 9 Andras 2020-06-14 23:18:43 UTC
Created attachment 129368 [details]
New crash information added by DrKonqi

plasmashell (5.19.0) using Qt 5.15.0

- What I was doing when the application crashed:

Simple logout then login with the same user

-- Backtrace (Reduced):
#4  0x00007f5531a91320 in QXcbConnection::getSelectionOwner (this=0x5596ab412560, atom=<optimized out>) at qxcbconnection_basic.h:71
#5  0x00007f5531a8bd28 in QXcbClipboard::getSelectionOwner (atom=<optimized out>, this=0x7f552c005f00) at ./qxcbobject.h:53
#6  QXcbClipboard::mimeData (this=0x7f552c005f00, mode=QClipboard::Clipboard) at qxcbclipboard.cpp:322
#7  0x00007f5530fc05dd in KFilePreviewGenerator::Private::applyCutItemEffect (this=this@entry=0x5596abe8eae0, items=...) at /usr/src/debug/kio-5.70.0-3.2.x86_64/src/filewidgets/kfilepreviewgenerator.cpp:905
#8  0x00007f5530fc2029 in KFilePreviewGenerator::Private::updateCutItems (this=0x5596abe8eae0) at /usr/src/debug/kio-5.70.0-3.2.x86_64/src/filewidgets/kfilepreviewgenerator.cpp:719
Comment 10 smallville7123 2020-07-01 08:18:41 UTC
Created attachment 129811 [details]
New crash information added by DrKonqi

plasmashell (5.19.2) using Qt 5.15.0

- What I was doing when the application crashed:

logging in from hybernation

i am running on OpenSuse TumbleWeed

Linux install 5.7.5-1-default #1 SMP Tue Jun 23 06:00:46 UTC 2020 (a1775d0) x86_64 x86_64 x86_64 GNU/Linux

on Macbook Pro mid 2012 (macbookpro92)

-- Backtrace (Reduced):
#4  0x00007f2dfe47b320 in QXcbConnection::getSelectionOwner (this=0x5575a8ffc460, atom=<optimized out>) at qxcbconnection_basic.h:71
#5  0x00007f2dfe475d28 in QXcbClipboard::getSelectionOwner (atom=<optimized out>, this=0x7f2df8005ff0) at ./qxcbobject.h:53
#6  QXcbClipboard::mimeData (this=0x7f2df8005ff0, mode=QClipboard::Clipboard) at qxcbclipboard.cpp:322
#7  0x00007f2dfd9a46ed in KFilePreviewGenerator::Private::applyCutItemEffect (this=this@entry=0x5575a97e3030, items=...) at /usr/src/debug/kio-5.71.0-1.1.x86_64/src/filewidgets/kfilepreviewgenerator.cpp:905
#8  0x00007f2dfd9a6139 in KFilePreviewGenerator::Private::updateCutItems (this=0x5575a97e3030) at /usr/src/debug/kio-5.71.0-1.1.x86_64/src/filewidgets/kfilepreviewgenerator.cpp:719
Comment 11 David Edmundson 2020-07-07 08:49:53 UTC
*** Bug 423750 has been marked as a duplicate of this bug. ***
Comment 12 David Edmundson 2020-07-07 08:50:12 UTC
*** Bug 423269 has been marked as a duplicate of this bug. ***
Comment 13 Tony 2020-07-31 00:01:43 UTC
Created attachment 130527 [details]
New crash information added by DrKonqi

plasmashell (5.19.80) using Qt 5.15.0

- What I was doing when the application crashed:

Changed the sddm them from breeze for opensuse + a differetn background to elarun.
Logout and back in, then i got greeted by a sad face.

-- Backtrace (Reduced):
#6  0x00007f6792c12320 in QXcbConnection::getSelectionOwner(unsigned int) const (this=0x5635cb46e680, atom=<optimized out>) at qxcbconnection_basic.h:71
#7  0x00007f6792c0cd28 in QXcbClipboard::getSelectionOwner(unsigned int) const (atom=<optimized out>, this=0x7f678c006840) at ./qxcbobject.h:53
#8  0x00007f6792c0cd28 in QXcbClipboard::mimeData(QClipboard::Mode) (this=0x7f678c006840, mode=QClipboard::Clipboard) at qxcbclipboard.cpp:322
#9  0x00007f67920ede1d in KFilePreviewGenerator::Private::applyCutItemEffect(KFileItemList const&) (this=this@entry=0x5635cbce07e0, items=...) at /usr/src/debug/kio-5.72.0git.20200729T055613~3a0dbb21-ku.15.1.x86_64/src/filewidgets/kfilepreviewgenerator.cpp:905
#10 0x00007f67920ef869 in KFilePreviewGenerator::Private::updateCutItems() (this=0x5635cbce07e0) at /usr/src/debug/kio-5.72.0git.20200729T055613~3a0dbb21-ku.15.1.x86_64/src/filewidgets/kfilepreviewgenerator.cpp:719
Comment 14 David Edmundson 2020-12-01 23:31:23 UTC
*** Bug 429912 has been marked as a duplicate of this bug. ***
Comment 15 David Edmundson 2020-12-01 23:31:32 UTC
*** Bug 423063 has been marked as a duplicate of this bug. ***
Comment 16 Méven Car 2020-12-02 06:49:48 UTC
Origin of the crash seems to be in QXcbConnection::getSelectionOwner:

https://code.woboq.org/qt5/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp.html#_ZN14QXcbConnection19getQtSelectionOwnerEv

Called by QXcbClipboard::mimeData(QClipboard::Mode mode)

https://code.woboq.org/qt5/qtbase/src/plugins/platforms/xcb/qxcbclipboard.cpp.html#_ZN13QXcbClipboard8mimeDataEN10QClipboard4ModeE

The thing is when the mode is Clipboard or not Selection Mode couldn't Qt avoid calling the Selection owner logic ?

It seems like an upstream Qt bug to me.

(Btw that's a X only crash, meaning Wayland session cannot be affected by this crash)
Comment 17 Nate Graham 2021-01-05 18:23:50 UTC
Can you file a Qt bug report? Also do you think there's anything we can do to work around it until it gets fixed there? The situation with Wt 5.15.x does not look amazing right now. It could be a long time before a fix gets into the hands of any users.
Comment 18 Nate Graham 2022-03-25 15:42:04 UTC
No dupes in over 15 months. Looks like this was probably fixed in a Qt update.