Bug 350305

Summary: kdeinit crashed twice when Xorg crashed
Product: [Unmaintained] ksmserver Reporter: Dāvis <davispuh>
Component: generalAssignee: Lubos Lunak <l.lunak>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kdelibs-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Dāvis 2015-07-16 22:25:28 UTC
Using latest compiled versions from git with Qt 5.5
When Xorg crashed it also made kdeinit  crash, but I think it should just quit with error code.

kdeinit crashed with ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 1f0e890. Receiver '' (of type 'QProcess') was created in thread 1de7ae0"
and 2nnd time crashed with QXcbConnection: Could not connect to display :0

From journal

kded5[2038]: The X11 connection broke (error 1). Did the X11 server die?
kdeinit5[2029]: The X11 connection broke (error 1). Did the X11 server die?
kactivitymanagerd[2068]: The X11 connection broke (error 1). Did the X11 server die?
polkitd[1817]: Unregistered Authentication Agent for unix-session:c2 (system bus name :1.43, object path 
kdeinit5[2028]: kdeinit5: Fatal IO error: client killed
kdeinit5[2028]: kdeinit5: sending SIGHUP to children.
kdeinit5[2028]: kdeinit5: sending SIGTERM to children.
kdeinit5[2028]: kdeinit5: Exit.
kdeinit5[2123]: The X11 connection broke (error 1). Did the X11 server die?
kglobalaccel5[2058]: The X11 connection broke (error 1). Did the X11 server die?
kwin_x11[2127]: The X11 connection broke (error 1). Did the X11 server die?
kscreen_backend_launcher[2100]: The X11 connection broke (error 1). Did the X11 server die?
kdeinit5[2123]: QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
kdeinit5[2123]: QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
sddm[749]: Display server stopped.
sddm[749]: Running display stop script  "/usr/share/sddm/scripts/Xstop"
kdeinit5[2123]: QtDBus: cannot relay signals from parent QObject(0x1e74210 "") unless they are emitted in the object's thread QThread(0x1de7ae0 ""). Current thread is QXcbEventReader(0x1f0e890 "").
kdeinit5[2123]: QProcess: Destroyed while process ("kwin_x11") is still running.
systemd-logind[740]: Removed session c1.
systemd[1]: Stopping User Manager for UID 997...
ca.desrt.dconf[1992]: g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
org.a11y.Bus[1992]: g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
kdeinit5[2123]: QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
kdeinit5[2123]: ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 1f0e890. Receiver '' (of type 'QProcess') was created in thread 1de7ae0", file kernel/qcoreapplication.cpp, line 553
sudo[4803]: pam_unix(sudo:session): session closed for user root
systemd[1645]: Reached target Shutdown.
systemd[1645]: Starting Shutdown.
systemd[1645]: Starting Exit the Session...
systemd[1645]: Stopped target Default.
systemd[1645]: Stopping Default.
systemd[1645]: Stopped target Basic System.
systemd[1645]: Stopping Basic System.
systemd[1645]: Stopped target Sockets.
systemd[1645]: Stopping Sockets.
ystemd[1645]: Stopped target Paths.
systemd[1645]: Stopping Paths.
sddm[749]: Socket server stopping...
systemd[1645]: Stopping Timers.
kdeinit5[13371]: QXcbConnection: Could not connect to display :0
kernel: show_signal_msg: 32 callbacks suppressed
kernel: kactivitymanage[2068]: segfault at 7f5ea5e7dd10 ip 00007f5ea60cc8a1 sp 00007ffe53c452a8 error 4 i
sddm-helper[1977]: [PAM] Ended.
sddm[749]: Socket server stopped.
sddm[749]: Removing display ":0" ...
systemd-coredump[13323]: Process 2123 (ksmserver) of user 1000 dumped core.
systemd-coredump[13195]: Process 1272 (Xorg) of user 0 dumped core.
systemd[1645]: Received SIGRTMIN+24 from PID 13315 (kill).
sddm[749]: Display server starting...
systemd-coredump[13406]: Process 13371 (klauncher) of user 1000 dumped core.
sddm[749]: Running: /usr/bin/X -auth /var/run/sddm/{f7b0f55d-57c8-4aa7-a49d-b717e53259d6} -nolisten tcp -
systemd[1]: Stopped User Manager for UID 997.
systemd[1]: Removed slice user-997.slice.
systemd[1]: Stopping user-997.slice.
systemd-coredump[13407]: Process 2068 (kactivitymanage) of user 1000 dumped core.
org.kde.kuiserver[1992]: kuiserver: Fatal IO error: client killed
sddm[749]: Running display setup script  "/usr/share/sddm/scripts/Xsetup"
sddm[749]: Display server started.


Call stack for first crash (ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread.)

#0  0x00007f7f0f37b528 in raise () from /usr/lib/libc.so.6
#1  0x00007f7f10c5bb80 in KCrash::defaultCrashHandler (sig=6) at /mnt/AUR/kcrash-git/src/kcrash/src/kcrash.cpp:409
#2  <signal handler called>
#3  0x00007f7f0f37b528 in raise () from /usr/lib/libc.so.6
#4  0x00007f7f0f37c93a in abort () from /usr/lib/libc.so.6
#5  0x00007f7f0f77e4a9 in qt_message_fatal (context=..., message=<synthetic pointer>) at global/qlogging.cpp:1577
#6  QMessageLogger::fatal (this=this@entry=0x7f7ef7505b30, 
    msg=msg@entry=0x7f7f0f9eb2b0 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:781
#7  0x00007f7f0f7792b7 in qt_assert_x (where=where@entry=0x7f7f0fa98cd2 "QCoreApplication::sendEvent", what=<optimized out>,
    file=file@entry=0x7f7f0fa98c84 "kernel/qcoreapplication.cpp", line=line@entry=553) at global/qglobal.cpp:2975
#8  0x00007f7f0f942593 in QCoreApplicationPrivate::checkReceiverThread (this=this@entry=0x1eebff0, receiver=receiver@entry=
    0x1e89a30) at kernel/qcoreapplication.cpp:545
#9  0x00007f7f0df8a015 in QApplication::notify (this=0x1ee8c80, receiver=0x1e89a30, e=0x7f7ef7505ff0)
    at kernel/qapplication.cpp:3023
#10 0x00007f7f0f9429dc in QCoreApplication::notifyInternal (this=0x1ee8c80, receiver=0x1e89a30, event=event@entry=0x7f7ef7505ff0)
    at kernel/qcoreapplication.cpp:965
#11 0x00007f7f0f977402 in sendEvent (event=0x7f7ef7505ff0, receiver=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:224
#12 QObjectPrivate::setParent_helper (this=this@entry=0x1e8b210, o=o@entry=0x0) at kernel/qobject.cpp:1970
#13 0x00007f7f0f977c2b in QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1031
#14 0x00007f7f0f97c1b9 in QSocketNotifier::~QSocketNotifier (this=0x1e8b5b0, __in_chrg=<optimized out>)
    at kernel/qsocketnotifier.cpp:195
#15 0x00007f7f0f8e6527 in QProcessPrivate::waitForDeadChild (this=this@entry=0x1e8a8e0) at io/qprocess_unix.cpp:1104
#16 0x00007f7f0f894136 in QProcessPrivate::_q_processDied (this=this@entry=0x1e8a8e0) at io/qprocess.cpp:1043
#17 0x00007f7f0f8e6239 in QProcessPrivate::waitForFinished (this=this@entry=0x1e8a8e0, msecs=msecs@entry=30000)
    at io/qprocess_unix.cpp:1069
#18 0x00007f7f0f88be3f in QProcess::waitForFinished (this=this@entry=0x1e89a30, msecs=msecs@entry=30000) at io/qprocess.cpp:1849
#19 0x00007f7f0f88c3e1 in QProcess::~QProcess (this=0x1e89a30, __in_chrg=<optimized out>) at io/qprocess.cpp:1189
#20 0x00007f7f0f0ed501 in KProcess::~KProcess (this=0x1e89a30, __in_chrg=<optimized out>)
    at /mnt/AUR/kcoreaddons-git/src/kcoreaddons/src/lib/io/kprocess.cpp:57
#21 0x00007f7f0f97693a in QObjectPrivate::deleteChildren (this=this@entry=0x1e73ed0) at kernel/qobject.cpp:1944
#22 0x00007f7f0f977bf7 in QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1024
#23 0x00007f7efbe6efb9 in KSMServer::~KSMServer (this=0x1e74210, __in_chrg=<optimized out>)
    at /mnt/AUR/plasma-workspace-git/src/plasma-workspace/ksmserver/server.cpp:739
#24 0x00007f7efbe6d4ac in sighandler (sig=<optimized out>)
    at /mnt/AUR/plasma-workspace-git/src/plasma-workspace/ksmserver/server.cpp:541
#25 <signal handler called>
#26 sighandler (sig=1) at /mnt/AUR/plasma-workspace-git/src/plasma-workspace/ksmserver/server.cpp:531
#27 <signal handler called>
#28 0x00007f7f0f3c2f94 in free () from /usr/lib/libc.so.6
#29 0x00007f7f0c00d566 in ?? () from /usr/lib/libglib-2.0.so.0
#30 0x00007f7f0c00d728 in ?? () from /usr/lib/libglib-2.0.so.0
#31 0x00007f7f0da0e3d9 in __nptl_deallocate_tsd.part.5 () from /usr/lib/libpthread.so.0
#32 0x00007f7f0da0f41d in start_thread () from /usr/lib/libpthread.so.0
#33 0x00007f7f0f42fbfd in clone () from /usr/lib/libc.so.6


for second crash (QXcbConnection: Could not connect to display :0)

#0  0x00007ff584973528 in raise () from /usr/lib/libc.so.6
#1  0x00007ff58497493a in abort () from /usr/lib/libc.so.6
#2  0x00007ff584d764a9 in qt_message_fatal (context=..., message=<synthetic pointer>) at global/qlogging.cpp:1577
#3  QMessageLogger::fatal (this=this@entry=0x7ffd6d7684b0,
    msg=msg@entry=0x7ff571051058 "QXcbConnection: Could not connect to display %s") at global/qlogging.cpp:781
#4  0x00007ff570fcb570 in QXcbConnection::QXcbConnection (this=0x206a3a0, nativeInterface=0x206a0d0,
    canGrabServer=<optimized out>, defaultVisualId=<optimized out>, displayName=0x0) at qxcbconnection.cpp:477
#5  0x00007ff570fd1923 in QXcbIntegration::QXcbIntegration (this=<optimized out>, parameters=..., argc=<optimized out>,
    argv=<optimized out>) at qxcbintegration.cpp:177
#6  0x00007ff571289283 in QXcbIntegrationPlugin::create (this=<optimized out>, system=..., parameters=...,
    argc=@0x7ffd6d7689fc: 2, argv=0x2046200) at qxcbmain.cpp:50
#7  0x00007ff58546be42 in loadIntegration (argv=0x2046200, argc=@0x7ffd6d7689fc: 2, parameters=..., key=...,
    loader=0x7ff585a75c10 <_ZZN12_GLOBAL__N_112Q_QGS_loader13innerFunctionEvE6holder>)
    at kernel/qplatformintegrationfactory.cpp:56
#8  QPlatformIntegrationFactory::create (platform=..., paramList=..., argc=@0x7ffd6d7689fc: 2, argv=argv@entry=0x2046200,
    platformPluginPath=...) at kernel/qplatformintegrationfactory.cpp:73
#9  0x00007ff585476837 in init_platform (argv=0x2046200, argc=<optimized out>, platformThemeName=..., platformPluginPath=...,
    pluginArgument=...) at kernel/qguiapplication.cpp:1020
#10 QGuiApplicationPrivate::createPlatformIntegration (this=0x205d9e0) at kernel/qguiapplication.cpp:1177
#11 0x00007ff58547765d in QGuiApplicationPrivate::createEventDispatcher (this=<optimized out>) at kernel/qguiapplication.cpp:1194
#12 0x00007ff584f3fade in QCoreApplication::init (this=this@entry=0x7ffd6d768a30) at kernel/qcoreapplication.cpp:768
#13 0x00007ff584f3fc56 in QCoreApplication::QCoreApplication (this=0x7ffd6d768a30, p=...) at kernel/qcoreapplication.cpp:689
#14 0x00007ff5854799dd in QGuiApplication::QGuiApplication (this=0x7ffd6d768a30, argc=@0x7ffd6d7689fc: 2, argv=0x2046200,
    flags=328961) at kernel/qguiapplication.cpp:559
#15 0x00007ff5714a037b in kdemain (argc=2, argv=<optimized out>)
    at /mnt/AUR/kinit-git/src/kinit/src/klauncher/klauncher_main.cpp:156
#16 0x000000000040899c in launch (argc=argc@entry=2, _name=_name@entry=0x40c9ec "klauncher", args=<optimized out>,
    args@entry=0x7ffd6d768f70 "--fd=8", cwd=cwd@entry=0x0, envc=envc@entry=0, envs=<optimized out>, envs@entry=0x0,
    reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x40c985 "0")
    at /mnt/AUR/kinit-git/src/kinit/src/kdeinit/kinit.cpp:741
#17 0x0000000000409d19 in start_klauncher () at /mnt/AUR/kinit-git/src/kinit/src/kdeinit/kinit.cpp:1029
#18 0x0000000000405b9d in main (argc=1, argv=<optimized out>)
    at /mnt/AUR/kinit-git/src/kinit/src/kdeinit/kinit.cpp:1787
Comment 1 David Faure 2015-10-03 21:12:42 UTC
First backtrace is ksmserver deleting KSMServer from a secondary thread (!!) due to a signal handler. Reassigning to ksmserver.
Comment 2 Justin Zobel 2022-10-16 07:52:13 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-10-31 05:04:00 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-11-15 05:16:00 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!