Bug 419742

Summary: kwin_wayland crashed on switching between "Switch to laptop screen" and "Switch to external screen" multi-monitor modes
Product: [Plasma] kwin Reporter: Patrick Silva <bugseforuns>
Component: platform-drmAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: postix
Priority: NOR Keywords: wayland
Version: git master   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Patrick Silva 2020-04-06 17:49:01 UTC
STEPS TO REPRODUCE
1. start Wayland session
2. connect an external monitor to hdmi port and turn it on
3. set multi-monitor mode to "Switch to laptop screen"
4. switch to "Switch to external screen" multi-monitor mode

OBSERVED RESULT
kwin_wayland crash

EXPECTED RESULT
no crash

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.1

Thread 11 (Thread 1742.1780):
#0  0x00007fa5c161c9f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fa5bf1e4fb8 <QTWTF::pageheap_memory+57592>)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x7fa5bf1e4f68 <QTWTF::pageheap_memory+57512>, cond=0x7fa5bf1e4f90 <QTWTF::pageheap_memory+57552>)
    at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=cond@entry=0x7fa5bf1e4f90 <QTWTF::pageheap_memory+57552>, mutex=mutex@entry=0x7fa5bf1e4f68 <QTWTF::pageheap_memory+57512>)
    at pthread_cond_wait.c:655
#3  0x00007fa5beeef944 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7fa5bf1d6ec0 <QTWTF::pageheap_memory>)
    at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#4  0x00007fa5beeef989 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#5  0x00007fa5c16166db in start_thread (arg=0x7fa56bfff700) at pthread_create.c:463
#6  0x00007fa5bf62688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 10 (Thread 1742.1779):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fa5bff5bd44 in QtLinuxFutex::_q_futex (val3=0, addr2=0x0, val2=0, val=<optimized out>, op=0, addr=<optimized out>) at thread/qfutex_p.h:116
#2  QtLinuxFutex::futexWait<QBasicAtomicInteger<unsigned int> > (expectedValue=<optimized out>, futex=...) at thread/qfutex_p.h:135
#3  futexSemaphoreTryAcquire_loop<false> (timeout=-1, nn=8589934593, curValue=<optimized out>, u=...) at thread/qsemaphore.cpp:219
#4  futexSemaphoreTryAcquire<false> (timeout=-1, n=n@entry=1, u=...) at thread/qsemaphore.cpp:262
#5  QSemaphore::acquire (this=this@entry=0x55d949cd3710, n=n@entry=1) at thread/qsemaphore.cpp:326
#6  0x00007fa5a99bbd7a in QtVirtualKeyboard::HunspellWorker::run (this=0x55d949cd36f0) at hunspellworker.cpp:744
#7  0x00007fa5bff597ec in QThreadPrivate::start (arg=0x55d949cd36f0) at thread/qthread_unix.cpp:342
#8  0x00007fa5c16166db in start_thread (arg=0x7fa578a95700) at pthread_create.c:463
#9  0x00007fa5bf62688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 9 (Thread 1742.1777):
#0  0x00007fa5c161c9f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55d949bc1770) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55d949bc1720, cond=0x55d949bc1748) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=cond@entry=0x55d949bc1748, mutex=mutex@entry=0x55d949bc1720) at pthread_cond_wait.c:655
#3  0x00007fa5bff5fd9b in QWaitConditionPrivate::wait (deadline=..., this=0x55d949bc1720) at thread/qwaitcondition_unix.cpp:146
#4  QWaitCondition::wait (this=<optimized out>, mutex=0x55d949bc15f8, deadline=...) at thread/qwaitcondition_unix.cpp:225
#5  0x00007fa5bff5ff19 in QWaitCondition::wait (this=this@entry=0x55d949bc1600, mutex=mutex@entry=0x55d949bc15f8, time=time@entry=18446744073709551615)
    at thread/qwaitcondition_unix.cpp:208
#6  0x00007fa57b3538eb in FileInfoThread::run (this=0x55d949bc15e8) at fileinfothread.cpp:231
#7  0x00007fa5bff597ec in QThreadPrivate::start (arg=0x55d949bc15e8) at thread/qthread_unix.cpp:342
#8  0x00007fa5c16166db in start_thread (arg=0x7fa579a97700) at pthread_create.c:463
#9  0x00007fa5bf62688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 1742.1776):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fa5bff5bd44 in QtLinuxFutex::_q_futex (val3=0, addr2=0x0, val2=0, val=<optimized out>, op=0, addr=<optimized out>) at thread/qfutex_p.h:116
---Type <return> to continue, or q <return> to quit---
#2  QtLinuxFutex::futexWait<QBasicAtomicInteger<unsigned int> > (expectedValue=<optimized out>, futex=...) at thread/qfutex_p.h:135
#3  futexSemaphoreTryAcquire_loop<false> (timeout=-1, nn=8589934593, curValue=<optimized out>, u=...) at thread/qsemaphore.cpp:219
#4  futexSemaphoreTryAcquire<false> (timeout=-1, n=n@entry=1, u=...) at thread/qsemaphore.cpp:262
#5  QSemaphore::acquire (this=this@entry=0x55d949bf7410, n=n@entry=1) at thread/qsemaphore.cpp:326
#6  0x00007fa5a99bbd7a in QtVirtualKeyboard::HunspellWorker::run (this=0x55d949bf73f0) at hunspellworker.cpp:744
#7  0x00007fa5bff597ec in QThreadPrivate::start (arg=0x55d949bf73f0) at thread/qthread_unix.cpp:342
#8  0x00007fa5c16166db in start_thread (arg=0x7fa57a298700) at pthread_create.c:463
#9  0x00007fa5bf62688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 1742.1775):
#0  0x00007fa5bf619bf9 in __GI___poll (fds=0x7fa57c0029e0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fa5b69fb5c9 in ?? () from target:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa5b69fb6dc in g_main_context_iteration () from target:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa5c01a80bc in QEventDispatcherGlib::processEvents (this=0x7fa57c000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007fa5c014763a in QEventLoop::exec (this=this@entry=0x7fa5827c8d80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007fa5bff58317 in QThread::exec (this=this@entry=0x55d949a4f010) at thread/qthread.cpp:536
#6  0x00007fa5bb34d605 in QQmlThreadPrivate::run (this=0x55d949a4f010) at qml/ftw/qqmlthread.cpp:155
#7  0x00007fa5bff597ec in QThreadPrivate::start (arg=0x55d949a4f010) at thread/qthread_unix.cpp:342
#8  0x00007fa5c16166db in start_thread (arg=0x7fa5827c9700) at pthread_create.c:463
#9  0x00007fa5bf62688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 1742.1774):
#0  0x00007fa5bf619bf9 in __GI___poll (fds=0x7fa584002de0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fa5b69fb5c9 in ?? () from target:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa5b69fb6dc in g_main_context_iteration () from target:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa5c01a80bc in QEventDispatcherGlib::processEvents (this=0x7fa584000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007fa5c014763a in QEventLoop::exec (this=this@entry=0x7fa58fffed80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007fa5bff58317 in QThread::exec (this=this@entry=0x55d9495b6670) at thread/qthread.cpp:536
#6  0x00007fa5bb34d605 in QQmlThreadPrivate::run (this=0x55d9495b6670) at qml/ftw/qqmlthread.cpp:155
#7  0x00007fa5bff597ec in QThreadPrivate::start (arg=0x55d9495b6670) at thread/qthread_unix.cpp:342
#8  0x00007fa5c16166db in start_thread (arg=0x7fa58ffff700) at pthread_create.c:463
#9  0x00007fa5bf62688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 1742.1745):
#0  0x00007fa5bf619bf9 in __GI___poll (fds=0x7fa5940029e0, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fa5b69fb5c9 in ?? () from target:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa5b69fb6dc in g_main_context_iteration () from target:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa5c01a80bc in QEventDispatcherGlib::processEvents (this=0x7fa594000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007fa5c014763a in QEventLoop::exec (this=this@entry=0x7fa5a35eeda0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007fa5bff58317 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:536
#6  0x00007fa5bff597ec in QThreadPrivate::start (arg=0x55d949114470) at thread/qthread_unix.cpp:342
#7  0x00007fa5c16166db in start_thread (arg=0x7fa5a35ef700) at pthread_create.c:463
---Type <return> to continue, or q <return> to quit---
#8  0x00007fa5bf62688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 1742.1744):
#0  0x00007fa5bf619bf9 in __GI___poll (fds=0x7fa59c002de0, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fa5b69fb5c9 in ?? () from target:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa5b69fb6dc in g_main_context_iteration () from target:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa5c01a80bc in QEventDispatcherGlib::processEvents (this=0x7fa59c000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007fa5c014763a in QEventLoop::exec (this=this@entry=0x7fa5a3defda0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007fa5bff58317 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:536
#6  0x00007fa5bff597ec in QThreadPrivate::start (arg=0x55d9491134a0) at thread/qthread_unix.cpp:342
#7  0x00007fa5c16166db in start_thread (arg=0x7fa5a3df0700) at pthread_create.c:463
#8  0x00007fa5bf62688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 1742.1742):
#0  0x00007fa5a1d93480 in ?? ()
#1  0x00007fa5a827675b in KWin::DrmSurfaceBuffer::releaseGbm (this=0x55d9498f4a60) at ./plugins/platforms/drm/drm_buffer_gbm.cpp:65
#2  KWin::DrmSurfaceBuffer::~DrmSurfaceBuffer (this=0x55d9498f4a60, __in_chrg=<optimized out>) at ./plugins/platforms/drm/drm_buffer_gbm.cpp:60
#3  0x00007fa5a8276829 in KWin::DrmSurfaceBuffer::~DrmSurfaceBuffer (this=0x55d9498f4a60, __in_chrg=<optimized out>) at ./plugins/platforms/drm/drm_buffer_gbm.cpp:61
#4  0x00007fa5a8266fc2 in KWin::DrmPlane::~DrmPlane (this=0x55d94921b3f0, __in_chrg=<optimized out>) at ./plugins/platforms/drm/drm_object_plane.cpp:35
#5  0x00007fa5a8266fd9 in KWin::DrmPlane::~DrmPlane (this=0x55d94921b3f0, __in_chrg=<optimized out>) at ./plugins/platforms/drm/drm_object_plane.cpp:37
#6  0x00007fa5a825d8bf in qDeleteAll<KWin::DrmPlane* const*> (end=<optimized out>, begin=0x55d94920f628) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qalgorithms.h:320
#7  qDeleteAll<QVector<KWin::DrmPlane*> > (c=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qalgorithms.h:328
#8  KWin::DrmBackend::~DrmBackend (this=0x55d9491057e0, __in_chrg=<optimized out>) at ./plugins/platforms/drm/drm_backend.cpp:101
#9  0x00007fa5a825dbe9 in KWin::DrmBackend::~DrmBackend (this=0x55d9491057e0, __in_chrg=<optimized out>) at ./plugins/platforms/drm/drm_backend.cpp:106
#10 0x00007fa5c013d3c7 in QLibraryPrivate::unload (this=0x55d949105150, flag=QLibraryPrivate::NoUnloadSys) at plugin/qlibrary.cpp:579
#11 0x00007fa5c013f6fe in QLibraryStore::cleanup () at plugin/qlibrary.cpp:416
#12 qlibraryCleanup () at plugin/qlibrary.cpp:440
#13 (anonymous namespace)::qlibraryCleanup_dtor_class_::~qlibraryCleanup_dtor_class_ (this=<optimized out>, __in_chrg=<optimized out>) at plugin/qlibrary.cpp:442
#14 0x00007fa5bf548615 in __cxa_finalize (d=0x7fa5c0619960) at cxa_finalize.c:83
#15 0x00007fa5bff367a3 in __do_global_dtors_aux () from target:/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffc27ad0db0 in ?? ()
Comment 1 postix 2021-08-07 13:36:17 UTC
Duplicate of https://bugs.kde.org/show_bug.cgi?id=421700 ?
Comment 2 postix 2021-08-07 13:36:50 UTC

*** This bug has been marked as a duplicate of bug 421700 ***
Comment 3 Vlad Zahorodnii 2022-02-04 11:09:44 UTC
can you confirm whether this issue is fixed in git master or 5.24?
Comment 4 Bug Janitor Service 2022-02-19 04:36:45 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
mark the bug 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 5 Bug Janitor Service 2022-03-06 04:35:46 UTC
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!