<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>430328</bug_id>
          
          <creation_ts>2020-12-13 07:54:10 +0000</creation_ts>
          <short_desc>Kwin crashes on startup</short_desc>
          <delta_ts>2020-12-13 15:32:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>kwin</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>drkonqi</keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Oded Arbel">oded</reporter>
          <assigned_to name="KWin default assignee">kwin-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1983976</commentid>
    <comment_count>0</comment_count>
    <who name="Oded Arbel">oded</who>
    <bug_when>2020-12-13 07:54:10 +0000</bug_when>
    <thetext>Application: kwin_x11 (5.20.80)

Qt Version: 5.15.2
Frameworks Version: 5.78.0
Operating System: Linux 5.8.0-33-generic x86_64
Windowing system: X11
Distribution: Ubuntu 20.10

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

When Plasma starts, Kwin immediately crashes.
Running on Neon unstable

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault

[New LWP 731974]
[New LWP 731976]
[New LWP 732077]
[New LWP 732101]
[New LWP 732102]
[New LWP 732103]
[New LWP 732104]
[New LWP 732105]
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;/lib/x86_64-linux-gnu/libthread_db.so.1&quot;.
0x00007ff3e156b66f in __GI___poll (fds=0x7ffd19b04728, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
[Current thread is 1 (Thread 0x7ff3db9d58c0 (LWP 731972))]

Thread 9 (Thread 0x7ff3bd60e640 (LWP 732105)):
#0  futex_wait_cancelable (private=&lt;optimized out&gt;, expected=0, futex_word=0x55ca6e430e34) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55ca6e430de0, cond=0x55ca6e430e08) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55ca6e430e08, mutex=0x55ca6e430de0) at pthread_cond_wait.c:638
#3  0x00007ff3e1928d1b in QWaitConditionPrivate::wait (deadline=..., this=0x55ca6e430de0) at thread/qwaitcondition_unix.cpp:146
#4  QWaitCondition::wait (this=this@entry=0x55ca6deb7518, mutex=mutex@entry=0x55ca6deb7510, deadline=...) at thread/qwaitcondition_unix.cpp:225
#5  0x00007ff3e0755814 in QSGRenderThreadEventQueue::takeEvent (wait=true, this=0x55ca6deb7508) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qdeadlinetimer.h:68
#6  QSGRenderThread::processEventsAndWaitForMore (this=this@entry=0x55ca6deb7470) at scenegraph/qsgthreadedrenderloop.cpp:936
#7  0x00007ff3e0755c89 in QSGRenderThread::run (this=0x55ca6deb7470) at scenegraph/qsgthreadedrenderloop.cpp:1053
#8  0x00007ff3e1922bac in QThreadPrivate::start (arg=0x55ca6deb7470) at thread/qthread_unix.cpp:329
#9  0x00007ff3e0d25590 in start_thread (arg=0x7ff3bd60e640) at pthread_create.c:463
#10 0x00007ff3e1577223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7ff3be85a640 (LWP 732104)):
#0  futex_wait_cancelable (private=&lt;optimized out&gt;, expected=0, futex_word=0x55ca6d86bb08) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55ca6d86bab8, cond=0x55ca6d86bae0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55ca6d86bae0, mutex=0x55ca6d86bab8) at pthread_cond_wait.c:638
#3  0x00007ff3c94f361b in cnd_wait (mtx=0x55ca6d86bab8, cond=0x55ca6d86bae0) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x55ca6db38ef0) at ../src/util/u_queue.c:289
#5  0x00007ff3c94f30db in impl_thrd_routine (p=&lt;optimized out&gt;) at ../include/c11/threads_posix.h:87
#6  0x00007ff3e0d25590 in start_thread (arg=0x7ff3be85a640) at pthread_create.c:463
#7  0x00007ff3e1577223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7ff3b7fff640 (LWP 732103)):
#0  futex_wait_cancelable (private=&lt;optimized out&gt;, expected=0, futex_word=0x55ca6d86bb08) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55ca6d86bab8, cond=0x55ca6d86bae0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55ca6d86bae0, mutex=0x55ca6d86bab8) at pthread_cond_wait.c:638
#3  0x00007ff3c94f361b in cnd_wait (mtx=0x55ca6d86bab8, cond=0x55ca6d86bae0) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x55ca6d7fac90) at ../src/util/u_queue.c:289
#5  0x00007ff3c94f30db in impl_thrd_routine (p=&lt;optimized out&gt;) at ../include/c11/threads_posix.h:87
#6  0x00007ff3e0d25590 in start_thread (arg=0x7ff3b7fff640) at pthread_create.c:463
#7  0x00007ff3e1577223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7ff3bf05b640 (LWP 732102)):
#0  futex_wait_cancelable (private=&lt;optimized out&gt;, expected=0, futex_word=0x55ca6d86bb08) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55ca6d86bab8, cond=0x55ca6d86bae0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55ca6d86bae0, mutex=0x55ca6d86bab8) at pthread_cond_wait.c:638
#3  0x00007ff3c94f361b in cnd_wait (mtx=0x55ca6d86bab8, cond=0x55ca6d86bae0) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x55ca6d73c2e0) at ../src/util/u_queue.c:289
#5  0x00007ff3c94f30db in impl_thrd_routine (p=&lt;optimized out&gt;) at ../include/c11/threads_posix.h:87
#6  0x00007ff3e0d25590 in start_thread (arg=0x7ff3bf05b640) at pthread_create.c:463
#7  0x00007ff3e1577223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7ff3c8d89640 (LWP 732101)):
#0  futex_wait_cancelable (private=&lt;optimized out&gt;, expected=0, futex_word=0x55ca6d86bb08) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55ca6d86bab8, cond=0x55ca6d86bae0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55ca6d86bae0, mutex=0x55ca6d86bab8) at pthread_cond_wait.c:638
#3  0x00007ff3c94f361b in cnd_wait (mtx=0x55ca6d86bab8, cond=0x55ca6d86bae0) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x55ca6d77cc90) at ../src/util/u_queue.c:289
#5  0x00007ff3c94f30db in impl_thrd_routine (p=&lt;optimized out&gt;) at ../include/c11/threads_posix.h:87
#6  0x00007ff3e0d25590 in start_thread (arg=0x7ff3c8d89640) at pthread_create.c:463
#7  0x00007ff3e1577223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7ff3cbfff640 (LWP 732077)):
#0  0x00007ff3e156b76e in __ppoll (fds=fds@entry=0x7ff3c4000d78, nfds=nfds@entry=1, timeout=&lt;optimized out&gt;, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:44
#1  0x00007ff3e1b5eeb9 in ppoll (__ss=&lt;optimized out&gt;, __timeout=&lt;optimized out&gt;, __nfds=&lt;optimized out&gt;, __fds=&lt;optimized out&gt;) at /usr/include/x86_64-linux-gnu/bits/poll2.h:77
#2  qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7ff3c4000d78) at kernel/qcore_unix.cpp:132
#3  qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7ff3c4000d78) at kernel/qcore_unix.cpp:129
#4  qt_safe_poll (fds=0x7ff3c4000d78, nfds=1, timeout_ts=timeout_ts@entry=0x0) at kernel/qcore_unix.cpp:155
#5  0x00007ff3e1b60563 in QEventDispatcherUNIX::processEvents (this=&lt;optimized out&gt;, flags=...) at ../../include/QtCore/../../src/corelib/tools/qarraydata.h:211
#6  0x00007ff3e1b071ab in QEventLoop::exec (this=this@entry=0x7ff3cbffec20, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#7  0x00007ff3e1921a12 in QThread::exec (this=this@entry=0x55ca6d778f40) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#8  0x00007ff3e03dafa9 in QQmlThreadPrivate::run (this=0x55ca6d778f40) at qml/ftw/qqmlthread.cpp:155
#9  0x00007ff3e1922bac in QThreadPrivate::start (arg=0x55ca6d778f40) at thread/qthread_unix.cpp:329
#10 0x00007ff3e0d25590 in start_thread (arg=0x7ff3cbfff640) at pthread_create.c:463
#11 0x00007ff3e1577223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7ff3da338640 (LWP 731976)):
#0  0x00007ff3e156b76e in __ppoll (fds=fds@entry=0x7ff3cc00aff8, nfds=nfds@entry=1, timeout=&lt;optimized out&gt;, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:44
#1  0x00007ff3e1b5eeb9 in ppoll (__ss=&lt;optimized out&gt;, __timeout=&lt;optimized out&gt;, __nfds=&lt;optimized out&gt;, __fds=&lt;optimized out&gt;) at /usr/include/x86_64-linux-gnu/bits/poll2.h:77
#2  qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7ff3cc00aff8) at kernel/qcore_unix.cpp:132
#3  qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7ff3cc00aff8) at kernel/qcore_unix.cpp:129
#4  qt_safe_poll (fds=0x7ff3cc00aff8, nfds=1, timeout_ts=timeout_ts@entry=0x0) at kernel/qcore_unix.cpp:155
#5  0x00007ff3e1b60563 in QEventDispatcherUNIX::processEvents (this=&lt;optimized out&gt;, flags=...) at ../../include/QtCore/../../src/corelib/tools/qarraydata.h:211
#6  0x00007ff3e1b071ab in QEventLoop::exec (this=this@entry=0x7ff3da337c10, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#7  0x00007ff3e1921a12 in QThread::exec (this=this@entry=0x7ff3e2cd0d80 &lt;(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder&gt;) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#8  0x00007ff3e2c4cf4b in QDBusConnectionManager::run (this=0x7ff3e2cd0d80 &lt;(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder&gt;) at qdbusconnection.cpp:179
#9  0x00007ff3e1922bac in QThreadPrivate::start (arg=0x7ff3e2cd0d80 &lt;(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder&gt;) at thread/qthread_unix.cpp:329
#10 0x00007ff3e0d25590 in start_thread (arg=0x7ff3da338640) at pthread_create.c:463
#11 0x00007ff3e1577223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7ff3db261640 (LWP 731974)):
#0  0x00007ff3e156b66f in __GI___poll (fds=fds@entry=0x7ff3db260b48, nfds=nfds@entry=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ff3e1834c1a in poll (__timeout=-1, __nfds=1, __fds=0x7ff3db260b48) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#2  _xcb_conn_wait (c=c@entry=0x55ca6d4be990, cond=cond@entry=0x55ca6d4be9d0, vector=vector@entry=0x0, count=count@entry=0x0) at ../../src/xcb_conn.c:480
#3  0x00007ff3e183690a in xcb_wait_for_event (c=c@entry=0x55ca6d4be990) at ../../src/xcb_in.c:697
#4  0x00007ff3db328d58 in QXcbEventQueue::run (this=0x55ca6d4b4e70) at qxcbeventqueue.cpp:228
#5  0x00007ff3e1922bac in QThreadPrivate::start (arg=0x55ca6d4b4e70) at thread/qthread_unix.cpp:329
#6  0x00007ff3e0d25590 in start_thread (arg=0x7ff3db261640) at pthread_create.c:463
#7  0x00007ff3e1577223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7ff3db9d58c0 (LWP 731972)):
[KCrash Handler]
#4  0x00007ff3e2f49cb5 in KWin::KeyboardLayout::checkLayoutChange (this=0x0, previousLayout=previousLayout@entry=0) at ./keyboard_layout.cpp:212
#5  0x00007ff3e2f490da in KWin::KeyboardInputRedirection::processKey (this=0x55ca6d641c80, key=32, state=state@entry=KWin::InputRedirection::KeyboardKeyPressed, time=69882383, device=device@entry=0x0) at ./keyboard_input.cpp:206
#6  0x00007ff3e2f32b80 in KWin::InputRedirection::processKeyboardKey (this=&lt;optimized out&gt;, key=&lt;optimized out&gt;, state=state@entry=KWin::InputRedirection::KeyboardKeyPressed, time=&lt;optimized out&gt;) at ./input.cpp:2380
#7  0x00007ff3e2f7dcbf in KWin::Platform::keyboardKeyPressed (this=&lt;optimized out&gt;, key=&lt;optimized out&gt;, time=&lt;optimized out&gt;) at ./input.h:510
#8  0x00007ff3d9b0f954 in KWin::XInputEventFilter::event (this=0x55ca6db5b120, event=0x7ff3d400a9a0) at ./main.h:182
#9  0x00007ff3e2f23de1 in KWin::Workspace::workspaceEvent (this=0x55ca6d62ffe0, e=0x7ff3d400a9a0) at ./events.cpp:299
#10 0x00007ff3e1b05b3f in QAbstractEventDispatcher::filterNativeEvent (this=&lt;optimized out&gt;, eventType=..., message=message@entry=0x7ff3d400a9a0, result=result@entry=0x7ffd19b052d8) at kernel/qabstracteventdispatcher.cpp:495
#11 0x00007ff3db2ff945 in QXcbConnection::handleXcbEvent (this=this@entry=0x55ca6d4bd370, event=event@entry=0x7ff3d400a9a0) at qxcbnativeinterface.h:101
#12 0x00007ff3db300696 in QXcbConnection::processXcbEvents (this=0x55ca6d4bd370, flags=...) at qxcbconnection.cpp:1003
#13 0x00007ff3db32a140 in QXcbUnixEventDispatcher::processEvents (this=0x55ca6d5cad10, flags=...) at qxcbeventdispatcher.cpp:61
#14 0x00007ff3e1b071ab in QEventLoop::exec (this=this@entry=0x7ffd19b05420, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#15 0x00007ff3e1b0f354 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#16 0x000055ca6b79ea4d in main (argc=&lt;optimized out&gt;, argv=0x7ffd19b056a8) at ./main_x11.cpp:486
[Inferior 1 (process 731972) detached]

Possible duplicates by query: bug 404710, bug 400678.

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983978</commentid>
    <comment_count>1</comment_count>
    <who name="Oded Arbel">oded</who>
    <bug_when>2020-12-13 08:19:54 +0000</bug_when>
    <thetext>When I restart kwin_x11, it almost immediately crashes again.

On Wayland it doesn&apos;t crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1984045</commentid>
    <comment_count>2</comment_count>
    <who name="Oded Arbel">oded</who>
    <bug_when>2020-12-13 15:32:28 +0000</bug_when>
    <thetext>The crash is with Kwin from Neon unstable: 4:5.20.4+p20.04+git20201212.0230-0

Current git master (eebae29bcc8f2da47090490a2325561592d89d1b) doesn&apos;t crash anymore. This MR seems to fix it: https://invent.kde.org/plasma/kwin/-/merge_requests/545 . 

I&apos;ll be waiting impatiently for a new build :-)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>