Bug 463385 - Crash in touch events for disabled output
Summary: Crash in touch events for disabled output
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: master
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 443088 463257 463716 464112 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-12-23 11:11 UTC by Patrick Silva
Modified: 2023-01-11 11:09 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2022-12-23 11:11:06 UTC
Logged out and then logged in quickly and got a black screen with mouse pointer due to kwin_wayland crash.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.7
Graphics Platform: Wayland


Thread 7 (Thread 0x7f77f3cdc640 (LWP 12946)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x55c8288d1758) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x55c8288d1758) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55c8288d1758, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f7805693ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55c8288d1708, cond=0x55c8288d1730) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=cond@entry=0x55c8288d1730, mutex=mutex@entry=0x55c8288d1708) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f77fa0bf85b in cnd_wait (mtx=0x55c8288d1708, cond=0x55c8288d1730) at ../include/c11/threads_posix.h:155
#6  util_queue_thread_func (input=input@entry=0x55c8288d0b80) at ../src/util/u_queue.c:294
#7  0x00007f77fa0bf48b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#8  0x00007f7805694b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f7805726a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 6 (Thread 0x7f77f34db640 (LWP 12947)):
#0  0x00007f7805718d7f in __GI___poll (fds=0x7f77e40029e0, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f78040a6666 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f780404f3e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7806915af8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f77e4000b70, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007f78068ba9bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f77f34dab40, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#5  0x00007f78066cd4e2 in QThread::exec() (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007f78066ce703 in QThreadPrivate::start(void*) (arg=0x55c8288ca3c8) at thread/qthread_unix.cpp:330
#7  0x00007f7805694b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#8  0x00007f7805726a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 5 (Thread 0x7f77f21ff640 (LWP 12955)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f77fb9cc550) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f77fb9cc550) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f77fb9cc550, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f7805693ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f77fb9cc500, cond=0x7f77fb9cc528) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=cond@entry=0x7f77fb9cc528, mutex=mutex@entry=0x7f77fb9cc500) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f77fa0bf85b in cnd_wait (mtx=0x7f77fb9cc500, cond=0x7f77fb9cc528) at ../include/c11/threads_posix.h:155
#6  util_queue_thread_func (input=input@entry=0x55c828a38340) at ../src/util/u_queue.c:294
#7  0x00007f77fa0bf48b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#8  0x00007f7805694b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f7805726a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 4 (Thread 0x7f7800fff640 (LWP 12942)):
#0  0x00007f7805718d7f in __GI___poll (fds=0x7f77fc0053c0, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f78040a6666 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f780404f3e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7806915af8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f77fc000b70, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007f78068ba9bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f7800ffeb10, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#5  0x00007f78066cd4e2 in QThread::exec() (this=this@entry=0x7f780890cd80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007f7808893f1b in QDBusConnectionManager::run() (this=0x7f780890cd80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ./src/dbus/qdbusconnection.cpp:179
#7  0x00007f78066ce703 in QThreadPrivate::start(void*) (arg=0x7f780890cd80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:330
#8  0x00007f7805694b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f7805726a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7f77f0881640 (LWP 12965)):
#0  0x00007f7805718d7f in __GI___poll (fds=0x7f77d40029e0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f78040a6666 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f780404f3e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7806915af8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f77d4000b70, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007f78068ba9bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f77f0880b20, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#5  0x00007f78066cd4e2 in QThread::exec() (this=this@entry=0x55c828bb8210) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007f7807932959 in QQmlThreadPrivate::run() (this=0x55c828bb8210) at qml/ftw/qqmlthread.cpp:155
#7  0x00007f78066ce703 in QThreadPrivate::start(void*) (arg=0x55c828bb8210) at thread/qthread_unix.cpp:330
#8  0x00007f7805694b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f7805726a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7f77f19fe640 (LWP 12956)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f77f2ca7550) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f77f2ca7550) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f77f2ca7550, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f7805693ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f77f2ca7500, cond=0x7f77f2ca7528) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=cond@entry=0x7f77f2ca7528, mutex=mutex@entry=0x7f77f2ca7500) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f77fa0bf85b in cnd_wait (mtx=0x7f77f2ca7500, cond=0x7f77f2ca7528) at ../include/c11/threads_posix.h:155
#6  util_queue_thread_func (input=input@entry=0x55c8289ec960) at ../src/util/u_queue.c:294
#7  0x00007f77fa0bf48b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#8  0x00007f7805694b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f7805726a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7f78018969c0 (LWP 12901)):
#0  std::__shared_ptr<KWin::OutputMode, (__gnu_cxx::_Lock_policy)2>::operator bool() const (this=0x38) at /usr/include/c++/11/bits/shared_ptr_base.h:1299
#1  KWin::Output::modeSize() const (this=0x0) at ./src/core/output.cpp:194
#2  0x00007f7808586aa3 in KWin::LibInput::Connection::processEvents() (this=0x55c8289898d0) at ./src/backends/libinput/connection.cpp:383
#3  0x00007f78068e9afe in QObject::event(QEvent*) (this=0x55c8288ca3b0, e=0x7f77e4006890) at kernel/qobject.cpp:1347
#4  0x00007f7805f6c763 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55c8288ca3b0, e=0x7f77e4006890) at kernel/qapplication.cpp:3637
#5  0x00007f78068bc09a in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55c8288ca3b0, event=0x7f77e4006890) at kernel/qcoreapplication.cpp:1064
#6  0x00007f78068bf187 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=data@entry=0x55c8287f6c40) at kernel/qcoreapplication.cpp:1821
#7  0x00007f7806912f5e in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55c8287fa7c0, flags=...) at kernel/qeventdispatcher_unix.cpp:468
#8  0x000055c826cf64a1 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
#9  0x00007f78068ba9bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffbbb796a0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#10 0x00007f78068c2f54 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#11 0x00007f7806d364e0 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#12 0x00007f7805f6c6d9 in QApplication::exec() () at kernel/qapplication.cpp:2829
#13 0x000055c826c150c0 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./src/main_wayland.cpp:628
Comment 1 David Edmundson 2022-12-27 10:23:38 UTC
*** Bug 463257 has been marked as a duplicate of this bug. ***
Comment 2 David Edmundson 2022-12-27 10:24:28 UTC
*** Bug 443088 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2022-12-27 10:26:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3366
Comment 4 David Edmundson 2023-01-04 12:15:55 UTC
*** Bug 463716 has been marked as a duplicate of this bug. ***
Comment 5 Vlad Zahorodnii 2023-01-05 10:05:14 UTC
Git commit 0167b7d7b0013391f8dd38c2b79fb65238f4ac21 by Vlad Zahorodnii, on behalf of David Edmundson.
Committed on 05/01/2023 at 08:29.
Pushed by vladz into branch 'master'.

libinput: Ignore touch events without outputs

A touch device could have no output object assigned due to the screen
being disabled, queued events or malconfiguration.

Using output would crash. Touch up is guarded so that we have matching
pairs.

M  +11   -0    src/backends/libinput/connection.cpp

https://invent.kde.org/plasma/kwin/commit/0167b7d7b0013391f8dd38c2b79fb65238f4ac21
Comment 6 Vlad Zahorodnii 2023-01-11 11:09:33 UTC
*** Bug 464112 has been marked as a duplicate of this bug. ***