Bug 348526 - kwin_wayland crashes under Wayland, unless KWIN_COMPOSE=Q is set in the environment
Summary: kwin_wayland crashes under Wayland, unless KWIN_COMPOSE=Q is set in the envir...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-wayland-nested (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2015-05-31 23:26 UTC by bluescreenavenger
Modified: 2016-09-02 12:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bluescreenavenger 2015-05-31 23:26:55 UTC
Application: kwin_wayland (5.3.90)
 (Compiled from sources)
Qt Version: 5.5.0
Operating System: Linux 3.19.0-18-generic i686
Distribution: Ubuntu 15.04

-- Information about the crash:
It seems that when using the Wayland backened ( --windowed ) kwin_wayland must be started with KWIN_COMPOSE=Q


I also have to remove the KWinCompositingIsUnsafe from the .config file in order to get it to try again.

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_wayland), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb1901780 (LWP 12222))]

Thread 3 (Thread 0xb1745b40 (LWP 12224)):
#0  0xb76bf07b in __libc_enable_asynccancel () at ../nptl/cancellation.c:41
#1  0xb76a73c1 in poll () at ../sysdeps/unix/syscall-template.S:81
#2  0xb42530e0 in poll (__timeout=-1, __nfds=1, __fds=0xb0e06ea0) at /usr/include/i386-linux-gnu/bits/poll2.h:46
#3  g_poll (fds=0xb0e06ea0, nfds=1, timeout=-1) at gpoll.c:124
#4  0xb4243fa4 in g_main_context_poll (priority=<optimized out>, n_fds=<optimized out>, fds=<optimized out>, timeout=<optimized out>, context=<optimized out>) at gmain.c:4103
#5  g_main_context_iterate (context=0xb0e00f00, block=2, block@entry=1, dispatch=1, self=<optimized out>) at gmain.c:3803
#6  0xb42440e6 in g_main_context_iteration (context=0xb0e00f00, may_block=1) at gmain.c:3869
#7  0xb612bb4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#8  0xb60cd2d3 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#9  0xb60cd772 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#10 0xb5ee864d in QThread::exec() () from /opt/lib/libQt5Core.so.5
#11 0xb5ee8728 in QThread::run() () from /opt/lib/libQt5Core.so.5
#12 0xb5eedb0b in ?? () from /opt/lib/libQt5Core.so.5
#13 0xb72611aa in start_thread (arg=0xb1745b40) at pthread_create.c:333
#14 0xb76b1fde in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:122

Thread 2 (Thread 0xb0aa6b40 (LWP 12225)):
#0  0xb612af70 in ?? () from /opt/lib/libQt5Core.so.5
#1  0xb42438f9 in g_main_context_check (context=0xaf7004d8, max_priority=-1351613224, fds=0xb0aa60bc, n_fds=1) at gmain.c:3649
#2  0xb4243f3a in g_main_context_iterate (context=0xaf7004d8, block=block@entry=1, dispatch=1, self=<optimized out>) at gmain.c:3805
#3  0xb42440e6 in g_main_context_iteration (context=0xaf7004d8, may_block=1) at gmain.c:3869
#4  0xb612bb4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#5  0xb60cd2d3 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#6  0xb60cd772 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#7  0xb5ee864d in QThread::exec() () from /opt/lib/libQt5Core.so.5
#8  0xb5ee8728 in QThread::run() () from /opt/lib/libQt5Core.so.5
#9  0xb5eedb0b in ?? () from /opt/lib/libQt5Core.so.5
#10 0xb72611aa in start_thread (arg=0xb0aa6b40) at pthread_create.c:333
#11 0xb76b1fde in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:122

Thread 1 (Thread 0xb1901780 (LWP 12222)):
[KCrash Handler]
#6  0xb764050a in __GI_strstr (haystack_start=0x1 <error: Cannot access memory at address 0x1>, needle_start=0xb4e6d1cf "X.Org") at strstr.c:63
#7  0xb4e5bd87 in KWin::GLPlatform::detect(KWin::OpenGLPlatformInterface) () from /opt/lib/i386-linux-gnu/libkwinglutils.so.6
#8  0xb749af22 in KWin::AbstractEglBackend::initKWinGL() () from /opt/lib/i386-linux-gnu/libkwin.so.5
#9  0xb0ab8455 in KWin::EglWaylandBackend::EglWaylandBackend(KWin::Wayland::WaylandBackend*) () from /opt/lib/i386-linux-gnu/plugins/org.kde.kwin.waylandbackends/KWinWaylandWaylandBackend.so
#10 0xb0ab6365 in KWin::Wayland::WaylandBackend::createOpenGLBackend() () from /opt/lib/i386-linux-gnu/plugins/org.kde.kwin.waylandbackends/KWinWaylandWaylandBackend.so
#11 0xb73fa117 in KWin::SceneOpenGL::createScene(QObject*) () from /opt/lib/i386-linux-gnu/libkwin.so.5
#12 0xb73cae02 in KWin::Compositor::slotCompositingOptionsInitialized() () from /opt/lib/i386-linux-gnu/libkwin.so.5
#13 0xb73cbca3 in KWin::Compositor::setup() () from /opt/lib/i386-linux-gnu/libkwin.so.5
#14 0xb73cce61 in QtPrivate::QFunctorSlotObject<KWin::Compositor::Compositor(QObject*)::{lambda(bool)#1}, 1, QtPrivate::List<bool>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) () from /opt/lib/i386-linux-gnu/libkwin.so.5
#15 0xb60ff450 in QMetaCallEvent::placeMetaCall(QObject*) () from /opt/lib/libQt5Core.so.5
#16 0xb6102c13 in QObject::event(QEvent*) () from /opt/lib/libQt5Core.so.5
#17 0xb6adefda in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/lib/libQt5Widgets.so.5
#18 0xb6ae4879 in QApplication::notify(QObject*, QEvent*) () from /opt/lib/libQt5Widgets.so.5
#19 0xb735ab2a in KWin::Application::notify(QObject*, QEvent*) () from /opt/lib/i386-linux-gnu/libkwin.so.5
#20 0xb77ae5c5 in KWin::ApplicationWayland::notify(QObject*, QEvent*) () from /opt/lib/i386-linux-gnu/libkdeinit5_kwin_wayland.so
#21 0xb60d016a in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /opt/lib/libQt5Core.so.5
#22 0xb60d274c in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /opt/lib/libQt5Core.so.5
#23 0xb6128e94 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#24 0xb77ae8de in KWin::EventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/i386-linux-gnu/libkdeinit5_kwin_wayland.so
#25 0xb60cd2d3 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#26 0xb60cd772 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#27 0xb60d5db5 in QCoreApplication::exec() () from /opt/lib/libQt5Core.so.5
#28 0xb64601e1 in QGuiApplication::exec() () from /opt/lib/libQt5Gui.so.5
#29 0xb6ada4b4 in QApplication::exec() () from /opt/lib/libQt5Widgets.so.5
#30 0xb77ad018 in kdemain () from /opt/lib/i386-linux-gnu/libkdeinit5_kwin_wayland.so
#31 0x080485b7 in main ()

Reported using DrKonqi
Comment 1 Martin Flöser 2016-09-02 12:16:10 UTC
This specific issue should have been fixed with:
commit f1f87c7a7d79175a5296b1f4acb976b653e8eb68
Author: Martin Gräßlin <mgraesslin@kde.org>
Date:   Mon Feb 23 13:17:46 2015 +0100

    Guard access to Display in GLPlatform::getXServerVersion
    
    On wayland OpenGL might get initialized before we have a connection
    to the XServer and we might only have an xcb connection. So let's
    guard the access.