Bug 345448

Summary: KWin crashes on startup / login
Product: [Plasma] kwin Reporter: Stuart Campbell <stuart>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: markd.mcconnell, rdieter
Priority: NOR Keywords: drkonqi, triaged
Version: 5.2.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=343844
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Stuart Campbell 2015-03-23 13:06:19 UTC
Application: kwin_x11 (5.2.1)

Qt Version: 5.4.0
Operating System: Linux 3.19.1-201.fc21.x86_64 x86_64
Distribution: "Fedora release 21 (Twenty One)"

-- Information about the crash:
- What I was doing when the application crashed:

Select the Plasma session from SDDM and login.

I am running Fedora 21 using the plasma5 packages from dvraitl/plasma-5 copr repo.

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
81	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[KCrash Handler]
#5  0x00007f016e9b27a0 in xcb_setup_vendor_end () from /lib64/libxcb.so.1
#6  0x00007f016e9b27f9 in xcb_setup_pixmap_formats_iterator () from /lib64/libxcb.so.1
#7  0x00007f016e9b2839 in xcb_setup_roots_iterator () from /lib64/libxcb.so.1
#8  0x00007f0175f55bc8 in KWin::ColorMapper::ColorMapper(QObject*) () from /lib64/libkwin.so.5
#9  0x00007f0175f5dc5d in KWin::Workspace::Workspace(bool) () from /lib64/libkwin.so.5
#10 0x00007f0176356e46 in QtPrivate::QFunctorSlotObject<KWin::ApplicationX11::performStartup()::{lambda()#2}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) () from /lib64/libkdeinit5_kwin_x11.so
#11 0x00007f016ee8345a in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#12 0x00007f016fca9c42 in KSelectionOwner::Private::claimSucceeded() () from /lib64/libKF5WindowSystem.so.5
#13 0x00007f016fcaa4c1 in KSelectionOwner::filterEvent(void*) () from /lib64/libKF5WindowSystem.so.5
#14 0x00007f016ee50ec0 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () from /lib64/libQt5Core.so.5
#15 0x00007f0157b4c87d in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () from /usr/lib64/qt5/plugins/platforms/libqxcb.so
#16 0x00007f0157b4dd7b in QXcbConnection::processXcbEvents() () from /usr/lib64/qt5/plugins/platforms/libqxcb.so
#17 0x00007f016ee84c2a in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#18 0x00007f016f73cd3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#19 0x00007f016f742330 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#20 0x00007f016ee544ab in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#21 0x00007f016ee564eb in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#22 0x00007f016eea8cf2 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#23 0x00007f0157ba252d in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt5/plugins/platforms/libqxcb.so
#24 0x00007f016ee51d42 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#25 0x00007f016ee597ec in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#26 0x00007f0176357eab in kdemain () from /lib64/libkdeinit5_kwin_x11.so
#27 0x00007f016d8f0fe0 in __libc_start_main (main=0x400bc0 <main>, argc=3, argv=0x7fff66f62e78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff66f62e68) at libc-start.c:289
#28 0x0000000000400bee in _start ()

Reported using DrKonqi
Comment 1 Thomas Lübking 2015-03-23 18:38:28 UTC
Nested X server (xnest, xephyr, ...) or VNC?
There're some bugreports on this, also see eg. https://bugreports.qt.io/browse/QTBUG-29978
Comment 2 Stuart Campbell 2015-03-23 19:28:39 UTC
None of the above, native local X session sitting in front of the machine.
Comment 3 Thomas Lübking 2015-03-23 21:34:08 UTC
Does kwin_x11 restart automatically (and w/o crashing, oc.)?
Comment 4 Stuart Campbell 2015-03-23 21:38:49 UTC
No, it just says that it kept crashing and do I want to use a different window manager.

I fear that this is connected to the fact that I do not have xrandr enabled on my display - could that be the issue ?  KDE 4 works with no problems though.
Comment 5 Thomas Lübking 2015-03-23 23:01:57 UTC
That would be odd - the crashing xcb code looks for the first root window.

You could try to re-enable the xrandr extension, but I assume this would be rather some forwarded error.
Comment 6 Martin Flöser 2015-03-24 07:06:02 UTC
I'm pretty sure it's related. QX11Info::connection passes by screen and QScreen is bound to an xrandr screen, so maybe we don't get a connection and thus we get the crash.

A backtrace with full debug symbols could help as we would then know that xcb_connection_t* is null.

I had seen similar looking crashes during kwin_wayland development the last weeks whenever I hit the code path before having set up the X connection.
Comment 7 Martin Flöser 2015-03-24 07:56:20 UTC
Git commit 289ec53350b50cf134a9867a9341419819b0578e by Martin Gräßlin.
Committed on 24/03/2015 at 07:54.
Pushed by graesslin into branch 'master'.

Add basic information about the X server to supportInformation

* Vendor name
* Vendor release
* Protocol version
* All Extensions used by KWin (name, present and version)

Need for this recognized due to a bug related to no xrandr present.

M  +14   -0    workspace.cpp

http://commits.kde.org/kwin/289ec53350b50cf134a9867a9341419819b0578e
Comment 8 Martin Flöser 2016-08-29 07:57:45 UTC
If you are still able to reproduce please provide a backtrace with debug symbols. Overall what we see just doesn't make sense. It should not crash in that code.

I rather think that you hit some instabilities due to a bad combination of packages or even ABI issues caused by using packages from an unstable repository.
Comment 9 Andrew Crouthamel 2018-09-26 22:12:42 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 set the bug status 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 10 Andrew Crouthamel 2018-10-27 03:42:49 UTC
Dear Bug Submitter,

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!