Bug 395712 - Save session right after login crashes KWin
Summary: Save session right after login crashes KWin
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.12.5
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
: 399376 406078 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-21 23:24 UTC by dckorah
Modified: 2019-03-31 13:51 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dckorah 2018-06-21 23:24:12 UTC
Application: kwin_x11 (5.12.5)

Qt Version: 5.11.0
Frameworks Version: 5.47.0
Operating System: Linux 4.13.0-45-generic x86_64
Distribution: KDE neon LTS User Edition 5.12

-- Information about the crash:
- What I was doing when the application crashed:
Save session from the "App/K Menu > Power/Session > Save Session" right after login crashed KWin.

-- Backtrace:
Application: KWin (kwin_x11), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fe048083940 (LWP 2290))]

Thread 4 (Thread 0x7fe00ef3a700 (LWP 2389)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fe043da1e04 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#2  0x00007fe043da1e49 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#3  0x00007fe040b0d6ba in start_thread (arg=0x7fe00ef3a700) at pthread_create.c:333
#4  0x00007fe047ab741d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fe024a4f700 (LWP 2383)):
#0  0x00007fe047aab811 in __GI_ppoll (fds=fds@entry=0x7fe01c000ac8, nfds=nfds@entry=1, timeout=<optimized out>, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:50
#1  0x00007fe044e6b651 in ppoll (__ss=<optimized out>, __timeout=<optimized out>, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/poll2.h:77
#2  qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7fe01c000ac8) at kernel/qcore_unix.cpp:112
#3  qt_safe_poll (fds=0x7fe01c000ac8, nfds=1, timeout_ts=timeout_ts@entry=0x0) at kernel/qcore_unix.cpp:133
#4  0x00007fe044e6cce2 in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:500
#5  0x00007fe044e171ca in QEventLoop::exec (this=this@entry=0x7fe024a4ec50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#6  0x00007fe044c4c5e4 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:522
#7  0x00007fe03f7accf5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#8  0x00007fe044c57727 in QThreadPrivate::start (arg=0x26f5ad0) at thread/qthread_unix.cpp:367
#9  0x00007fe040b0d6ba in start_thread (arg=0x7fe024a4f700) at pthread_create.c:333
#10 0x00007fe047ab741d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fe026787700 (LWP 2330)):
#0  0x00007fe047aab811 in __GI_ppoll (fds=fds@entry=0x7fe02000bdd8, nfds=nfds@entry=1, timeout=<optimized out>, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:50
#1  0x00007fe044e6b651 in ppoll (__ss=<optimized out>, __timeout=<optimized out>, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/poll2.h:77
#2  qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7fe02000bdd8) at kernel/qcore_unix.cpp:112
#3  qt_safe_poll (fds=0x7fe02000bdd8, nfds=1, timeout_ts=timeout_ts@entry=0x0) at kernel/qcore_unix.cpp:133
#4  0x00007fe044e6cce2 in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:500
#5  0x00007fe044e171ca in QEventLoop::exec (this=this@entry=0x7fe026786c40, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#6  0x00007fe044c4c5e4 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:522
#7  0x00007fe03e6baf35 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007fe044c57727 in QThreadPrivate::start (arg=0x7fe03e933d60) at thread/qthread_unix.cpp:367
#9  0x00007fe040b0d6ba in start_thread (arg=0x7fe026787700) at pthread_create.c:333
#10 0x00007fe047ab741d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fe048083940 (LWP 2290)):
[KCrash Handler]
#6  0x00007fe0479e5428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#7  0x00007fe0479e702a in __GI_abort () at abort.c:89
#8  0x00007fe044c2990d in qt_message_fatal (context=..., message=<synthetic pointer>) at global/qlogging.cpp:1839
#9  QMessageLogger::fatal (this=<optimized out>, msg=<optimized out>) at global/qlogging.cpp:877
#10 0x00007fe0475d9902 in KWin::Workspace::windowTypeToTxt(NET::WindowType) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#11 0x00007fe0475dde88 in KWin::Workspace::storeClient(KConfigGroup&, int, KWin::Client*) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#12 0x00007fe0475deb10 in KWin::Workspace::storeSession(KConfig*, KWin::SMSavePhase) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#13 0x00007fe0475ded55 in KWin::Workspace::saveState(QSessionManager&) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#14 0x00007fe044e45eb6 in QtPrivate::QSlotObjectBase::call (a=0x7fffd8a23910, r=0x25d38d0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:376
#15 QMetaObject::activate (sender=0x7fffd8a245f0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7fffd8a23910) at kernel/qobject.cpp:3754
#16 0x00007fe044e46497 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7fe045a73120 <QGuiApplication::staticMetaObject>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7fffd8a23910) at kernel/qobject.cpp:3633
#17 0x00007fe0453d1d95 in QGuiApplication::saveStateRequest (this=<optimized out>, _t1=...) at .moc/moc_qguiapplication.cpp:446
#18 0x00007fe0453d407b in QGuiApplicationPrivate::saveState (this=0x252b070) at kernel/qguiapplication.cpp:3605
#19 0x00007fe0454125b3 in QPlatformSessionManager::appSaveState (this=this@entry=0x2541a60) at kernel/qplatformsessionmanager.cpp:147
#20 0x00007fe02da0f318 in sm_performSaveYourself (sm=0x2541a60) at qxcbsessionmanager.cpp:245
#21 0x00007fe042a8f39e in _SmcProcessMessage () from /usr/lib/x86_64-linux-gnu/libSM.so.6
#22 0x00007fe042ca3167 in IceProcessMessages () from /usr/lib/x86_64-linux-gnu/libICE.so.6
#23 0x00007fe044e45b89 in QMetaObject::activate (sender=sender@entry=0x25634d0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffd8a240b0) at kernel/qobject.cpp:3771
#24 0x00007fe044e46497 in QMetaObject::activate (sender=sender@entry=0x25634d0, m=m@entry=0x7fe045299c60 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffd8a240b0) at kernel/qobject.cpp:3633
#25 0x00007fe044e52148 in QSocketNotifier::activated (this=this@entry=0x25634d0, _t1=7, _t2=...) at .moc/moc_qsocketnotifier.cpp:136
#26 0x00007fe044e524fb in QSocketNotifier::event (this=0x25634d0, e=<optimized out>) at kernel/qsocketnotifier.cpp:266
#27 0x00007fe045be229c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007fe045be9917 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007fe044e18e38 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x25634d0, event=event@entry=0x7fffd8a24310) at kernel/qcoreapplication.cpp:1048
#30 0x00007fe044e6c9bd in QCoreApplication::sendEvent (event=0x7fffd8a24310, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#31 QEventDispatcherUNIXPrivate::activateSocketNotifiers (this=this@entry=0x2564020) at kernel/qeventdispatcher_unix.cpp:304
#32 0x00007fe044e6cd7d in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=..., flags@entry=...) at kernel/qeventdispatcher_unix.cpp:509
#33 0x00007fe02da5bf1d in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at qunixeventdispatcher.cpp:68
#34 0x00007fe044e171ca in QEventLoop::exec (this=this@entry=0x7fffd8a244d0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#35 0x00007fe044e202d4 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1336
#36 0x00007fe047d831f9 in kdemain () from /usr/lib/x86_64-linux-gnu/libkdeinit5_kwin_x11.so
#37 0x00007fe0479d0830 in __libc_start_main (main=0x4006b0, argc=3, argv=0x7fffd8a24788, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffd8a24778) at ../csu/libc-start.c:291
#38 0x00000000004006e9 in _start ()

Possible duplicates by query: bug 392092.

Reported using DrKonqi
Comment 1 David Edmundson 2018-06-22 00:14:23 UTC
Heh, we added OnScreenDisplay as a type and this code isn't updated. Almost certainly that.

Will fix.
Comment 2 David Edmundson 2018-06-27 00:36:28 UTC
Git commit 2693e288c57a66facbe6b9932ce8628a53afb246 by David Edmundson.
Committed on 27/06/2018 at 00:36.
Pushed by davidedmundson into branch 'Plasma/5.13'.

Avoid potential assert in SM saving

Summary:
Sesison Manager stores all relevant clients. There's an assert if the
window type is outside of the standard client window types. It assumed
that all windows outside this would be Unmanaged windows rather than
Client objects, something probably true but not something enforced.

This particular crash was probably cased as we have a new window type in
Plasma OSD, which does not set BypassWindowManager in Qt window flags.

Test Plan:
Set to restore session
Logged out and back in
Saw some windows

Set to restore manually saved session
Hit save
No crash

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

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

M  +8    -0    sm.cpp

https://commits.kde.org/kwin/2693e288c57a66facbe6b9932ce8628a53afb246
Comment 3 David Edmundson 2018-10-04 14:48:27 UTC
*** Bug 399376 has been marked as a duplicate of this bug. ***
Comment 4 David Edmundson 2019-03-31 13:41:30 UTC
*** Bug 406078 has been marked as a duplicate of this bug. ***
Comment 5 David Edmundson 2019-03-31 13:51:42 UTC
Git commit 835455939f4955baf88e2343c50b1df0f6e8cf5e by David Edmundson.
Committed on 31/03/2019 at 13:51.
Pushed by davidedmundson into branch 'Plasma/5.12'.

Avoid potential assert in SM saving

Summary:
Sesison Manager stores all relevant clients. There's an assert if the
window type is outside of the standard client window types. It assumed
that all windows outside this would be Unmanaged windows rather than
Client objects, something probably true but not something enforced.

This particular crash was probably cased as we have a new window type in
Plasma OSD, which does not set BypassWindowManager in Qt window flags.

Test Plan:
Set to restore session
Logged out and back in
Saw some windows

Set to restore manually saved session
Hit save
No crash

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

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

M  +8    -0    sm.cpp

https://commits.kde.org/kwin/835455939f4955baf88e2343c50b1df0f6e8cf5e