xembedsniproxy always crash when login. After gdb debugging, the 'clientGeom' in SNIProxy need to be checked, and also in SNIProxy::getImageNonComposite. I can not figure out the reason clientGeom is 'NULL' since there is a window indeed and there is a winID, but it happened every time. Also please refer to this issue, I guess it's related: https://github.com/davidedmundson/xembed-sni-proxy/issues/10 Here is the patch: diff -Nur plasma-workspace-5.4.3/xembed-sni-proxy/fdoselectionmanager.cpp plasma-workspace-5.4.3fix/xembed-sni-proxy/fdoselectionmanager.cpp --- plasma-workspace-5.4.3/xembed-sni-proxy/fdoselectionmanager.cpp 2015-11-16 23:59:22.692089787 +0800 +++ plasma-workspace-5.4.3fix/xembed-sni-proxy/fdoselectionmanager.cpp 2015-11-17 00:01:46.079096269 +0800 @@ -146,9 +146,15 @@ if (m_proxies.contains(winId)) { return; } + //detect winId clientGeomary to avoid segfault in SNIProxy + xcb_connection_t *c = QX11Info::connection(); + auto cookie = xcb_get_geometry(c, winId); + QScopedPointer<xcb_get_geometry_reply_t> clientGeom(xcb_get_geometry_reply(c, cookie, Q_NULLPTR)); - addDamageWatch(winId); - m_proxies[winId] = new SNIProxy(winId, this); + if(clientGeom) { + addDamageWatch(winId); + m_proxies[winId] = new SNIProxy(winId, this); + } } void FdoSelectionManager::undock(xcb_window_t winId) diff -Nur plasma-workspace-5.4.3/xembed-sni-proxy/sniproxy.cpp plasma-workspace-5.4.3fix/xembed-sni-proxy/sniproxy.cpp --- plasma-workspace-5.4.3/xembed-sni-proxy/sniproxy.cpp 2015-11-16 23:59:22.715089788 +0800 +++ plasma-workspace-5.4.3fix/xembed-sni-proxy/sniproxy.cpp 2015-11-17 00:04:42.674104252 +0800 @@ -74,6 +74,13 @@ m_dbus(QDBusConnection::connectToBus(QDBusConnection::SessionBus, QStringLiteral("XembedSniProxy%1").arg(s_serviceCount++))), m_windowId(wid) { + auto c = QX11Info::connection(); + + auto cookie = xcb_get_geometry(c, m_windowId); + QScopedPointer<xcb_get_geometry_reply_t> clientGeom(xcb_get_geometry_reply(c, cookie, Q_NULLPTR)); + + if (clientGeom && clientGeom->width > 0) { + //create new SNI new StatusNotifierItemAdaptor(this); m_dbus.registerObject(QStringLiteral("/StatusNotifierItem"), this); @@ -85,10 +92,6 @@ qCWarning(SNIPROXY) << "could not register SNI:" << reply.error().message(); } - auto c = QX11Info::connection(); - - auto cookie = xcb_get_geometry(c, m_windowId); - QScopedPointer<xcb_get_geometry_reply_t> clientGeom(xcb_get_geometry_reply(c, cookie, Q_NULLPTR)); //create a container window auto screen = xcb_setup_roots_iterator (xcb_get_setup (c)).data; @@ -181,6 +184,7 @@ //not ideal, but it works better than nothing //test with xchat before changing QTimer::singleShot(500, this, &SNIProxy::update); + } } SNIProxy::~SNIProxy() @@ -228,11 +232,12 @@ auto c = QX11Info::connection(); auto cookie = xcb_get_geometry(c, m_windowId); QScopedPointer<xcb_get_geometry_reply_t> geom(xcb_get_geometry_reply(c, cookie, Q_NULLPTR)); - - xcb_image_t *image = xcb_image_get(c, m_windowId, 0, 0, geom->width, geom->height, 0xFFFFFF, XCB_IMAGE_FORMAT_Z_PIXMAP); - - QImage qimage(image->data, image->width, image->height, image->stride, QImage::Format_ARGB32, sni_cleanup_xcb_image, image); - + QImage qimage; + if(geom) { + xcb_image_t *image = xcb_image_get(c, m_windowId, 0, 0, geom->width, geom->height, 0xFFFFFF, XCB_IMAGE_FORMAT_Z_PIXMAP); + if(image) + qimage = QImage(image->data, image->width, image->height, image->stride, QImage::Format_ARGB32, sni_cleanup_xcb_image, image); + } return qimage; } Reproducible: Always Steps to Reproduce: 1.install xembedsniproxy from git(actually I backport the code to plasma-5.4.3) 2.reboot and login
After above fix, xembedsniproxy never segfault again. But I still encouter a issue that there is a empty item created in "status area" everytime when reboot and login. I checked the width and height of clientGeom, and found that in my environment(Qt-5.5.1, framework-5.15.0 plasma-5.4.3), there are two windows with width:1 height:1 and width:683 height:307 needed to be embeded everytime when login. One(683x307) seems belong to fcitx(It will be hidden later, fcitx already support statusitem), I can not figure out which application the 1x1 window belongs to. These two window may create the empty item in status area. But it is not related to the xembedsniproxy segfault issue and I just filter out these two special window.
Thanks. Would it be possible for you to upload that diff to git.reviewboard.kde.org ? I don't get the first part of the patch where we check for clientGeom, if that isn't valid we don't create SNIProxy...then we check it again in SNIProxy's constructor. One of those is redundant; I *think* if there's no client geomtetry we want to avoid using it, but then try mapping and resizing the window. But I don't know.
(In reply to David Edmundson from comment #2) > Thanks. > > Would it be possible for you to upload that diff to > > git.reviewboard.kde.org ? > > > I don't get the first part of the patch where we check for clientGeom, if > that isn't valid we don't create SNIProxy...then we check it again in > SNIProxy's constructor. One of those is redundant; > > I *think* if there's no client geomtetry we want to avoid using it, but then > try mapping and resizing the window. But I don't know. Yes, this issue is very wired. At first I thought 'check in fdoselectionmanager' should be enough, since if it's not valid, SNIProxy even not created, but no lucky, failed. Then I add a check in SNIProxy constructor, if it's not valid, the single shot should not run at all, but it still failed again in singleshot(that means it valid in fdoselectionmanager and SNIProxy Constructor but when singleshot happend, it's already not valid). So I added checks in these tree place to avoid this issue. I guess, maybe, there is Window in my environment created indeed but be destroyed very quickly and randomly. The check of 'image' is added to avoid potential 'Null' issue, at least, I didn't encounter this issue. BTW, I sugguest a blacklist mechanism should be implemented. as I mentioned, after this fix, there are two special windows in my env need to be handled and filtered out, otherwise, an empty trayitem will left there. up to now, I can not find a correct way to fix that, so I choose to use the hard code width/height to filter them out.
(In reply to Cjacker from comment #3) > (In reply to David Edmundson from comment #2) > > Thanks. > > > > Would it be possible for you to upload that diff to > > > > git.reviewboard.kde.org ? > > > > > > I don't get the first part of the patch where we check for clientGeom, if > > that isn't valid we don't create SNIProxy...then we check it again in > > SNIProxy's constructor. One of those is redundant; > > > > I *think* if there's no client geomtetry we want to avoid using it, but then > > try mapping and resizing the window. But I don't know. > > Yes, this issue is very wired. > > At first I thought 'check in fdoselectionmanager' should be enough, since if > it's not valid, SNIProxy even not created, but no lucky, failed. > > Then I add a check in SNIProxy constructor, if it's not valid, the single > shot should not run at all, but it still failed again in singleshot(that > means it valid in fdoselectionmanager and SNIProxy Constructor but when > singleshot happend, it's already not valid). > > So I added checks in these tree place to avoid this issue. > > I guess, maybe, there is Window in my environment created indeed but be > destroyed very quickly and randomly. > > The check of 'image' is added to avoid potential 'Null' issue, at least, I > didn't encounter this issue. > > > BTW, I sugguest a blacklist mechanism should be implemented. as I mentioned, > after this fix, there are two special windows in my env need to be handled > and filtered out, otherwise, an empty trayitem will left there. up to now, > I can not find a correct way to fix that, so I choose to use the hard code > width/height to filter them out. And, I agree the fdoselectionmanager changes can be removed, since "cliengGeom" not used here. at first, what I intend to do is 'check it early', if it's not valid, no need to create SNIProxy at all, but it didn't resolve this issue as metioned above.
*** Bug 355420 has been marked as a duplicate of this bug. ***
Created attachment 95751 [details] patch updated This patch is based on the git master codes.
*** Bug 356570 has been marked as a duplicate of this bug. ***
Is there a remedy for that? Arch Linux forced everyone to update from KDE 4 to KDE 5, but KDE 5 is not usable because of this. Kind of stuck.
Created attachment 96251 [details] Resize if null geometry Can you try this patch? It's a mod of your version, but if we don't have a client geometry on the window we're embedding it tries to set one. Should (hopefully) mean we get a tray icon for these cases rather than just hiding it completely.
(In reply to Damian Nowak from comment #8) > Is there a remedy for that? Arch Linux forced everyone to update from KDE 4 > to KDE 5, but KDE 5 is not usable because of this. Kind of stuck. I have the same problem, my workaround is to just start xembedsniproxy again with krunner. I have considered making systemd handling it with a service, but I believe that it will be fixed soon.
(In reply to Dennis from comment #10) > (In reply to Damian Nowak from comment #8) > > Is there a remedy for that? Arch Linux forced everyone to update from KDE 4 > > to KDE 5, but KDE 5 is not usable because of this. Kind of stuck. > > I have the same problem, my workaround is to just start xembedsniproxy again > with krunner. I have considered making systemd handling it with a service, > but I believe that it will be fixed soon. Just for reference, here is my systemd user unit file: ~ cat .config/systemd/user/xembedsniproxy.service [Unit] Description=xembed SNI proxy daemon [Service] ExecStart=/usr/bin/xembedsniproxy Restart=on-failure [Install] WantedBy=graphical.target The "WantedBy" doesn't seem to work correctly, so it has to be started once manually after login: systemctl --user start xembedsniproxy.service but after that systemd keeps it alive perfectly.
just for your information in arch build version 5.5.2 of plasma-workspace https://bugs.kde.org/attachment.cgi?id=96251 was included; worked for me (mostly) arch build version 5.5.3 does not include it; xembedsniproxy chrashs at me. I recompiled version 5.5.3 with the patch: works for me (mostly)
I can confirm that still happens on Arch Linux with latest Plasma compiled from git master. Why patch haven't been submitted and merged? it really looks like it will fix this. I'll test this patch for a week and if I won't have crashes I'll submit it if no one else will have it by then. Crash looks like this xembedsniproxy[2320]: kde.xembedsniproxy: Scaling pixmap of window 16777276 "JavaEmbeddedFrame" from w*h 24 24 xembedsniproxy[2320]: ASSERT: "d" in file /usr/include/QtCore/qscopedpointer.h, line 112 #0 0x00007f9730f1c5f8 in raise () from /usr/lib/libc.so.6 #1 0x00007f9730f1da7a in abort () from /usr/lib/libc.so.6 #2 0x00007f97317b38de in qt_message_fatal (context=..., message=<synthetic pointer>) at /mnt/Qt/qtbase/src/corelib/global/qlogging.cpp:1606 #3 QMessageLogger::fatal (this=this@entry=0x7ffd6cbae290, msg=msg@entry=0x7f9731b85990 "ASSERT: \"%s\" in file %s, line %d") at /mnt/Qt/qtbase/src/corelib/global/qlogging.cpp:780 #4 0x00007f97317a6b7b in qt_assert (assertion=assertion@entry=0x4137f3 "d", file=file@entry=0x4138b8 "/usr/include/QtCore/qscopedpointer.h", line=line@entry=112) at /mnt/Qt/qtbase/src/corelib/global/qglobal.cpp:3054 #5 0x00000000004105c1 in QScopedPointer<xcb_get_geometry_reply_t, QScopedPointerDeleter<xcb_get_geometry_reply_t> >::operator-> (this=<synthetic pointer>) at /usr/include/QtCore/qscopedpointer.h:112 #6 SNIProxy::getImageNonComposite (this=this@entry=0x91fdd0) at /mnt/KDE/kde/workspace/plasma-workspace/xembed-sni-proxy/sniproxy.cpp:247 #7 0x0000000000410617 in SNIProxy::update (this=0x91fdd0) at /mnt/KDE/kde/workspace/plasma-workspace/xembed-sni-proxy/sniproxy.cpp:196 #8 0x000000000040d0f1 in FdoSelectionManager::nativeEventFilter (this=0x7ffd6cbaec10, eventType=..., message=<optimized out>, result=<optimized out>) at /mnt/KDE/kde/workspace/plasma-workspace/xembed-sni-proxy/fdoselectionmanager.cpp:140 #9 0x00007f9731a79c8f in QAbstractEventDispatcher::filterNativeEvent (this=<optimized out>, eventType=..., message=message@entry=0x7f9720003cb0, result=result@entry=0x7ffd6cbae578) at /mnt/Qt/qtbase/src/corelib/kernel/qabstracteventdispatcher.cpp:460 #10 0x00007f9728dc4719 in QXcbConnection::handleXcbEvent (this=this@entry=0x8466a0, event=event@entry=0x7f9720003cb0) at /mnt/Qt/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp:1065 #11 0x00007f9728dc59f9 in QXcbConnection::processXcbEvents (this=0x8466a0) at /mnt/Qt/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp:1675 #12 0x00007f9728e182cb in QXcbConnection::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/moc_qxcbconnection.cpp:187 #13 0x00007f9731ab49bd in QMetaCallEvent::placeMetaCall (this=0x7f9720003c20, object=0x8466a0) at /mnt/Qt/qtbase/src/corelib/kernel/qobject.cpp:495 #14 0x00007f9731abb459 in QObject::event (this=0x8466a0, e=<optimized out>) at /mnt/Qt/qtbase/src/corelib/kernel/qobject.cpp:1256 #15 0x00007f9728dc6868 in QXcbConnection::event (this=<optimized out>, e=<optimized out>) at /mnt/Qt/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp:2268 #16 0x00007f9731a7de43 in QCoreApplicationPrivate::notify_helper (receiver=receiver@entry=0x8466a0, event=event@entry=0x7f9720003c20) at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112 #17 0x00007f9731a7deeb in doNotify (receiver=receiver@entry=0x8466a0, event=0x7f9720003c20) at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1053 #18 0x00007f9731a7e116 in QCoreApplication::notify (this=this@entry=0x7ffd6cbaebe0, receiver=receiver@entry=0x8466a0, event=<optimized out>) at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1039 #19 0x00007f973239dbd0 in QGuiApplication::notify (this=0x7ffd6cbaebe0, object=0x8466a0, event=<optimized out>) at /mnt/Qt/qtbase/src/gui/kernel/qguiapplication.cpp:1614 #20 0x00007f9731a7e02a in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x8466a0, event=event@entry=0x7f9720003c20) at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:978 #21 0x00007f9731a807f8 in QCoreApplication::sendEvent (event=0x7f9720003c20, receiver=0x8466a0) at ../../include/QtCore/../../../../../src/corelib/kernel/qcoreapplication.h:227 #22 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x83a690) at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1613 #23 0x00007f9731a80a60 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1471 #24 0x00007f9731afe27a in postEventSourceDispatch (s=0x8a4fd0) at /mnt/Qt/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:270 #25 0x00007f972d212dc7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #26 0x00007f972d213020 in ?? () from /usr/lib/libglib-2.0.so.0 #27 0x00007f972d2130cc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #28 0x00007f9731afe30a in QEventDispatcherGlib::processEvents (this=0x8a0590, flags=...) at /mnt/Qt/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:417 #29 0x00007f9728e19c03 in QPAEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at /mnt/Qt/qtbase/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp:115 #30 0x00007f9731a7adbd in QEventLoop::processEvents (this=this@entry=0x7ffd6cbaeb60, flags=..., flags@entry=...) at /mnt/Qt/qtbase/src/corelib/kernel/qeventloop.cpp:128 #31 0x00007f9731a7b3b9 in QEventLoop::exec (this=this@entry=0x7ffd6cbaeb60, flags=..., flags@entry=...) at /mnt/Qt/qtbase/src/corelib/kernel/qeventloop.cpp:204 #32 0x00007f9731a84fef in QCoreApplication::exec () at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1248 #33 0x00007f9732396936 in QGuiApplication::exec () at /mnt/Qt/qtbase/src/gui/kernel/qguiapplication.cpp:1605 #34 0x000000000040a23e in main (argc=1, argv=<optimized out>) at /mnt/KDE/kde/workspace/plasma-workspace/xembed-sni-proxy/main.cpp:68
>Why patch haven't been submitted and merged Because I asked someone to test the patch at comment #9 and no-one did
Git commit 6232362cca7021e5b436d267e07f9d6875a20a4c by David Edmundson. Committed on 09/01/2016 at 02:32. Pushed by davidedmundson into branch 'Plasma/5.5'. Check for null geometry in client window M +14 -3 xembed-sni-proxy/sniproxy.cpp http://commits.kde.org/plasma-workspace/6232362cca7021e5b436d267e07f9d6875a20a4c
Edit. If the Arch packages had it. I guess that's testing enough. Thanks Wulf. Would have been nice if the Arch packagers had mentioned in the comment they were running the patch before Plasma 5.5.3 was tagged. C'est la vie. All merged now.
@David the patch didn't fix the issue for the user I added it for (his issue turned out to be that he had disabled the service). So I couldn't confirm that it works before 5.5.3 was released.
not fixed for me: [ 53.073331] xembedsniproxy[3016]: segfault at 10 ip 000000000040e391 sp 00007ffff4dab6a0 error 4 in xembedsniproxy[400000+17000] in ach and after reboot -> 'starx'
ene 11 17:14:25 sL1pKn07 xembedsniproxy[3016]: kde.xembedsniproxy: starting ene 11 17:14:26 sL1pKn07 xembedsniproxy[3016]: kde.xembedsniproxy: Manager selection claimed ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: kde.xembedsniproxy: trying to dock window 88080404 ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: kde.xembedsniproxy: adding damage watch for 88080404 ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: kde.xembedsniproxy: Resizing window 88080404 "" from w*h QSize(-1, -1) ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 714, resource id: 88080404, major code: 2 (ChangeWindowAttributes), minor code: 0 ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 814, resource id: 88080404, major code: 7 (ReparentWindow), minor code: 0 ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 816, resource id: 88080404, major code: 142 (Unknown), minor code: 1 ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 817, resource id: 88080404, major code: 6 (ChangeSaveSet), minor code: 0 ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 818, resource id: 88080404, major code: 25 (SendEvent), minor code: 0 ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 823, resource id: 88080404, major code: 12 (ConfigureWindow), minor code: 0 ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 824, resource id: 88080404, major code: 8 (MapWindow), minor code: 0 ene 11 17:14:30 sL1pKn07 xembedsniproxy[3016]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 825, resource id: 88080404, major code: 61 (ClearArea), minor code: 0 ene 11 17:14:31 sL1pKn07 xembedsniproxy[3016]: kde.xembedsniproxy: No xembed icon for 88080404 "" ene 11 17:14:46 sL1pKn07 xembedsniproxy[3016]: kde.xembedsniproxy: Received click 1 with passed x*y 3479 2112 └───╼ coredumpctl info 3016 PID: 3016 (xembedsniproxy) UID: 1000 (sl1pkn07) GID: 100 (users) Signal: 11 (SEGV) Timestamp: lun 2016-01-11 17:14:46 CET (12min ago) Command Line: /usr/bin/xembedsniproxy Executable: /usr/bin/xembedsniproxy Control Group: /user.slice/user-1000.slice/session-c1.scope Unit: session-c1.scope Slice: user-1000.slice Session: c1 Owner UID: 1000 (sl1pkn07) Boot ID: 626d3d6619bf4cc7a36dd00fc624f4c7 Machine ID: c20ee0c57658685bfedf50384b0e3ec0 Hostname: sL1pKn07 Coredump: /var/lib/systemd/coredump/core.xembedsniproxy.1000.626d3d6619bf4cc7a36dd00fc624f4c7.3016.1452528886000000.lz4 Message: Process 3016 (xembedsniproxy) of user 1000 dumped core. Stack trace of thread 3016: #0 0x000000000040e391 _ZN8SNIProxy9sendClickEhii (xembedsniproxy) #1 0x0000000000411091 n/a (xembedsniproxy) #2 0x0000000000411540 _ZN25StatusNotifierItemAdaptor11qt_metacallEN11QMetaObject4CallEiPPv (xembedsniproxy) #3 0x00007f00ac548923 n/a (/usr/lib/libQt5DBus.so.5.5.1) #4 0x00007f00ac54c57a n/a (/usr/lib/libQt5DBus.so.5.5.1) #5 0x00007f00ac54d043 n/a (/usr/lib/libQt5DBus.so.5.5.1) #6 0x00007f00ac54e23e n/a (/usr/lib/libQt5DBus.so.5.5.1) #7 0x00007f00ab0061e1 _ZN7QObject5eventEP6QEvent (libQt5Core.so.5) #8 0x00007f00aafd6a79 _ZN16QCoreApplication6notifyEP7QObjectP6QEvent (libQt5Core.so.5) #9 0x00007f00aafd6bab _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent (libQt5Core.so.5) #10 0x00007f00aafd8fa6 _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData (libQt5Core.so.5) #11 0x00007f00ab02d143 n/a (libQt5Core.so.5) #12 0x00007f00a7436dc7 g_main_context_dispatch (libglib-2.0.so.0) #13 0x00007f00a7437020 n/a (libglib-2.0.so.0) #14 0x00007f00a74370cc g_main_context_iteration (libglib-2.0.so.0) #15 0x00007f00ab02d54f _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5) #16 0x00007f00aafd457a _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5) #17 0x00007f00aafdc53c _ZN16QCoreApplication4execEv (libQt5Core.so.5) #18 0x0000000000409c6a main (xembedsniproxy) #19 0x00007f00aa64a610 __libc_start_main (libc.so.6) #20 0x0000000000409f19 _start (xembedsniproxy) Stack trace of thread 3020: #0 0x00007f00aa70a18d poll (libc.so.6) #1 0x00007f00abf8aae2 n/a (libxcb.so.1) #2 0x00007f00abf8c757 xcb_wait_for_event (libxcb.so.1) #3 0x00007f00a2ced379 n/a (libQt5XcbQpa.so.5) #4 0x00007f00aadf5b8e n/a (libQt5Core.so.5) #5 0x00007f00aa4144a4 start_thread (libpthread.so.0) #6 0x00007f00aa71313d __clone (libc.so.6)
ZN8SNIProxy9sendClickEhii ooh, that's in a different place. Any chance you can get debug symbols for plasmsa workspace?
only plasma-workspace? or need also qt5...
Only plasma-workspace
i can't reproduce the issue (with/out) reboot/close session (with/out symbols) now. but fails ksystemactivitymanage (http://sl1pkn07.wtf/paste/view/b0831530) need more test, but this is not first time xembedproxy crash after arch apply the patch greetings
finally: └───╼ coredumpctl info 30383 PID: 30383 (xembedsniproxy) UID: 1000 (sl1pkn07) GID: 100 (users) Signal: 11 (SEGV) Timestamp: lun 2016-01-11 19:47:58 CET (56s ago) Command Line: /usr/bin/xembedsniproxy Executable: /usr/bin/xembedsniproxy Control Group: /user.slice/user-1000.slice/session-c1.scope Unit: session-c1.scope Slice: user-1000.slice Session: c1 Owner UID: 1000 (sl1pkn07) Boot ID: 40f7492ce2a44f01bcba8a3ecc3eb97b Machine ID: c20ee0c57658685bfedf50384b0e3ec0 Hostname: sL1pKn07 Coredump: /var/lib/systemd/coredump/core.xembedsniproxy.1000.40f7492ce2a44f01bcba8a3ecc3eb97b.30383.1452538078000000.lz4 Message: Process 30383 (xembedsniproxy) of user 1000 dumped core. Stack trace of thread 30383: #0 0x000000000040e391 _ZN7QVectorI16KDbusImageStructEC4ERKS1_ (/usr/bin/xembedsniproxy (deleted)) #1 0x8a2f0728a5fc2200 n/a (n/a) (?)
(In reply to David Edmundson from comment #20) > ZN8SNIProxy9sendClickEhii > > ooh, that's in a different place. > > Any chance you can get debug symbols for plasmsa workspace? I reported the very same crash as Bug#358317 today.
*** Bug 359333 has been marked as a duplicate of this bug. ***
What version is the fix supposed to be in? It just crashed again for me this morning on Fedora 23 with Plasma 5.5.5 (Qt 5.5.1): Mar 21 10:04:00 edison audit[7768]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=7768 comm="xembedsniproxy" exe="/usr/bin/xembedsniproxy" sig=11 Mar 21 10:04:00 edison kernel: xembedsniproxy[7768]: segfault at 2 ip 0000562633123982 sp 00007ffdb1367220 error 4 in xembedsniproxy[562633113000+18000
(In reply to Raman Gupta from comment #27) > What version is the fix supposed to be in? It just crashed again for me this > morning on Fedora 23 with Plasma 5.5.5 (Qt 5.5.1): The fix for this particular crash is in 5.5.3, and it is working. If you do experience a crash with 5.5.5, it must be a different problem. So I'd suggest filing a new bug report, and it would be a good idea to attach a proper backtrace. E.g. run "gdb xembedsniproxy" and then "bt" after it crashes to get the backtrace.
(In reply to Raman Gupta from comment #11) > (In reply to Dennis from comment #10) > > (In reply to Damian Nowak from comment #8) > > > Is there a remedy for that? Arch Linux forced everyone to update from KDE 4 > > > to KDE 5, but KDE 5 is not usable because of this. Kind of stuck. > > > > I have the same problem, my workaround is to just start xembedsniproxy again > > with krunner. I have considered making systemd handling it with a service, > > but I believe that it will be fixed soon. > > Just for reference, here is my systemd user unit file: > > ~ cat .config/systemd/user/xembedsniproxy.service > [Unit] > Description=xembed SNI proxy daemon > > [Service] > ExecStart=/usr/bin/xembedsniproxy > Restart=on-failure > > [Install] > WantedBy=graphical.target > > The "WantedBy" doesn't seem to work correctly, so it has to be started once > manually after login: > > systemctl --user start xembedsniproxy.service > > but after that systemd keeps it alive perfectly. There is no "graphical.target" in your systemd user instance - that's why. Simply use "default.target" - that's what gets triggered during session start. I already asked how one can depend user services on system services in the mailing list but got no reply yet. I need some of my user session services depend on mysqld being ready but couldn't work out how to do that. For now, I've fallen back to depending the system service user@.service on mysqld. But this is irrelevant for your case - for you its just default.target with the downside you are getting errors when loading a non-X11 session (maybe through ssh login).
(In reply to Kai Krakow from comment #29) > I already asked how one can depend user services on system services in the > mailing list but got no reply yet. I need some of my user session services > depend on mysqld being ready but couldn't work out how to do that. For now, > I've fallen back to depending the system service user@.service on mysqld. > But this is irrelevant for your case - for you its just default.target with > the downside you are getting errors when loading a non-X11 session (maybe > through ssh login). If the service is started with default.target then presumably xembedsniproxy will attempt to start even before KDE (and even X) is running. Will 1) xembedsniproxy start correctly without a DISPLAY and without KDE running, and 2) upon KDE startup, will plasma see that another instance of xembedsniproxy is already running and just skip starting it, or will it flake out?
>2) upon KDE startup, will plasma see that another instance of xembedsniproxy is already running and just skip starting it, or will it flake out? it will skip and close if any other systray host is running.
Rather than writing fancy scripts to work around it, can someone give me a backtrace of where there's now a crash.
Crash(In reply to David Edmundson from comment #32) > Rather than writing fancy scripts to work around it, can someone give me a > backtrace of where there's now a crash. Crash is still there: $ equery b /usr/bin/xembedsniproxy * Searching for /usr/bin/xembedsniproxy ... kde-plasma/plasma-workspace-5.6.0 (/usr/bin/xembedsniproxy) $ coredumpctl dump xembedsniproxy PID: 1892 (xembedsniproxy) UID: 500 (kakra) GID: 500 (kakra) Signal: 11 (SEGV) Timestamp: Di 2016-03-22 23:24:30 CET (42min ago) Command Line: /usr/bin/xembedsniproxy Executable: /usr/bin/xembedsniproxy Control Group: /user.slice/user-500.slice/session-c1.scope Unit: session-c1.scope Slice: user-500.slice Session: c1 Owner UID: 500 (kakra) Boot ID: fb9754500d82444ca9b6b57fc3270282 Machine ID: 121b87ca633e8ac0016656680000001b Hostname: jupiter.sol.local Coredump: /var/lib/systemd/coredump/core.xembedsniproxy.500.fb9754500d82444ca9b6b57fc3270282.1892.1458685470000000000000.lz4 Message: Process 1892 (xembedsniproxy) of user 500 dumped core. Stack trace of thread 1892: #0 0x000000000040bcbc _ZNK8SNIProxy20getImageNonCompositeEv (xembedsniproxy) #1 0x000000000040bf97 _ZN8SNIProxy6updateEv (xembedsniproxy) #2 0x0000000000408f49 _ZN19FdoSelectionManager17nativeEventFilterERK10QByteArrayPvPl (xembedsniproxy) #3 0x0000003bc104b30c _ZN24QAbstractEventDispatcher17filterNativeEventERK10QByteArrayPvPl (libQt5Core.so.5) #4 0x00007f59204fc7a5 _ZN14QXcbConnection14handleXcbEventEP19xcb_generic_event_t (libQt5XcbQpa.so.5) #5 0x00007f59204fe8cb _ZN14QXcbConnection16processXcbEventsEv (libQt5XcbQpa.so.5) #6 0x0000003bc107682a _ZN7QObject5eventEP6QEvent (libQt5Core.so.5) #7 0x0000003bc104d895 _ZN16QCoreApplication6notifyEP7QObjectP6QEvent (libQt5Core.so.5) #8 0x0000003bc104d55d _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent (libQt5Core.so.5) #9 0x0000003bc1050323 _ZN16QCoreApplication9sendEventEP7QObjectP6QEvent (libQt5Core.so.5) #10 0x0000003bc109ae33 postEventSourceDispatch (libQt5Core.so.5) #11 0x0000003e57a49c9d g_main_dispatch (libglib-2.0.so.0) #12 0x0000003e57a49f80 g_main_context_iterate (libglib-2.0.so.0) #13 0x0000003e57a4a02c g_main_context_iteration (libglib-2.0.so.0) #14 0x0000003bc109aea7 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5) #15 0x0000003bc104c17a _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5) #16 0x0000003bc105354c _ZN16QCoreApplication4execEv (libQt5Core.so.5) #17 0x000000000040638e main (xembedsniproxy) #18 0x00000031e5620850 __libc_start_main (libc.so.6) #19 0x0000000000406539 _start (xembedsniproxy) Stack trace of thread 1900: #0 0x00000031e56dfd7d poll (libc.so.6) #1 0x00000031e7e0aac2 poll (libxcb.so.1) #2 0x00000031e7e0c72f xcb_wait_for_event (libxcb.so.1) #3 0x00007f59204fec89 _ZN15QXcbEventReader3runEv (libQt5XcbQpa.so.5) #4 0x0000003bc0ea04a2 _ZN14QThreadPrivate5startEPv (libQt5Core.so.5) #5 0x00000031e5e07324 start_thread (libpthread.so.0) #6 0x00000031e56e8b9d __clone (libc.so.6) Refusing to dump core to tty.
Happens all the time to me on openSUSE Leap 42.1 as soon as google chrome is started. Here is the backtrace: Program received signal SIGSEGV, Segmentation fault. SNIProxy::getImageNonComposite (this=this@entry=0xe25720) at /usr/src/debug/plasma-workspace-5.6.95/xembed-sni-proxy/sniproxy.cpp:273 273 /usr/src/debug/plasma-workspace-5.6.95/xembed-sni-proxy/sniproxy.cpp: No such file or directory. (gdb) info threads Id Target Id Frame 3 Thread 0x7f1fca974700 (LWP 1697) "QXcbEventReader" 0x00007f1fd31c1bbd in poll () at ../sysdeps/unix/syscall-template.S:81 2 Thread 0x7f1fbca9b700 (LWP 1709) "QDBusConnection" 0x00007f1fd31c1bbd in poll () at ../sysdeps/unix/syscall-template.S:81 * 1 Thread 0x7f1fd58eb780 (LWP 1694) "xembedsniproxy" SNIProxy::getImageNonComposite (this=this@entry=0xe25720) at /usr/src/debug/plasma-workspace-5.6.95/xembed-sni-proxy/sniproxy.cpp:273 (gdb) thread apply allbt (gdb) thread apply all bt Thread 3 (Thread 0x7f1fca974700 (LWP 1697)): #0 0x00007f1fd31c1bbd in poll () at ../sysdeps/unix/syscall-template.S:81 #1 0x00007f1fd5045422 in _xcb_conn_wait (__timeout=-1, __nfds=1, __fds=0x7f1fca973d40) at /usr/include/bits/poll2.h:46 #2 0x00007f1fd5045422 in _xcb_conn_wait (c=c@entry=0xd981e0, cond=cond@entry=0xd98220, vector=vector@entry=0x0, count=count@entry=0x0) at xcb_conn.c:459 #3 0x00007f1fd504700f in xcb_wait_for_event (c=0xd981e0) at xcb_in.c:693 #4 0x00007f1fccef1579 in QXcbEventReader::run() (this=0xda2ba0) at qxcbconnection.cpp:1325 #5 0x00007f1fd38c0a29 in QThreadPrivate::start(void*) (arg=0xda2ba0) at thread/qthread_unix.cpp:341 #6 0x00007f1fd2ed00a4 in start_thread (arg=0x7f1fca974700) at pthread_create.c:309 #7 0x00007f1fd31c9fed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Thread 2 (Thread 0x7f1fbca9b700 (LWP 1709)): #0 0x00007f1fd31c1bbd in poll () at ../sysdeps/unix/syscall-template.S:81 #1 0x00007f1fcfe46e64 in g_main_context_iterate (priority=2147483647, n_fds=5, fds=0x7f1fb800fd00, timeout=-1, context=0x7f1fb8000990) at gmain.c:4103 #2 0x00007f1fcfe46e64 in g_main_context_iterate (context=context@entry=0x7f1fb8000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3803 #3 0x00007f1fcfe46f7c in g_main_context_iteration (context=0x7f1fb8000990, may_block=1) at gmain.c:3869 #4 0x00007f1fd3ad332c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f1fb80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:417 #5 0x00007f1fd3a80fcb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f1fbca9ae20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204 #6 0x00007f1fd38bbf5a in QThread::exec() (this=this@entry=0x7f1fd5721d00 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:500 #7 0x00007f1fd54b9225 in QDBusConnectionManager::run() (this=0x7f1fd5721d00 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:189 #8 0x00007f1fd38c0a29 in QThreadPrivate::start(void*) (arg=0x7f1fd5721d00 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:341 #9 0x00007f1fd2ed00a4 in start_thread (arg=0x7f1fbca9b700) at pthread_create.c:309 #10 0x00007f1fd31c9fed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Thread 1 (Thread 0x7f1fd58eb780 (LWP 1694)): #0 0x000000000040c00f in SNIProxy::getImageNonComposite() const (this=this@entry=0xe25720) at /usr/src/debug/plasma-workspace-5.6.95/xembed-sni-proxy/sniproxy.cpp:273 #1 0x000000000040c2c4 in SNIProxy::update() (this=0xe25720) at /usr/src/debug/plasma-workspace-5.6.95/xembed-sni-proxy/sniproxy.cpp:214 #2 0x00000000004093ac in FdoSelectionManager::nativeEventFilter(QByteArray const&, void*, long*) (this=0x7ffe7feb3470, eventType=..., message=0x7f1fc4003d60, result=<optimized out>) at /usr/src/debug/plasma-workspace-5.6.95/xembed-sni-proxy/fdoselectionmanager.cpp:154 #3 0x00007f1fd3a80260 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) (this=<optimized out>, eventType=..., message=message@entry=0x7f1fc4003d60, result=result@entry=0x7ffe7feb2ee8) at kernel/qabstracteventdispatcher.cpp:460 #4 0x00007f1fcceef924 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) (this=this@entry=0xd969f0, event=event@entry=0x7f1fc4003d60) at qxcbconnection.cpp:1091 #5 0x00007f1fccef197b in QXcbConnection::processXcbEvents() (this=0xd969f0) at qxcbconnection.cpp:1723 #6 0x00007f1fd3aae156 in QObject::event(QEvent*) (this=0xd969f0, e=<optimized out>) at kernel/qobject.cpp:1256 #7 0x00007f1fd3a8307c in QCoreApplication::notify(QObject*, QEvent*) (event=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.cpp:1090 #8 0x00007f1fd3a8307c in QCoreApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1076 #9 0x00007f1fd3a82fb5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0xd969f0, event=event@entry=0x7f1fc4003310) at kernel/qcoreapplication.cpp:1015 #10 0x00007f1fd3a84d9a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (event=0x7f1fc4003310, receiver=<optimized out>) at kernel/qcoreapplication.h:225 #11 0x00007f1fd3a84d9a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0xd85d30) at kernel/qcoreapplication.cpp:1650 #12 0x00007f1fd3a85348 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1508 #13 0x00007f1fd3ad3ca3 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0xdba260) at kernel/qeventdispatcher_glib.cpp:270 #14 0x00007f1fcfe46c84 in g_main_context_dispatch (context=0x7f1fc40016f0) at gmain.c:3122 #15 0x00007f1fcfe46c84 in g_main_context_dispatch (context=context@entry=0x7f1fc40016f0) at gmain.c:3737 #16 0x00007f1fcfe46ed8 in g_main_context_iterate (context=context@entry=0x7f1fc40016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3808 #17 0x00007f1fcfe46f7c in g_main_context_iteration (context=0x7f1fc40016f0, may_block=1) at gmain.c:3869 #18 0x00007f1fd3ad332c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0xde9630, flags=...) at kernel/qeventdispatcher_glib.cpp:417 #19 0x00007f1fd3a80fcb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffe7feb33d0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204 #20 0x00007f1fd3a88eb6 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1285 #21 0x00007f1fd3fce7dc in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1607 #22 0x0000000000406ad6 in main(int, char**) (argc=1, argv=<optimized out>) at /usr/src/debug/plasma-workspace-5.6.95/xembed-sni-proxy/main.cpp:68 (gdb)
And that is with the latest plasma 5.7 beta ... $ rpm -qf /usr/bin/xembedsniproxy plasma5-workspace-5.6.95-215.1.x86_64
If you're still getting Segmentation fault in SNIProxy::getImageNonComposite this could be related: https://bugs.kde.org/show_bug.cgi?id=359664