Summary: | KWin crash | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kwindowsystem | Reporter: | Bhushan Shah <bshah> |
Component: | general | Assignee: | Martin Flöser <mgraesslin> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | kwin-bugs-null, mgraesslin |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
URL: | https://git.reviewboard.kde.org/r/117701/ | ||
Latest Commit: | http://commits.kde.org/kwindowsystem/ba3fe29fe342d20caf2ec694858d81b97afbfc2c | Version Fixed In: | |
Sentry Crash Report: |
Description
Bhushan Shah
2014-03-27 13:02:21 UTC
It crashes in relation to KstartupInfo handling, so it seems to be related to you starting apps (or clicking links in mails, etc.). I fixed there already one crash, but I need a condition to be able to reproduce to investigate myself. Reassign to kwindowsystem Okay,I just reproduced, I started VLC media player by clicking a avi video file from dolphin > Okay,I just reproduced, I started VLC media player by clicking a avi video
> file from dolphin
doesn't happen for me :-(
I still can reproduce but totally random, we can either close it and reopen when someone reproduces it or keep it open. Choice is yours I just hit this crash for the very first time. Though also no idea how to reproduce: Thread 1 (Thread 0x7fc3af872900 (LWP 7703)): [KCrash Handler] #5 __memcmp_sse4_1 () at ../sysdeps/x86_64/multiarch/memcmp-sse4.S:1322 #6 0x00007fc3a5b16f58 in qstrcmp (str1=..., str2=...) at tools/qbytearray.cpp:347 #7 0x00007fc3a765b796 in operator< (a1=..., a2=...) at /opt/qt5/include/QtCore/qbytearray.h:568 #8 0x00007fc3a7658465 in KStartupInfoId::operator< (this=0x3902dc8, id_P=...) at /home/martin/src/kf5/frameworks/kwindowsystem/src/kstartupinfo.cpp:1191 #9 0x00007fc3a765dcb5 in qMapLessThanKey<KStartupInfoId> (key1=..., key2=...) at /opt/qt5/include/QtCore/qmap.h:75 #10 0x00007fc3a765e595 in QMapNode<KStartupInfoId, KStartupInfo::Data>::lowerBound (this=0x3902db0, akey=...) at /opt/qt5/include/QtCore/qmap.h:145 #11 0x00007fc3a765dbb4 in QMapData<KStartupInfoId, KStartupInfo::Data>::findNode (this=0x2e18d10, akey=...) at /opt/qt5/include/QtCore/qmap.h:301 #12 0x00007fc3a765cd55 in QMap<KStartupInfoId, KStartupInfo::Data>::remove (this=0x242f5b0, akey=...) at /opt/qt5/include/QtCore/qmap.h:906 #13 0x00007fc3a76551e2 in KStartupInfo::Private::remove_startup_info_internal (this=0x242f5a0, id_P=...) at /home/martin/src/kf5/frameworks/kwindowsystem/src/kstartupinfo.cpp:398 #14 0x00007fc3a765740a in KStartupInfo::Private::find_wclass (this=0x242f5a0, _res_name=..., _res_class=..., id_O=0x7fffc7f74f50, data_O=0x7fffc7f74f40) at /home/martin/src/kf5/frameworks/kwindowsystem/src/kstartupinfo.cpp:875 #15 0x00007fc3a7656dd9 in KStartupInfo::Private::check_startup_internal (this=0x242f5a0, w_P=121634822, id_O=0x7fffc7f74f50, data_O=0x7fffc7f74f40) at /home/martin/src/kf5/frameworks/kwindowsystem/src/kstartupinfo.cpp:784 #16 0x00007fc3a7656906 in KStartupInfo::checkStartup (this=0x241af80, w_P=121634822, id_O=..., data_O=...) at /home/martin/src/kf5/frameworks/kwindowsystem/src/kstartupinfo.cpp:721 #17 0x00007fc3af263f03 in KWin::Workspace::checkStartupNotification (this=0x2424270, w=121634822, id=..., data=...) at /home/martin/src/kf5/kde/workspace/kwin/workspace.cpp:1233 #18 0x00007fc3af2d312a in KWin::Client::manage (this=0x2a18ac0, w=121634822, isMapped=false) at /home/martin/src/kf5/kde/workspace/kwin/manage.cpp:144 #19 0x00007fc3af2611a2 in KWin::Workspace::createClient (this=0x2424270, w=121634822, is_mapped=false) at /home/martin/src/kf5/kde/workspace/kwin/workspace.cpp:474 #20 0x00007fc3af2b8fae in KWin::Workspace::workspaceEvent (this=0x2424270, e=0x7fc390001b20) at /home/martin/src/kf5/kde/workspace/kwin/events.cpp:365 #21 0x00007fc3af2ab16a in KWin::XcbEventFilter::nativeEventFilter (this=0x2388440, eventType=..., message=0x7fc390001b20, result=0x7fffc7f75b78) at /home/martin/src/kf5/kde/workspace/kwin/main.cpp:390 #22 0x00007fc3a5d82e4b in QAbstractEventDispatcher::filterNativeEvent (this=0x234aad0, eventType=..., message=0x7fc390001b20, result=0x7fffc7f75b78) at kernel/qabstracteventdispatcher.cpp:468 #23 0x00007fc397a79651 in QXcbConnection::handleXcbEvent (this=0x2326200, event=0x7fc390001b20) at qxcbconnection.cpp:795 #24 0x00007fc397a7b3ed in QXcbConnection::processXcbEvents (this=0x2326200) at qxcbconnection.cpp:1204 #25 0x00007fc397ad1795 in QXcbConnection::qt_static_metacall (_o=0x2326200, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fc39000d380) at .moc/moc_qxcbconnection.cpp:179 #26 0x00007fc3a5dc1e53 in QMetaCallEvent::placeMetaCall (this=0x7fc39000d300, object=0x2326200) at kernel/qobject.cpp:487 #27 0x00007fc3a5dc2e96 in QObject::event (this=0x2326200, e=0x7fc39000d300) at kernel/qobject.cpp:1241 #28 0x00007fc3a6bfff04 in QApplicationPrivate::notify_helper (this=0x231ee20, receiver=0x2326200, e=0x7fc39000d300) at kernel/qapplication.cpp:3491 #29 0x00007fc3a6bfd696 in QApplication::notify (this=0x7fffc7f76b80, receiver=0x2326200, e=0x7fc39000d300) at kernel/qapplication.cpp:2944 #30 0x00007fc3af2aafe0 in KWin::Application::notify (this=0x7fffc7f76b80, o=0x2326200, e=0x7fc39000d300) at /home/martin/src/kf5/kde/workspace/kwin/main.cpp:344 #31 0x00007fc3a5d875de in QCoreApplication::notifyInternal (this=0x7fffc7f76b80, receiver=0x2326200, event=0x7fc39000d300) at kernel/qcoreapplication.cpp:935 #32 0x00007fc3a5d8b2c7 in QCoreApplication::sendEvent (receiver=0x2326200, event=0x7fc39000d300) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:237 #33 0x00007fc3a5d8893b in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x230f4b0) at kernel/qcoreapplication.cpp:1539 #34 0x00007fc3a5dfb2a3 in QEventDispatcherUNIX::processEvents (this=0x234aad0, flags=...) at kernel/qeventdispatcher_unix.cpp:587 #35 0x00007fc397b124a2 in QUnixEventDispatcherQPA::processEvents (this=0x234aad0, flags=...) at eventdispatchers/qunixeventdispatcher.cpp:70 #36 0x00007fc3a5d84294 in QEventLoop::processEvents (this=0x7fffc7f76a70, flags=...) at kernel/qeventloop.cpp:136 #37 0x00007fc3a5d84577 in QEventLoop::exec (this=0x7fffc7f76a70, flags=...) at kernel/qeventloop.cpp:212 #38 0x00007fc3a5d87cc7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1188 #39 0x00007fc3a637dba4 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1436 #40 0x00007fc3a6bfcec3 in QApplication::exec () at kernel/qapplication.cpp:2736 #41 0x00007fc3af2ac6dc in kdemain (argc=2, argv=0x7fffc7f771a8) at /home/martin/src/kf5/kde/workspace/kwin/main.cpp:556 #42 0x0000000000400cdf in main (argc=2, argv=0x7fffc7f771a8) at /opt/build/kf5/kde/workspace/kwin/kwin_dummy.cpp:3 (In reply to comment #5) > I just hit this crash for the very first time. Though also no idea how to > reproduce: To be sure, what you were doing when crash happened? > To be sure, what you were doing when crash happened?
I tried to open an email (KMail) attachment in Kate.
I can relate opening files. - for you attachment - me music files or movies And here it is: the unit test to reproduce the crash: void KStartupInfo_UnitTest::checkStartupTest() { KStartupInfoId id; KStartupInfoId id2; id.initId(QByteArrayLiteral("somefancyidwhichisrandom_kstartupinfo_unittest_0")); id2.initId(QByteArrayLiteral("somefancyidwhichisrandom_kstartupinfo_unittest_1")); KStartupInfoData data; data.setApplicationId(QStringLiteral("/dir with space/kstartupinfo_unittest.desktop")); data.setIcon(QStringLiteral("/dir with space/kstartupinfo_unittest.png")); data.setDescription(QStringLiteral("A description")); data.setName(QStringLiteral("A name")); data.setBin(QStringLiteral("dir with space/kstartupinfo_unittest")); // important for this test: WMClass const QByteArray wmClass = QByteArrayLiteral("kstartupinfotest"); data.setWMClass(wmClass); xcb_connection_t *c = QX11Info::connection(); xcb_window_t window = xcb_generate_id(c); uint32_t values[] = {XCB_EVENT_MASK_PROPERTY_CHANGE}; xcb_create_window(c, XCB_COPY_FROM_PARENT, window, QX11Info::appRootWindow(), 0, 0, 100, 100, 0, XCB_COPY_FROM_PARENT, XCB_COPY_FROM_PARENT, XCB_CW_EVENT_MASK, values); xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8, wmClass.length() * 2 + 1, "kstartupinfotest\0kstartupinfotest"); KStartupInfo info(KStartupInfo::DisableKWinModule | KStartupInfo::AnnounceSilenceChanges, this); KStartupInfo::sendStartup(id, data); KStartupInfo::sendStartup(id2, data); sync(); QTest::qWait(100); QCOMPARE(info.checkStartup(window), KStartupInfo::Match); QCOMPARE(info.checkStartup(window), KStartupInfo::Match); } Review Request created: https://git.reviewboard.kde.org/r/117701/ I have this patch applied and if I open link from konsole, and chrome/chromium is already running, whole X goes down. Can not reproduce every time but I reproduced it two times. X11 crash -> Xorg bug. Clients are not supposed to be able to crash the display server, no matter what they do. Do you have a backtrace in /var/log/Xorg.*.log* after this happens? Not right now, but I'll try to get if possible.. Git commit ba3fe29fe342d20caf2ec694858d81b97afbfc2c by Martin Gräßlin. Committed on 23/04/2014 at 09:23. Pushed by graesslin into branch 'master'. Fix crashers in KStartupInfo on remove while iterating This is similar to the change ... just for more cases. If the API was used with ::checkStartup it could happen that an item got removed from the startups while iterating the list of startups. Thus the data corrupted resulting in a crash when getting a similar crash. In this case the code now uses erase instead of remove to have a valid iterator. REVIEW: 117701 M +105 -0 autotests/kstartupinfo_unittest.cpp M +14 -6 src/kstartupinfo.cpp http://commits.kde.org/kwindowsystem/ba3fe29fe342d20caf2ec694858d81b97afbfc2c |