Bug 410621

Summary: Logout from Wayland session failed because powerdevil crashed in KIdleTimePrivate::unloadCurrentSystem()
Product: [Frameworks and Libraries] frameworks-kidletime Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: nate, postix
Priority: NOR Keywords: wayland-only
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Patrick Silva 2019-08-05 17:57:02 UTC
SUMMARY
I pressed ctrl+alt+del to open the logout screen, I clicked "Log out",
then logout screen immediately froze. I needed to force my laptop to shutdown
by pressing its on/off button. 

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.61.0
Qt Version: 5.12.3


Thread 6 (Thread 0x7fc0cbfff700 (LWP 12966)):
#0  0x00007fc0e0697bf9 in __GI___poll (fds=0x55aabda1b500, nfds=2, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fc0db6775c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fc0db677962 in g_main_loop_run () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fc0d16870e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fc0db69f195 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fc0dd9a96db in start_thread (arg=0x7fc0cbfff700) at pthread_create.c:463
#6  0x00007fc0e06a488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7fc0c9eac700 (LWP 13009)):
#0  0x00007fc0db649b22 in g_ptr_array_remove_range () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fc0db649d47 in g_ptr_array_set_size () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fc0db6773cf in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fc0db677650 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fc0db6776dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fc0e0fdadaf in QEventDispatcherGlib::processEvents (this=0x7fc0bc000b20, flags=...)
    at kernel/qeventdispatcher_glib.cpp:422
#6  0x00007fc0e0f7c03a in QEventLoop::exec (this=this@entry=0x7fc0c9eabda0, flags=..., 
    flags@entry=...) at kernel/qeventloop.cpp:225
#7  0x00007fc0e0da34ca in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#8  0x00007fc0e0da4c72 in QThreadPrivate::start (arg=0x55aabdabdf40) at thread/qthread_unix.cpp:361
#9  0x00007fc0dd9a96db in start_thread (arg=0x7fc0c9eac700) at pthread_create.c:463
#10 0x00007fc0e06a488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7fc0ca6ad700 (LWP 13008)):
#0  0x00007fc0e0697bf9 in __GI___poll (fds=0x7fc0b80020a0, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fc0db6775c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fc0db6776dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fc0e0fdadcb in QEventDispatcherGlib::processEvents (this=0x7fc0b8000b20, flags=...)
    at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fc0e0f7c03a in QEventLoop::exec (this=this@entry=0x7fc0ca6acda0, flags=..., 
    flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007fc0e0da34ca in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#6  0x00007fc0e0da4c72 in QThreadPrivate::start (arg=0x55aabdac6d50) at thread/qthread_unix.cpp:361
#7  0x00007fc0dd9a96db in start_thread (arg=0x7fc0ca6ad700) at pthread_create.c:463
#8  0x00007fc0e06a488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fc0e3b01800 (LWP 12923)):
#0  0x00007fc0e06679d0 in __GI___nanosleep (requested_time=requested_time@entry=0x7ffc6aa8e0a0, 
    remaining=remaining@entry=0x7ffc6aa8e0a0) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1  0x00007fc0e0fda70d in qt_nanosleep (amount=...) at kernel/qelapsedtimer_unix.cpp:195
#2  0x00007fc0e3721c7f in KCrash::defaultCrashHandler (sig=11) at ./src/kcrash.cpp:401
#3  <signal handler called>
#4  __memmove_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:249
#5  0x00007fc0cad2ea56 in memcpy (__len=175440, __src=<optimized out>, __dest=<optimized out>)
    at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#6  QVector<KWayland::Client::ConnectionThread*>::reallocData (
    this=this@entry=0x7fc0cafb30d0 <KWayland::Client::ConnectionThread::Private::connections>, 
    asize=21930, aalloc=<optimized out>, options=..., options@entry=...)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:592
#7  0x00007fc0cad2eb89 in QVector<KWayland::Client::ConnectionThread*>::detach (
    this=0x7fc0cafb30d0 <KWayland::Client::ConnectionThread::Private::connections>)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:390
#8  QVector<KWayland::Client::ConnectionThread*>::erase (
    this=this@entry=0x7fc0cafb30d0 <KWayland::Client::ConnectionThread::Private::connections>, 
    abegin=..., aend=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:815
#9  0x00007fc0cad2e7ae in QVector<KWayland::Client::ConnectionThread*>::remove (i=<optimized out>, 
    this=0x7fc0cafb30d0 <KWayland::Client::ConnectionThread::Private::connections>)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:458
#10 QVector<KWayland::Client::ConnectionThread*>::removeOne (t=@0x55aabda65658: 0x55aabdaadf50, 
    this=0x7fc0cafb30d0 <KWayland::Client::ConnectionThread::Private::connections>)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:180
#11 KWayland::Client::ConnectionThread::Private::~Private (this=0x55aabda65610, 
    __in_chrg=<optimized out>) at ./src/client/connection_thread.cpp:88
#12 0x00007fc0cad2e7f5 in QScopedPointerDeleter<KWayland::Client::ConnectionThread::Private>::cleanup
    (pointer=0x55aabda65610) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qscopedpointer.h:60
#13 QScopedPointer<KWayland::Client::ConnectionThread::Private, QScopedPointerDeleter<KWayland::Client::ConnectionThread::Private> >::~QScopedPointer (this=0x55aabdaadf60, __in_chrg=<optimized out>)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qscopedpointer.h:107
#14 KWayland::Client::ConnectionThread::~ConnectionThread (this=0x55aabdaadf50, 
    __in_chrg=<optimized out>) at ./src/client/connection_thread.cpp:208
#15 0x00007fc0cad2e819 in KWayland::Client::ConnectionThread::~ConnectionThread (this=0x55aabdaadf50, 
    __in_chrg=<optimized out>) at ./src/client/connection_thread.cpp:211
#16 0x00007fc0cafb6dde in Poller::unloadPoller (this=0x55aabdaadd10) at ./src/idletime/poller.cpp:137
#17 0x00007fc0df6cb4dc in KIdleTimePrivate::unloadCurrentSystem (this=0x55aabda26d10)
    at ./src/kidletime.cpp:234
#18 0x00007fc0df6cb540 in KIdleTime::~KIdleTime (this=0x55aabda61950, __in_chrg=<optimized out>)
    at ./src/kidletime.cpp:95
#19 0x00007fc0df6cb5c9 in KIdleTime::~KIdleTime (this=0x55aabda61950, __in_chrg=<optimized out>)
    at ./src/kidletime.cpp:97
#20 0x00007fc0df6cb302 in KIdleTimeHelper::~KIdleTimeHelper (this=<optimized out>, 
    __in_chrg=<optimized out>) at ./src/kidletime.cpp:39
#21 (anonymous namespace)::Q_QGS_s_globalKIdleTime::Holder::~Holder (this=<optimized out>, 
    __in_chrg=<optimized out>) at ./src/kidletime.cpp:46
#22 0x00007fc0e05c6041 in __run_exit_handlers (status=status@entry=1, 
    listp=0x7fc0e096e718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, 
    run_dtors=run_dtors@entry=true) at exit.c:108
#23 0x00007fc0e05c613a in __GI_exit (status=status@entry=1) at exit.c:139
#24 0x00007fc0d371124e in QtWaylandClient::QWaylandDisplay::exitWithError (
    this=this@entry=0x55aabd9d6170) at qwaylanddisplay.cpp:205
#25 0x00007fc0d37112a6 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x55aabd9d6170)
    at qwaylanddisplay.cpp:188
#26 0x00007fc0e0fad875 in QMetaObject::activate (sender=sender@entry=0x55aabd9db100, 
    signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, 
    argv=argv@entry=0x7ffc6aa8eab0) at kernel/qobject.cpp:3795
#27 0x00007fc0e0fadf47 in QMetaObject::activate (sender=sender@entry=0x55aabd9db100, 
    m=m@entry=0x7fc0e142ac60 <QSocketNotifier::staticMetaObject>, 
    local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffc6aa8eab0)
    at kernel/qobject.cpp:3648
#28 0x00007fc0e0fba178 in QSocketNotifier::activated (this=this@entry=0x55aabd9db100, 
    _t1=<optimized out>, _t2=...) at .moc/moc_qsocketnotifier.cpp:140
#29 0x00007fc0e0fba532 in QSocketNotifier::event (this=0x55aabd9db100, e=0x7ffc6aa8eb90)
    at kernel/qsocketnotifier.cpp:266
#30 0x00007fc0e0f7dd18 in QCoreApplication::notifyInternal2 (receiver=0x55aabd9db100, 
    event=0x7ffc6aa8eb90) at kernel/qcoreapplication.cpp:1060
#31 0x00007fc0e0f7deee in QCoreApplication::sendEvent (receiver=<optimized out>, 
    event=event@entry=0x7ffc6aa8eb90) at kernel/qcoreapplication.cpp:1450
#32 0x00007fc0e0fdba18 in socketNotifierSourceDispatch (source=0x55aabd9e6970)
    at kernel/qeventdispatcher_glib.cpp:106
#33 0x00007fc0db677417 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007fc0db677650 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007fc0db6776dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007fc0e0fdadaf in QEventDispatcherGlib::processEvents (this=0x55aabd9e3800, flags=...)
    at kernel/qeventdispatcher_glib.cpp:422
#37 0x00007fc0e0f7c03a in QEventLoop::exec (this=this@entry=0x7ffc6aa8edb0, flags=..., 
    flags@entry=...) at kernel/qeventloop.cpp:225
#38 0x00007fc0e0f85170 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1363
#39 0x000055aabd2ee4df in ?? ()
#40 0x00007fc0e05a4b97 in __libc_start_main (main=0x55aabd2ee380, argc=1, argv=0x7ffc6aa8ef88, 
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc6aa8ef78)
    at ../csu/libc-start.c:310
#41 0x000055aabd2ee54a in _start ()

Thread 2 (Thread 0x7fc0d08c4700 (LWP 12962)):
#0  0x00007fc0e0697bf9 in __GI___poll (fds=0x55aabda01dd0, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fc0db6775c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fc0db6776dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fc0db677721 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fc0db69f195 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fc0dd9a96db in start_thread (arg=0x7fc0d08c4700) at pthread_create.c:463
#6  0x00007fc0e06a488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fc0d29e8700 (LWP 12959)):
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007fc0e372208d in KCrash::defaultCrashHandler (sig=6) at ./src/kcrash.cpp:544
#2  <signal handler called>
#3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#4  0x00007fc0e05c3801 in __GI_abort () at abort.c:79
#5  0x00007fc0e060c897 in __libc_message (action=action@entry=do_abort, 
    fmt=fmt@entry=0x7fc0e0739b9a "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#6  0x00007fc0e061390a in malloc_printerr (str=str@entry=0x7fc0e0737e9e "realloc(): invalid old size")
    at malloc.c:5350
#7  0x00007fc0e06189c4 in _int_realloc (av=av@entry=0x7fc0e096ec40 <main_arena>, 
    oldp=oldp@entry=0x7fc0cc0169b0, oldsize=oldsize@entry=94191814427024, nb=nb@entry=80)
    at malloc.c:4523
#8  0x00007fc0e061bf9b in __GI___libc_realloc (oldmem=oldmem@entry=0x7fc0cc0169c0, bytes=64)
    at malloc.c:3230
#9  0x00007fc0e0db23b9 in reallocateData (options=<optimized out>, allocSize=<optimized out>, 
    header=0x7fc0cc0169c0) at tools/qarraydata.cpp:83
#10 QArrayData::reallocateUnaligned (data=0x7fc0cc0169c0, objectSize=objectSize@entry=1, capacity=40, 
    options=...) at tools/qarraydata.cpp:146
#11 0x00007fc0e0db4c5a in QTypedArrayData<char>::reallocateUnaligned (options=..., capacity=8, 
    data=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qarraydata.h:233
#12 QByteArray::reallocData (this=this@entry=0x7fc0d29e7410, alloc=8, options=...)
    at tools/qbytearray.cpp:1914
#13 0x00007fc0e0db4e2a in QByteArray::resize (this=0x7fc0d29e7410, size=<optimized out>)
    at tools/qbytearray.cpp:1875
#14 0x00007fc0e0db4f85 in QByteArray::truncate (this=this@entry=0x7fc0d29e7410, pos=<optimized out>)
    at tools/qbytearray.cpp:1658
#15 0x00007fc0e0fde8e0 in QUtf8::convertFromUnicode (uc=<optimized out>, len=7)
    at codecs/qutfcodec.cpp:396
#16 0x00007fc0e0e2f708 in qt_convert_to_utf8 (str=...) at tools/qstring.cpp:5423
#17 QString::toUtf8_helper (str=...) at tools/qstring.cpp:5415
#18 0x00007fc0e3721cce in QString::toUtf8() && (this=0x7fc0d29e7418)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:552
#19 KCrash::defaultCrashHandler (sig=11) at ./src/kcrash.cpp:449
#20 <signal handler called>
#21 socketNotifierSourceCheck (source=0x7fc0cc005050) at kernel/qeventdispatcher_glib.cpp:80
#22 0x00007fc0db676fe1 in g_main_context_check () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fc0db677570 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007fc0db6776dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007fc0e0fdadaf in QEventDispatcherGlib::processEvents (this=0x7fc0cc000b20, flags=...)
    at kernel/qeventdispatcher_glib.cpp:422
#26 0x00007fc0e0f7c03a in QEventLoop::exec (this=this@entry=0x7fc0d29e7d70, flags=..., 
    flags@entry=...) at kernel/qeventloop.cpp:225
#27 0x00007fc0e0da34ca in QThread::exec (
    this=this@entry=0x7fc0e16c0d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>)
    at thread/qthread.cpp:531
#28 0x00007fc0e1449015 in QDBusConnectionManager::run (
    this=0x7fc0e16c0d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>)
    at qdbusconnection.cpp:178
#29 0x00007fc0e0da4c72 in QThreadPrivate::start (
    arg=0x7fc0e16c0d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>)
    at thread/qthread_unix.cpp:361
#30 0x00007fc0dd9a96db in start_thread (arg=0x7fc0d29e8700) at pthread_create.c:463
#31 0x00007fc0e06a488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Comment 1 postix 2024-10-17 11:06:31 UTC
Hi Patrick, some time has passed. Have you seen this crash again in a newer Plasma or Qt version? Thanks!
Comment 2 Patrick Silva 2024-10-17 11:24:36 UTC
I have never faced this bug again since the creation of this report.