Bug 357413

Summary: kde crash on user swap
Product: [Unmaintained] ksmserver Reporter: laurie jarden <lauriej>
Component: generalAssignee: Lubos Lunak <l.lunak>
Status: RESOLVED WORKSFORME    
Severity: crash CC: andrew.crouthamel, cpigat242, fabian, kde-0egtnzvt, kde, mike, simonandric5, wawalkenhorst, wbauer1
Priority: NOR Keywords: drkonqi
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Crash Report
Crash Report
patch that fixes the crash

Description laurie jarden 2016-01-02 05:13:42 UTC
Application: ksmserver ()
 (Compiled from sources)
Qt Version: 5.5.1
Operating System: Linux 4.3.3-2-default x86_64
Distribution: "openSUSE Tumbleweed (20151229) (x86_64)"

-- Information about the crash:
graphic user interface crashes and replaced with black screen and crash report assistant when attempting to swap user

The crash can be reproduced every time.

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

Thread 3 (Thread 0x7f60e1de6700 (LWP 10669)):
#0  0x00007f6104fcf07f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f60e2fcdd6a in ?? () from /usr/lib64/dri/radeonsi_dri.so
#2  0x00007f60e2fcd597 in ?? () from /usr/lib64/dri/radeonsi_dri.so
#3  0x00007f6104fc94a4 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f610f183bdd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f60ec8a9700 (LWP 10671)):
#0  0x00007f61036a14d4 in g_mutex_unlock () from /usr/lib64/libglib-2.0.so.0
#1  0x00007f610365d910 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f610365e193 in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f610365e36c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f6109d4852b in QEventDispatcherGlib::processEvents (this=0x7f60b8209ae0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#5  0x00007f6109cf263a in QEventLoop::exec (this=this@entry=0x7f60ec8a8c70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007f6109b1eb1c in QThread::exec (this=this@entry=0x12b2060) at thread/qthread.cpp:503
#7  0x00007f610d3379a5 in QQmlThreadPrivate::run (this=0x12b2060) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/ftw/qqmlthread.cpp:141
#8  0x00007f6109b2394f in QThreadPrivate::start (arg=0x12b2060) at thread/qthread_unix.cpp:331
#9  0x00007f6104fc94a4 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f610f183bdd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f610f83b940 (LWP 9305)):
[KCrash Handler]
#6  ref (this=0x4) at /usr/include/qt5/QtCore/qrefcount.h:54
#7  toQString (this=<optimized out>) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/jsruntime/qv4string_p.h:84
#8  toQString (this=<optimized out>) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/jsruntime/qv4string_p.h:145
#9  QV4::Heap::StringObject::StringObject (this=<optimized out>, engine=0x1260510, val=...) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/jsruntime/qv4stringobject.cpp:91
#10 0x00007f610d1fc885 in alloc<QV4::StringObject, QV4::ExecutionEngine*, QV4::Value> (arg2=..., arg1=0x1260510, this=<optimized out>) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/jsruntime/qv4mm_p.h:126
#11 QV4::ExecutionEngine::newStringObject (this=0x1260510, value=...) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/jsruntime/qv4engine.cpp:557
#12 0x00007f610d29075e in QV4::Runtime::getProperty (engine=0x1260510, object=..., nameIndex=<optimized out>) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/jsruntime/qv4runtime.cpp:682
#13 0x00007f610ce3f0b5 in ?? ()
#14 0x00000000012a6220 in ?? ()
#15 0x00007ffff211aa50 in ?? ()
#16 0x0000000400000003 in ?? ()
#17 0x00007f610d28f393 in call (d=<optimized out>, this=<optimized out>) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/jsruntime/qv4object_p.h:305
#18 QV4::RuntimeHelpers::objectDefaultValue (object=0x7ffff211aa50, typeHint=<optimized out>) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/jsruntime/qv4runtime.cpp:408
#19 0x00007f610d236b7a in QV4::SimpleScriptFunction::call (that=<optimized out>, callData=<optimized out>) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/jsruntime/qv4functionobject.cpp:564
#20 0x00007f610d31dd2e in call (d=0x7f60d7e83008, this=<optimized out>) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/jsruntime/qv4object_p.h:305
#21 QQmlJavaScriptExpression::evaluate (this=this@entry=0x10d4110, context=<optimized out>, function=..., callData=callData@entry=0x7f60d7e83008, isUndefined=isUndefined@entry=0x7ffff211ac88) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmljavascriptexpression.cpp:158
#22 0x00007f610d31e23d in QQmlJavaScriptExpression::evaluate (this=this@entry=0x10d4110, context=<optimized out>, function=..., isUndefined=isUndefined@entry=0x7ffff211ac88) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmljavascriptexpression.cpp:116
#23 0x00007f610d3246e4 in QQmlBinding::update (this=0x10d40f0, flags=...) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlbinding.cpp:194
#24 0x00007f610d32d786 in setEnabled (f=..., e=true, this=0x10d4128) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlabstractbinding_p.h:110
#25 QQmlObjectCreator::finalize (this=0x10eac30, interrupt=...) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlobjectcreator.cpp:1194
#26 0x00007f610d2c0eca in QQmlIncubatorPrivate::incubate (this=this@entry=0x10eab60, i=...) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlincubator.cpp:348
#27 0x00007f610d2c1847 in QQmlEnginePrivate::incubate (this=this@entry=0x12a6220, i=..., forContext=forContext@entry=0x10eaa80) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlincubator.cpp:87
#28 0x00007f610d2bd2ec in QQmlComponent::create (this=<optimized out>, incubator=..., context=<optimized out>, forContext=forContext@entry=0x0) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlcomponent.cpp:1068
#29 0x00007f610d8bc31a in QQuickLoaderPrivate::_q_sourceLoaded (this=this@entry=0x17afa80) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/quick/items/qquickloader.cpp:714
#30 0x00007f610d8bc498 in QQuickLoaderPrivate::load (this=0x17afa80) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/quick/items/qquickloader.cpp:597
#31 0x00007f610d32d852 in QQmlObjectCreator::finalize (this=0xf8e9d0, interrupt=...) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlobjectcreator.cpp:1207
#32 0x00007f610d2c0eca in QQmlIncubatorPrivate::incubate (this=this@entry=0x107ccc0, i=...) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlincubator.cpp:348
#33 0x00007f610d2c1847 in QQmlEnginePrivate::incubate (this=this@entry=0x12a6220, i=..., forContext=forContext@entry=0x10a0bd0) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlincubator.cpp:87
#34 0x00007f610d2bd2ec in QQmlComponent::create (this=<optimized out>, incubator=..., context=<optimized out>, forContext=forContext@entry=0x0) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlcomponent.cpp:1068
#35 0x00007f610d8bc31a in QQuickLoaderPrivate::_q_sourceLoaded (this=this@entry=0x10efdb0) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/quick/items/qquickloader.cpp:714
#36 0x00007f610d8bc498 in QQuickLoaderPrivate::load (this=0x10efdb0) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/quick/items/qquickloader.cpp:597
#37 0x00007f610d32d852 in QQmlObjectCreator::finalize (this=0xefca20, interrupt=...) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlobjectcreator.cpp:1207
#38 0x00007f610d2bcd04 in QQmlComponentPrivate::complete (enginePriv=0x12a6220, state=0x1091630) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlcomponent.cpp:928
#39 0x00007f610d2bcdc7 in QQmlComponentPrivate::completeCreate (this=0x1091590) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlcomponent.cpp:964
#40 0x00007f610d2bcc70 in QQmlComponent::create (this=0xfa53a0, context=0xef29d0) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlcomponent.cpp:791
#41 0x00007f610d8c33ad in QQuickView::continueExecute (this=this@entry=0x1757d50) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/quick/items/qquickview.cpp:476
#42 0x00007f610d8c3aad in QQuickViewPrivate::execute (this=0x10cc6e0) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/quick/items/qquickview.cpp:124
#43 0x00007f610d8c3bda in QQuickView::setSource (this=this@entry=0x1757d50, url=...) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/quick/items/qquickview.cpp:253
#44 0x00007f610f45f7ce in KSMSwitchUserDialog::KSMSwitchUserDialog (this=0x1757d50, dm=<optimized out>, parent=<optimized out>) at /usr/src/debug/plasma-workspace-5.5.1/ksmserver/switchuserdialog.cpp:92
#45 0x00007f610f455827 in KSMServer::openSwitchUserDialog (this=<optimized out>) at /usr/src/debug/plasma-workspace-5.5.1/ksmserver/server.cpp:1095
#46 0x00007f610f472b85 in openSwitchUserDialog (this=<optimized out>) at /usr/src/debug/plasma-workspace-5.5.1/build/ksmserver/ksmserverinterfaceadaptor.cpp:63
#47 KSMServerInterfaceAdaptor::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7ffff211b900) at /usr/src/debug/plasma-workspace-5.5.1/build/ksmserver/ksmserverinterfaceadaptor.moc:170
#48 0x00007f610f472d95 in KSMServerInterfaceAdaptor::qt_metacall (this=0xcd4170, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7ffff211b900) at /usr/src/debug/plasma-workspace-5.5.1/build/ksmserver/ksmserverinterfaceadaptor.moc:232
#49 0x00007f610bd84403 in QDBusConnectionPrivate::deliverCall (this=this@entry=0xc9b390, object=object@entry=0xcd4170, msg=..., metaTypes=..., slotIdx=12) at qdbusintegrator.cpp:978
#50 0x00007f610bd8818f in QDBusConnectionPrivate::activateCall (this=this@entry=0xc9b390, object=0xcd4170, flags=flags@entry=273, msg=...) at qdbusintegrator.cpp:892
#51 0x00007f610bd88a63 in QDBusConnectionPrivate::activateObject (this=0xc9b390, node=..., msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1462
#52 0x00007f610bd89b8e in QDBusActivateObjectEvent::placeMetaCall (this=0x106f970) at qdbusintegrator.cpp:1580
#53 0x00007f6109d22d79 in QObject::event (this=0xcb6ea0, e=<optimized out>) at kernel/qobject.cpp:1239
#54 0x00007f610a9db8cc in QApplicationPrivate::notify_helper (this=this@entry=0xc23190, receiver=receiver@entry=0xcb6ea0, e=e@entry=0x106f970) at kernel/qapplication.cpp:3716
#55 0x00007f610a9e09d6 in QApplication::notify (this=0xc10170, receiver=0xcb6ea0, e=0x106f970) at kernel/qapplication.cpp:3499
#56 0x00007f6109cf4cf3 in QCoreApplication::notifyInternal (this=0xc10170, receiver=0xcb6ea0, event=event@entry=0x106f970) at kernel/qcoreapplication.cpp:965
#57 0x00007f6109cf7016 in sendEvent (event=0x106f970, receiver=<optimized out>) at kernel/qcoreapplication.h:224
#58 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0xc0cf90) at kernel/qcoreapplication.cpp:1593
#59 0x00007f6109cf74f8 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1451
#60 0x00007f6109d48103 in postEventSourceDispatch (s=0xc94520) at kernel/qeventdispatcher_glib.cpp:271
#61 0x00007f610365e097 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#62 0x00007f610365e2c8 in ?? () from /usr/lib64/libglib-2.0.so.0
#63 0x00007f610365e36c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#64 0x00007f6109d4850f in QEventDispatcherGlib::processEvents (this=0xc871e0, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#65 0x00007f6109cf263a in QEventLoop::exec (this=this@entry=0x7ffff211c030, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#66 0x00007f6109cfa2fd in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#67 0x00007f610f454186 in kdemain (argc=1, argv=<optimized out>) at /usr/src/debug/plasma-workspace-5.5.1/ksmserver/main.cpp:349
#68 0x00007f610f0ba610 in __libc_start_main () from /lib64/libc.so.6
#69 0x0000000000400849 in _start () at ../sysdeps/x86_64/start.S:118

Reported using DrKonqi
Comment 1 Fabian Vogt 2016-02-10 16:17:12 UTC
Happens for me as well, but only (and perfectly reliably) when clicking "New Session" for the second time. The backtrace looks similiar to bug 351839 in KWin.
Comment 2 Kai Uwe Broulik 2016-02-25 21:24:39 UTC
Can you check whether this still happens with https://quickgit.kde.org/?p=plasma-workspace.git&a=commit&h=7a0096ba99d7a71ae9f45d7c0011d0ebb1eae23d ? The dialog is no longer immediately destroyed after switching, perhaps this was causing QML to get confused.
Comment 3 Wolfgang Bauer 2016-02-26 22:21:05 UTC
(In reply to Kai Uwe Broulik from comment #2)
> Can you check whether this still happens with
> https://quickgit.kde.org/?p=plasma-workspace.
> git&a=commit&h=7a0096ba99d7a71ae9f45d7c0011d0ebb1eae23d ?

As I already wrote in bug#356945, the crashes remain.
(I'm using Qt 5.5.1, Frameworks 5.19.0, and Plasma 5.5.4 in case it matters)

I tried an openSUSE Krypton LiveCD (containing the latest stuff from git master) yesterday, and this showed the crashes as well.
But on that I upgraded Qt to 5.6 today, this seems to have fixed the crashes.
So it might actually be a bug in Qt 5.5.1?
Comment 4 Kai Uwe Broulik 2016-02-26 23:09:18 UTC
I'm running Qt 5.5.1 and it doesn't crash for me.
Comment 5 laurie jarden 2016-02-29 04:21:01 UTC
Opensuse tumbleweed fully updated as of 29/02/2016 and I still get crashes when swapping users.
The KDE Plasma 5 swap user widget works perfectly as an alternative to using the main application launcher.
Comment 6 Wolfgang Bauer 2016-03-02 14:03:51 UTC
*** Bug 359737 has been marked as a duplicate of this bug. ***
Comment 7 WAWalkenhorst 2016-03-02 16:41:19 UTC
Created attachment 97640 [details]
Crash Report
Comment 8 WAWalkenhorst 2016-03-02 16:42:00 UTC
Created attachment 97641 [details]
Crash Report
Comment 9 Wolfgang Bauer 2016-03-14 11:18:28 UTC
Created attachment 97889 [details]
patch that fixes the crash

The attached patch to qtdeclarative 5.5.1 prevents the crashes here.

I think I'll just add this to openSUSE's Qt 5.5.1 packages.
As mentioned, it seems to be fixed with Qt 5.6 anyway.
Comment 10 Wolfgang Bauer 2016-03-14 16:58:54 UTC
*** Bug 357412 has been marked as a duplicate of this bug. ***
Comment 11 Andrew Crouthamel 2018-11-01 13:52:11 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Michael Harnden 2018-11-01 14:44:22 UTC
(In reply to Andrew Crouthamel from comment #11)
> Dear Bug Submitter,
> 
> This bug has been stagnant for a long time. Could you help us out and
> re-test if the bug is valid in the latest version? I am setting the status
> to NEEDSINFO pending your response, please change the Status back to
> REPORTED when you respond.
> 
> Thank you for helping us make KDE software even better for everyone!

I can report that this works fine in the latest version.
Comment 13 Andrew Crouthamel 2018-11-01 15:23:12 UTC
Thanks for the update!
Comment 14 laurie jarden 2018-11-02 01:53:11 UTC
(In reply to Andrew Crouthamel from comment #11)
> Dear Bug Submitter,
> 
> This bug has been stagnant for a long time. Could you help us out and
> re-test if the bug is valid in the latest version? I am setting the status
> to NEEDSINFO pending your response, please change the Status back to
> REPORTED when you respond.
> 
> Thank you for helping us make KDE software even better for everyone!

Working fie for me also.