Bug 406426 - kglobalaccel5 crashes often
Summary: kglobalaccel5 crashes often
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 406528 406582 406642 406846 406878 406907 406916 406920 407291 408230 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-04-11 07:25 UTC by Oded Arbel
Modified: 2019-06-04 17:50 UTC (History)
18 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.58
Sentry Crash Report:


Attachments
Crashed core (1.07 MB, application/gzip)
2019-04-11 07:34 UTC, Oded Arbel
Details
Another core dump (970.63 KB, application/gzip)
2019-04-11 07:51 UTC, Oded Arbel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oded Arbel 2019-04-11 07:25:10 UTC
SUMMARY

kglobalaccel crashes often, especially when returning from sleep.


STEPS TO REPRODUCE
1. Use kglobalaccel from Kubunu unstable CI PPA
2. wait

OBSERVED RESULT

Kglobalaccel5 crashes with a signal 11, and all global keyboard shortcuts stop working

EXPECTED RESULT

Global shortcuts should continue to work.

SOFTWARE/OS VERSIONS

Operating System: Kubuntu 19.04
KDE Plasma Version: 5.15.80
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.2
Kernel Version: 5.0.0-8-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-7820HQ CPU @ 2.90GHz
Memory: 15.5 GiB of RAM

ADDITIONAL INFORMATION

The following stack trace was produced by Dr.Konqi:

Application: KDE Global Shortcuts Service (kglobalaccel5), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fc5b6aa9080 (LWP 28837))]

Thread 3 (Thread 0x7fc5aed88700 (LWP 28840)):
#0  0x00007fc5ba5cbba9 in __GI___poll (fds=0x7fc5a8004e30, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fc5b9880cb6 in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7fc5a8004e30, timeout=<optimized out>, context=0x7fc5a8000bf0) at ../../../glib/gmain.c:4228
#2  g_main_context_iterate (context=context@entry=0x7fc5a8000bf0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:3922
#3  0x00007fc5b9880ddc in g_main_context_iteration (context=0x7fc5a8000bf0, may_block=may_block@entry=1) at ../../../glib/gmain.c:3988
#4  0x00007fc5bab4c063 in QEventDispatcherGlib::processEvents (this=0x7fc5a8000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007fc5baaf75bb in QEventLoop::exec (this=this@entry=0x7fc5aed87d70, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#6  0x00007fc5ba9422c6 in QThread::exec (this=this@entry=0x7fc5ba400d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#7  0x00007fc5ba380565 in QDBusConnectionManager::run (this=0x7fc5ba400d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#8  0x00007fc5ba943612 in QThreadPrivate::start (arg=0x7fc5ba400d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:361
#9  0x00007fc5ba49c182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#10 0x00007fc5ba5d7faf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fc5b57fb700 (LWP 28839)):
#0  0x00007fc5ba5cbba9 in __GI___poll (fds=fds@entry=0x7fc5b57faca8, nfds=nfds@entry=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fc5b9160917 in poll (__timeout=-1, __nfds=1, __fds=0x7fc5b57faca8) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#2  _xcb_conn_wait (c=c@entry=0x55d675c43b00, cond=cond@entry=0x55d675c43b40, vector=vector@entry=0x0, count=count@entry=0x0) at ../../src/xcb_conn.c:479
#3  0x00007fc5b916253a in xcb_wait_for_event (c=c@entry=0x55d675c43b00) at ../../src/xcb_in.c:697
#4  0x00007fc5b63df6a8 in QXcbEventQueue::run (this=0x55d675c337a0) at qxcbeventqueue.cpp:228
#5  0x00007fc5ba943612 in QThreadPrivate::start (arg=0x55d675c337a0) at thread/qthread_unix.cpp:361
#6  0x00007fc5ba49c182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#7  0x00007fc5ba5d7faf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fc5b6aa9080 (LWP 28837)):
[KCrash Handler]
#6  GlobalShortcut::isPresent (this=this@entry=0x33) at ./src/runtime/globalshortcut.cpp:106
#7  0x00007fc5bb42d583 in KdeDGlobalAccel::Component::cleanUp (this=0x55d675cadcb0) at ./src/runtime/component.cpp:166
#8  0x00007fc5bb43628e in KdeDGlobalAccel::Component::qt_static_metacall (_o=_o@entry=0x55d675cadcb0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=1, _a=_a@entry=0x7ffcb419cfd0) at ./obj-x86_64-linux-gnu/src/runtime/KF5GlobalAccelPrivate_autogen/EWIEGA46WW/moc_component.cpp:130
#9  0x00007fc5bb4366bb in KdeDGlobalAccel::Component::qt_metacall (this=0x55d675cadcb0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7ffcb419cfd0) at ./obj-x86_64-linux-gnu/src/runtime/KF5GlobalAccelPrivate_autogen/EWIEGA46WW/moc_component.cpp:205
#10 0x00007fc5ba38bdba in QDBusConnectionPrivate::deliverCall (this=<optimized out>, object=<optimized out>, msg=..., metaTypes=..., slotIdx=<optimized out>) at qdbusintegrator.cpp:991
#11 0x00007fc5ba38f985 in QDBusConnectionPrivate::activateCall (this=this@entry=0x7fc5a8003e00, object=0x55d675cadcb0, flags=240, msg=...) at qdbusintegrator.cpp:894
#12 0x00007fc5ba39003e in QDBusConnectionPrivate::activateCall (msg=..., flags=<optimized out>, object=<optimized out>, this=0x7fc5a8003e00) at qdbusintegrator.cpp:843
#13 QDBusConnectionPrivate::activateObject (pathStartPos=<optimized out>, msg=..., node=..., this=0x7fc5a8003e00) at qdbusintegrator.cpp:1502
#14 QDBusConnectionPrivate::activateObject (this=0x7fc5a8003e00, node=..., msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1428
#15 0x00007fc5ba39290e in QDBusActivateObjectEvent::placeMetaCall (this=0x7fc5a8016900) at qdbusintegrator.cpp:1598
#16 0x00007fc5bab22ca2 in QObject::event (this=0x55d675cadcb0, e=<optimized out>) at kernel/qobject.cpp:1260
#17 0x00007fc5baaf88e9 in QCoreApplication::notifyInternal2 (receiver=0x55d675cadcb0, event=0x7fc5a8016900) at ../../include/QtCore/5.12.2/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:322
#18 0x00007fc5baafb927 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55d675c30450) at kernel/qcoreapplication.cpp:1799
#19 0x00007fc5bab4ca43 in postEventSourceDispatch (s=0x55d675c90f80) at kernel/qeventdispatcher_glib.cpp:276
#20 0x00007fc5b9880aae in g_main_dispatch (context=0x7fc5b0004fd0) at ../../../glib/gmain.c:3189
#21 g_main_context_dispatch (context=context@entry=0x7fc5b0004fd0) at ../../../glib/gmain.c:3854
#22 0x00007fc5b9880d48 in g_main_context_iterate (context=context@entry=0x7fc5b0004fd0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:3927
#23 0x00007fc5b9880ddc in g_main_context_iteration (context=0x7fc5b0004fd0, may_block=may_block@entry=1) at ../../../glib/gmain.c:3988
#24 0x00007fc5bab4c047 in QEventDispatcherGlib::processEvents (this=0x55d675c9c570, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#25 0x00007fc5baaf75bb in QEventLoop::exec (this=this@entry=0x7ffcb419d5a0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#26 0x00007fc5baaff5e2 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#27 0x000055d674e02555 in main (argc=<optimized out>, argv=<optimized out>) at ./src/runtime/main.cpp:88
[Inferior 1 (process 28837) detached]
Comment 1 Oded Arbel 2019-04-11 07:34:05 UTC
Created attachment 119348 [details]
Crashed core

Core from kglobalaccel5 crash
Comment 2 Oded Arbel 2019-04-11 07:51:46 UTC
Created attachment 119349 [details]
Another core dump

The previous core dump was gathered by running kglobalaccel from the command line. This core dump was generated from a standard run of kglobalaccel as part of the standard plasma startup, where it crashed almost immediately after start and the core was generated from the drkonqi paused process, so it should match with the drkonqi stack trace
Comment 3 Christoph Feck 2019-04-11 08:14:32 UTC
Laurent, caused by 4c81ab60e689c08ca16d7aa9c76cd6a197e999a3 ?
Comment 4 Jonathan Marten 2019-04-13 15:45:32 UTC
git bisect confirms introduced by commit 4c81ab60e689c08ca16d7aa9c76cd6a197e999a3
Comment 5 Laurent Montel 2019-04-14 09:26:07 UTC
I will investigate it.
Comment 6 Christoph Feck 2019-04-14 13:01:21 UTC
*** Bug 406528 has been marked as a duplicate of this bug. ***
Comment 7 David Faure 2019-04-14 17:40:20 UTC
-        Q_FOREACH(GlobalShortcut *sc, shortcutContext(context)->_actions)
+        for (GlobalShortcut *sc : qAsConst(shortcutContext(context)->_actions))

This is probably the problem. qAsConst cannot be used for temporaries, because the temporary goes out of scope before the result is used.

src/runtime/component.cpp around line 330
Comment 8 David Faure 2019-04-14 17:42:16 UTC
Here's a generic way to detect such problems:

ag -sr qAsConst'\([^)]*\(' .
Comment 9 Laurent Montel 2019-04-14 17:58:52 UTC
I can't reproduce the crash...
Comment 10 Laurent Montel 2019-04-14 18:00:38 UTC
(In reply to David Faure from comment #7)
> -        Q_FOREACH(GlobalShortcut *sc, shortcutContext(context)->_actions)
> +        for (GlobalShortcut *sc :
> qAsConst(shortcutContext(context)->_actions))
> 
> This is probably the problem. qAsConst cannot be used for temporaries,
> because the temporary goes out of scope before the result is used.
> 
> src/runtime/component.cpp around line 330

interesting.
"ag -sr qAsConst'\([^)]*\(' ." thanks for command
Comment 11 Laurent Montel 2019-04-14 18:06:50 UTC
ag is a command line from "the_silver_searcher" package
Comment 12 Laurent Montel 2019-04-14 18:25:36 UTC
Git commit abe32ec599397bda0ce73471519410bee2c16059 by Laurent Montel.
Committed on 14/04/2019 at 18:25.
Pushed by mlaurent into branch 'master'.

Don't use qAsConst over a temporary variable

Summary: BUG: 406426

Reviewers: dfaure

Reviewed By: dfaure

Subscribers: kde-frameworks-devel

Tags: #frameworks

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

M  +2    -1    src/runtime/component.cpp

https://commits.kde.org/kglobalaccel/abe32ec599397bda0ce73471519410bee2c16059
Comment 13 Nate Graham 2019-04-16 17:45:59 UTC
*** Bug 406582 has been marked as a duplicate of this bug. ***
Comment 14 Oded Arbel 2019-04-17 18:43:10 UTC
I would really love to testing the fix for this in Kubuntu CI unstable (which was last built April 12th). 

Anyone can kick the build job? I think its this one - http://kci.pangea.pub/job/disco_unstable_kglobalaccel , right?
Comment 15 Oded Arbel 2019-04-18 12:48:10 UTC
Looks to be working fine with latest KCI unstable PPA
Comment 16 Oded Arbel 2019-04-18 17:19:54 UTC
Nope, still happens when I suspend the computer and start it again.

Here's the new trace based on libkf5globalaccel5-5.57.0+p19.04+git20190418.0604-0 from KCI unstable.

Looks like it happens at the same location (isPresent()) but this time called from another place. Maybe it should be a different report?

Application: KDE Global Shortcuts Service (kglobalaccel5), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f022285d080 (LWP 25951))]

Thread 3 (Thread 0x7f021ab3a700 (LWP 25953)):
#0  0x00007f022637f729 in __GI___poll (fds=0x7f0214004e30, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f0225634cb6 in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7f0214004e30, timeout=<optimized out>, context=0x7f0214000bf0) at ../../../glib/gmain.c:4228
#2  g_main_context_iterate (context=context@entry=0x7f0214000bf0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:3922
#3  0x00007f0225634ddc in g_main_context_iteration (context=0x7f0214000bf0, may_block=may_block@entry=1) at ../../../glib/gmain.c:3988
#4  0x00007f0226900063 in QEventDispatcherGlib::processEvents (this=0x7f0214000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007f02268ab5bb in QEventLoop::exec (this=this@entry=0x7f021ab39d70, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#6  0x00007f02266f62c6 in QThread::exec (this=this@entry=0x7f02261b4d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#7  0x00007f0226134565 in QDBusConnectionManager::run (this=0x7f02261b4d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#8  0x00007f02266f7612 in QThreadPrivate::start (arg=0x7f02261b4d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:361
#9  0x00007f0226250182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#10 0x00007f022638bb1f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f02215ae700 (LWP 25952)):
#0  0x00007f022637f729 in __GI___poll (fds=fds@entry=0x7f02215adca8, nfds=nfds@entry=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f0224f14917 in poll (__timeout=-1, __nfds=1, __fds=0x7f02215adca8) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#2  _xcb_conn_wait (c=c@entry=0x563160747af0, cond=cond@entry=0x563160747b30, vector=vector@entry=0x0, count=count@entry=0x0) at ../../src/xcb_conn.c:479
#3  0x00007f0224f1653a in xcb_wait_for_event (c=c@entry=0x563160747af0) at ../../src/xcb_in.c:697
#4  0x00007f02221926a8 in QXcbEventQueue::run (this=0x5631607377d0) at qxcbeventqueue.cpp:228
#5  0x00007f02266f7612 in QThreadPrivate::start (arg=0x5631607377d0) at thread/qthread_unix.cpp:361
#6  0x00007f0226250182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#7  0x00007f022638bb1f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f022285d080 (LWP 25951)):
[KCrash Handler]
#6  GlobalShortcut::isPresent (this=this@entry=0x33) at ./src/runtime/globalshortcut.cpp:106
#7  0x00007f02271e1583 in KdeDGlobalAccel::Component::cleanUp (this=0x5631607b4990) at ./src/runtime/component.cpp:166
#8  0x00007f02271ea37e in KdeDGlobalAccel::Component::qt_static_metacall (_o=_o@entry=0x5631607b4990, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=1, _a=_a@entry=0x7ffdec62ec30) at ./obj-x86_64-linux-gnu/src/runtime/KF5GlobalAccelPrivate_autogen/EWIEGA46WW/moc_component.cpp:130
#9  0x00007f02271ea7ab in KdeDGlobalAccel::Component::qt_metacall (this=0x5631607b4990, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7ffdec62ec30) at ./obj-x86_64-linux-gnu/src/runtime/KF5GlobalAccelPrivate_autogen/EWIEGA46WW/moc_component.cpp:205
#10 0x00007f022613fdba in QDBusConnectionPrivate::deliverCall (this=<optimized out>, object=<optimized out>, msg=..., metaTypes=..., slotIdx=<optimized out>) at qdbusintegrator.cpp:991
#11 0x00007f0226143985 in QDBusConnectionPrivate::activateCall (this=this@entry=0x7f0214003e00, object=0x5631607b4990, flags=240, msg=...) at qdbusintegrator.cpp:894
#12 0x00007f022614403e in QDBusConnectionPrivate::activateCall (msg=..., flags=<optimized out>, object=<optimized out>, this=0x7f0214003e00) at qdbusintegrator.cpp:843
#13 QDBusConnectionPrivate::activateObject (pathStartPos=<optimized out>, msg=..., node=..., this=0x7f0214003e00) at qdbusintegrator.cpp:1502
#14 QDBusConnectionPrivate::activateObject (this=0x7f0214003e00, node=..., msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1428
#15 0x00007f022614690e in QDBusActivateObjectEvent::placeMetaCall (this=0x7f021401d390) at qdbusintegrator.cpp:1598
#16 0x00007f02268d6ca2 in QObject::event (this=0x5631607b4990, e=<optimized out>) at kernel/qobject.cpp:1260
#17 0x00007f02268ac8e9 in QCoreApplication::notifyInternal2 (receiver=0x5631607b4990, event=0x7f021401d390) at ../../include/QtCore/5.12.2/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:322
#18 0x00007f02268af927 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x563160734450) at kernel/qcoreapplication.cpp:1799
#19 0x00007f0226900a43 in postEventSourceDispatch (s=0x563160795f20) at kernel/qeventdispatcher_glib.cpp:276
#20 0x00007f0225634aae in g_main_dispatch (context=0x7f021c004fd0) at ../../../glib/gmain.c:3189
#21 g_main_context_dispatch (context=context@entry=0x7f021c004fd0) at ../../../glib/gmain.c:3854
#22 0x00007f0225634d48 in g_main_context_iterate (context=context@entry=0x7f021c004fd0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:3927
#23 0x00007f0225634ddc in g_main_context_iteration (context=0x7f021c004fd0, may_block=may_block@entry=1) at ../../../glib/gmain.c:3988
#24 0x00007f0226900047 in QEventDispatcherGlib::processEvents (this=0x5631607a0600, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#25 0x00007f02268ab5bb in QEventLoop::exec (this=this@entry=0x7ffdec62f200, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#26 0x00007f02268b35e2 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#27 0x000056315eb76555 in main (argc=<optimized out>, argv=<optimized out>) at ./src/runtime/main.cpp:88
[Inferior 1 (process 25951) detached]
Comment 17 Fabian Vogt 2019-04-18 18:03:31 UTC
*** Bug 406642 has been marked as a duplicate of this bug. ***
Comment 18 Wolfgang Bauer 2019-04-19 10:37:29 UTC
(In reply to Oded Arbel from comment #16)
> Thread 1 (Thread 0x7f022285d080 (LWP 25951)):
> [KCrash Handler]
> #6  GlobalShortcut::isPresent (this=this@entry=0x33) at
> ./src/runtime/globalshortcut.cpp:106
> #7  0x00007f02271e1583 in KdeDGlobalAccel::Component::cleanUp
> (this=0x5631607b4990) at ./src/runtime/component.cpp:166

Maybe fixed by https://cgit.kde.org/kglobalaccel.git/commit/?id=78a711361db3a5156f511eab89ff7ebbc86b9125 then?
(it changes ./src/runtime/component.cpp:163...)
Comment 19 Oded Arbel 2019-04-19 17:47:34 UTC
(In reply to Wolfgang Bauer from comment #18)
> Maybe fixed by
> https://cgit.kde.org/kglobalaccel.git/commit/
> ?id=78a711361db3a5156f511eab89ff7ebbc86b9125 then?
> (it changes ./src/runtime/component.cpp:163...)

Could be, I thought that this patch is included in libkf5globalaccel5-5.57.0+p19.04+git20190418.0604-0, but looking at the trace again - the above mentioned fix increases the line count so if expect the line number in the trace to change from my first crash to the last one, such it didn't.

I'll test again.
Comment 20 kde 2019-04-20 22:42:33 UTC
Still occurs for me upon login, KDE Neon - all up-to-date as standard user:
Application: KDE Global Shortcuts Service (kglobalaccel5), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f6e3dd92800 (LWP 1187))]

Thread 3 (Thread 0x7f6e255fa700 (LWP 1196)):
#0  0x00007f6e3bd53bf9 in __GI___poll (fds=0x7f6e20004db0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f6e388a2539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6e388a264c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6e3c69615b in QEventDispatcherGlib::processEvents (this=0x7f6e20000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f6e3c63764a in QEventLoop::exec (this=this@entry=0x7f6e255f9d70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007f6e3c45f41a in QThread::exec (this=this@entry=0x7f6e3b5b7d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:531
#6  0x00007f6e3b340015 in QDBusConnectionManager::run (this=0x7f6e3b5b7d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#7  0x00007f6e3c460bc2 in QThreadPrivate::start (arg=0x7f6e3b5b7d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:361
#8  0x00007f6e3a9866db in start_thread (arg=0x7f6e255fa700) at pthread_create.c:463
#9  0x00007f6e3bd6088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f6e31fe0700 (LWP 1195)):
#0  0x00007f6e3bd53bf9 in __GI___poll (fds=0x7f6e31fdfcb8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f6e37b8f747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f6e37b9136a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f6e3355b32a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f6e3c460bc2 in QThreadPrivate::start (arg=0x55f693d9bf80) at thread/qthread_unix.cpp:361
#5  0x00007f6e3a9866db in start_thread (arg=0x7f6e31fe0700) at pthread_create.c:463
#6  0x00007f6e3bd6088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f6e3dd92800 (LWP 1187)):
[KCrash Handler]
#6  GlobalShortcut::isPresent (this=this@entry=0x32002e0031003a) at ./src/runtime/globalshortcut.cpp:106
#7  0x00007f6e3d997af0 in KdeDGlobalAccel::Component::cleanUp (this=0x55f693e1afb0) at ./src/runtime/component.cpp:166
#8  0x00007f6e3d9a099b in KdeDGlobalAccel::Component::qt_static_metacall (_o=_o@entry=0x55f693e1afb0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=1, _a=_a@entry=0x7ffe4392cc50) at ./obj-x86_64-linux-gnu/src/runtime/KF5GlobalAccelPrivate_autogen/EWIEGA46WW/moc_component.cpp:130
#9  0x00007f6e3d9a0d85 in KdeDGlobalAccel::Component::qt_metacall (this=0x55f693e1afb0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7ffe4392cc50) at ./obj-x86_64-linux-gnu/src/runtime/KF5GlobalAccelPrivate_autogen/EWIEGA46WW/moc_component.cpp:205
#10 0x00007f6e3b34b128 in QDBusConnectionPrivate::deliverCall (this=this@entry=0x7f6e20003f10, object=object@entry=0x55f693e1afb0, msg=..., metaTypes=..., slotIdx=<optimized out>) at qdbusintegrator.cpp:991
#11 0x00007f6e3b34ff80 in QDBusConnectionPrivate::activateCall (this=this@entry=0x7f6e20003f10, object=0x55f693e1afb0, flags=240, msg=...) at qdbusintegrator.cpp:894
#12 0x00007f6e3b350467 in QDBusConnectionPrivate::activateCall (msg=..., flags=<optimized out>, object=<optimized out>, this=0x7f6e20003f10) at qdbusintegrator.cpp:843
#13 QDBusConnectionPrivate::activateObject (this=0x7f6e20003f10, node=..., msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1501
#14 0x00007f6e3b352f1e in QDBusActivateObjectEvent::placeMetaCall (this=0x7f6e200164e0) at qdbusintegrator.cpp:1597
#15 0x00007f6e3c669992 in QObject::event (this=0x55f693e1afb0, e=<optimized out>) at kernel/qobject.cpp:1249
#16 0x00007f6e3c639328 in QCoreApplication::notifyInternal2 (receiver=0x55f693e1afb0, event=0x7f6e200164e0) at kernel/qcoreapplication.cpp:1061
#17 0x00007f6e3c6394fe in QCoreApplication::sendEvent (receiver=<optimized out>, event=event@entry=0x7f6e200164e0) at kernel/qcoreapplication.cpp:1451
#18 0x00007f6e3c63be87 in QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x55f693d96440) at kernel/qcoreapplication.cpp:1800
#19 0x00007f6e3c63c428 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1654
#20 0x00007f6e3c696b23 in postEventSourceDispatch (s=0x55f693df7740) at kernel/qeventdispatcher_glib.cpp:276
#21 0x00007f6e388a2387 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007f6e388a25c0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f6e388a264c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f6e3c69613f in QEventDispatcherGlib::processEvents (this=0x55f693da2f20, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#25 0x00007f6e3c63764a in QEventLoop::exec (this=this@entry=0x7ffe4392d210, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#26 0x00007f6e3c640800 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1364
#27 0x000055f6936477f7 in main (argc=<optimized out>, argv=<optimized out>) at ./src/runtime/main.cpp:88
Comment 21 Oded Arbel 2019-04-21 00:10:26 UTC
The last build I tested, which I believe is the same build as "kde@thanharding.com" is this: https://cgit.kde.org/kglobalaccel.git/commit/?id=abe32ec599397bda0ce73471519410bee2c16059 .

It still crashes in it.

I haven't tested the latest commit - https://cgit.kde.org/kglobalaccel.git/commit/?id=78a711361db3a5156f511eab89ff7ebbc86b9125
Comment 22 rjx_ 2019-04-22 15:52:28 UTC
78a71136 seems to fix these crashes for me on Arch (tested with https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/kglobalaccel&id=a14f1a4b9e54a43401efa46e5054f41a5c0beca6 ), have not tried it with suspending however.
Comment 23 Oded Arbel 2019-04-25 07:42:25 UTC
The last KCI build solves the problem for me.
Comment 24 Christoph Feck 2019-04-25 08:10:45 UTC
*** Bug 406878 has been marked as a duplicate of this bug. ***
Comment 25 Christoph Feck 2019-04-25 08:12:39 UTC
*** Bug 406846 has been marked as a duplicate of this bug. ***
Comment 26 Tim Richardson 2019-04-25 21:46:02 UTC
thank you, I confirm that this fixes my dup 406642
Comment 27 Christoph Feck 2019-04-26 06:33:52 UTC
*** Bug 406907 has been marked as a duplicate of this bug. ***
Comment 28 Christoph Feck 2019-04-26 09:23:40 UTC
*** Bug 406916 has been marked as a duplicate of this bug. ***
Comment 29 Christoph Feck 2019-04-26 13:37:49 UTC
*** Bug 406920 has been marked as a duplicate of this bug. ***
Comment 30 slartibart70 2019-05-02 23:04:06 UTC
this bug seems still active in fedora30/latest updates,
kf5-kglobalaccel 5.57.0-1.fc30
Or does the fc30 version not yet contain the fixes?

Application: KDE Global Shortcuts Service (kglobalaccel5), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ffa8a2cf6c0 (LWP 12582))]

Thread 3 (Thread 0x7ffa72407700 (LWP 12592)):
#0  0x00007ffd4eb4b65c in ?? ()
#1  0x00007ffa895c0f53 in clock_gettime () from /lib64/libc.so.6
#2  0x00007ffa89b30b85 in ?? () from /lib64/libQt5Core.so.5
#3  0x00007ffa89b2f6dd in QTimerInfoList::updateCurrentTime() () from /lib64/libQt5Core.so.5
#4  0x00007ffa89b2fae9 in QTimerInfoList::timerWait(timespec&) () from /lib64/libQt5Core.so.5
#5  0x00007ffa89b31034 in ?? () from /lib64/libQt5Core.so.5
#6  0x00007ffa89b310e2 in ?? () from /lib64/libQt5Core.so.5
#7  0x00007ffa8876f86a in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#8  0x00007ffa8877020b in ?? () from /lib64/libglib-2.0.so.0
#9  0x00007ffa88770413 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#10 0x00007ffa89b31383 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#11 0x00007ffa89adb26b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#12 0x00007ffa89934725 in QThread::exec() () from /lib64/libQt5Core.so.5
#13 0x00007ffa8938ff3b in ?? () from /lib64/libQt5DBus.so.5
#14 0x00007ffa89935886 in ?? () from /lib64/libQt5Core.so.5
#15 0x00007ffa891b85a2 in start_thread () from /lib64/libpthread.so.0
#16 0x00007ffa895b3023 in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7ffa78e6f700 (LWP 12583)):
#0  0x00007ffa895a82b7 in poll () from /lib64/libc.so.6
#1  0x00007ffa8800538a in ?? () from /lib64/libxcb.so.1
#2  0x00007ffa88006ffa in xcb_wait_for_event () from /lib64/libxcb.so.1
#3  0x00007ffa790b4908 in ?? () from /lib64/libQt5XcbQpa.so.5
#4  0x00007ffa89935886 in ?? () from /lib64/libQt5Core.so.5
#5  0x00007ffa891b85a2 in start_thread () from /lib64/libpthread.so.0
#6  0x00007ffa895b3023 in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7ffa8a2cf6c0 (LWP 12582)):
[KCrash Handler]
#6  0x00007ffa8a3b5180 in ?? () from /lib64/libKF5GlobalAccelPrivate.so.5
#7  0x00007ffa8a3b1da1 in ?? () from /lib64/libKF5GlobalAccelPrivate.so.5
#8  0x00007ffa8a3a8fca in ?? () from /lib64/libKF5GlobalAccelPrivate.so.5
#9  0x00007ffa8a3a9273 in ?? () from /lib64/libKF5GlobalAccelPrivate.so.5
#10 0x00007ffa8939c64b in ?? () from /lib64/libQt5DBus.so.5
#11 0x00007ffa893a1777 in ?? () from /lib64/libQt5DBus.so.5
#12 0x00007ffa893a1ddf in ?? () from /lib64/libQt5DBus.so.5
#13 0x00007ffa893a4ad2 in ?? () from /lib64/libQt5DBus.so.5
#14 0x00007ffa89b073da in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#15 0x00007ffa89adc1e5 in ?? () from /lib64/libQt5Core.so.5
#16 0x00007ffa89adc278 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#17 0x00007ffa89adf1d3 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#18 0x00007ffa89b315e7 in ?? () from /lib64/libQt5Core.so.5
#19 0x00007ffa8876ffd0 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#20 0x00007ffa88770368 in ?? () from /lib64/libglib-2.0.so.0
#21 0x00007ffa88770413 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#22 0x00007ffa89b31369 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#23 0x00007ffa89adb26b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#24 0x00007ffa89ae2f56 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#25 0x00005629a70bc74e in ?? ()
#26 0x00007ffa894dbf33 in __libc_start_main () from /lib64/libc.so.6
#27 0x00005629a70bc7de in ?? ()
[Inferior 1 (process 12582) detached]
Comment 31 Nate Graham 2019-05-02 23:06:07 UTC
As the "version fixed in" field on this page indicates, the fix is in Frameworks 5.58.
Comment 32 Laurent Bonnaud 2019-05-07 12:40:30 UTC
*** Bug 407291 has been marked as a duplicate of this bug. ***
Comment 33 Wolfgang Bauer 2019-06-04 17:50:38 UTC
*** Bug 408230 has been marked as a duplicate of this bug. ***