Bug 399612 - Kwin crashed when RKWard opened a new window
Summary: Kwin crashed when RKWard opened a new window
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.14.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
: 399630 399660 400721 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-10-10 13:37 UTC by flyos
Modified: 2018-11-06 00:40 UTC (History)
3 users (show)

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


Attachments
Kwin Support Information (5.80 KB, application/octet-stream)
2018-10-10 14:10 UTC, flyos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description flyos 2018-10-10 13:37:07 UTC
Application: kwin_x11 (5.14.0)

Qt Version: 5.11.2
Frameworks Version: 5.50.0
Operating System: Linux 4.12.14-lp150.12.19-default x86_64
Distribution: "openSUSE Leap 15.0"

-- Information about the crash:
- What I was doing when the application crashed:
Running R code in RKWard. Part of the code was about plotting some data, which is done by opening a new window in RKWard to display the graph. This triggered the crash of Kwin. This is all under X11.

I must add that I have frequent freezes of Kwin which source/cause I never managed to pinpoint the location... This might or might not be related.

OS : openSUSE Leap 15.0 (with KDE repositories)
KDE Plasma : 5.14.0
Qt : 5.11.2
KDE Frameworks : 5.50.0
Kernel : 4.12.14-lp150.12.19-default
Type of OS : 64-bit
Proc : 4 × Intel® Core™ i3-2120 CPU @ 3.30GHz
RAM : 7,7 Gio

The crash does not seem to be reproducible.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f60f75d1940 (LWP 2190))]

Thread 7 (Thread 0x7f60d5b99700 (LWP 4426)):
#0  0x00007f60f6f4c186 in ppoll () at /lib64/libc.so.6
#1  0x00007f60f42fc0d1 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib64/libQt5Core.so.5
#2  0x00007f60f42fd7de in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#3  0x00007f60f42a470a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007f60f40cfaaa in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#5  0x00007f60ee9d3015 in  () at /usr/lib64/libQt5Qml.so.5
#6  0x00007f60f40da9cb in  () at /usr/lib64/libQt5Core.so.5
#7  0x00007f60eff43559 in start_thread () at /lib64/libpthread.so.0
#8  0x00007f60f6f5682f in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7f60d5398700 (LWP 3729)):
#0  0x00007f60f6f4c186 in ppoll () at /lib64/libc.so.6
#1  0x00007f60f42fc0d1 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib64/libQt5Core.so.5
#2  0x00007f60f42fd7de in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#3  0x00007f60f42a470a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007f60f40cfaaa in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#5  0x00007f60ee9d3015 in  () at /usr/lib64/libQt5Qml.so.5
#6  0x00007f60f40da9cb in  () at /usr/lib64/libQt5Core.so.5
#7  0x00007f60eff43559 in start_thread () at /lib64/libpthread.so.0
#8  0x00007f60f6f5682f in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f60b90b7700 (LWP 2236)):
#0  0x00007f60eff4989d in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f60f32036f4 in  () at /usr/lib64/libQt5Script.so.5
#2  0x00007f60f3203739 in  () at /usr/lib64/libQt5Script.so.5
#3  0x00007f60eff43559 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f60f6f5682f in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f60c718e700 (LWP 2231)):
#0  0x00007f60f6f4c186 in ppoll () at /lib64/libc.so.6
#1  0x00007f60f42fc0d1 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib64/libQt5Core.so.5
#2  0x00007f60f42fd7de in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#3  0x00007f60f42a470a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007f60f40cfaaa in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#5  0x00007f60ee9d3015 in  () at /usr/lib64/libQt5Qml.so.5
#6  0x00007f60f40da9cb in  () at /usr/lib64/libQt5Core.so.5
#7  0x00007f60eff43559 in start_thread () at /lib64/libpthread.so.0
#8  0x00007f60f6f5682f in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f60d67ef700 (LWP 2218)):
#0  0x00007ffdb578bc27 in clock_gettime ()
#1  0x00007f60f6f64116 in clock_gettime () at /lib64/libc.so.6
#2  0x00007f60f42ffcd1 in  () at /usr/lib64/libQt5Core.so.5
#3  0x00007f60f42fe509 in QTimerInfoList::updateCurrentTime() () at /usr/lib64/libQt5Core.so.5
#4  0x00007f60f42feae5 in QTimerInfoList::timerWait(timespec&) () at /usr/lib64/libQt5Core.so.5
#5  0x00007f60f42fdae4 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#6  0x00007f60f42a470a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#7  0x00007f60f40cfaaa in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#8  0x00007f60ed8b1b75 in  () at /usr/lib64/libQt5DBus.so.5
#9  0x00007f60f40da9cb in  () at /usr/lib64/libQt5Core.so.5
#10 0x00007f60eff43559 in start_thread () at /lib64/libpthread.so.0
#11 0x00007f60f6f5682f in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f60dd3ce700 (LWP 2214)):
#0  0x00007f60f6f4c08b in poll () at /lib64/libc.so.6
#1  0x00007f60f5e69387 in  () at /usr/lib64/libxcb.so.1
#2  0x00007f60f5e6afaa in xcb_wait_for_event () at /usr/lib64/libxcb.so.1
#3  0x00007f60de4c7bd9 in  () at /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007f60f40da9cb in  () at /usr/lib64/libQt5Core.so.5
#5  0x00007f60eff43559 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f60f6f5682f in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f60f75d1940 (LWP 2190)):
[KCrash Handler]
#6  0x00007f60f42b5db0 in QMetaObject::indexOfMethod(char const*) const () at /usr/lib64/libQt5Core.so.5
#7  0x00007f60f42b9369 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () at /usr/lib64/libQt5Core.so.5
#8  0x00007f60f3a753b7 in KWin::EffectWindow::addRepaintFull() () at /usr/lib64/libkwineffects.so.11
#9  0x00007f60f37acae6 in  () at /usr/lib64/libkwin4_effect_builtins.so.1
#10 0x00007f60f6ade591 in KWin::EffectsHandlerImpl::postPaintScreen() () at /usr/lib64/libkwin.so.5
#11 0x00007f60f6ade591 in KWin::EffectsHandlerImpl::postPaintScreen() () at /usr/lib64/libkwin.so.5
#12 0x00007f60f6ad0cbe in KWin::Scene::paintScreen(int*, QRegion const&, QRegion const&, QRegion*, QRegion*, QMatrix4x4 const&, QRect const&) () at /usr/lib64/libkwin.so.5
#13 0x00007f60bd312d01 in KWin::SceneOpenGL::paint(QRegion, QList<KWin::Toplevel*>) () at /usr/lib64/qt5/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so
#14 0x00007f60f6ac3402 in KWin::Compositor::performCompositing() () at /usr/lib64/libkwin.so.5
#15 0x00007f60f42d5f1b in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#16 0x00007f60f507cf9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#17 0x00007f60f508457f in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#18 0x00007f60f42a63d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#19 0x00007f60f42ff83e in QTimerInfoList::activateTimers() () at /usr/lib64/libQt5Core.so.5
#20 0x00007f60f42fda42 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#21 0x00007f60de5558bd in  () at /usr/lib64/libQt5XcbQpa.so.5
#22 0x00007f60f42a470a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#23 0x00007f60f42ad8c0 in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#24 0x00007f60f722160b in kdemain () at /usr/lib64/libkdeinit5_kwin_x11.so
#25 0x00007f60f6e7ef4a in __libc_start_main () at /lib64/libc.so.6
#26 0x000055863bb597fa in _start ()

Reported using DrKonqi
Comment 1 Vlad Zahorodnii 2018-10-10 13:50:39 UTC
Unfortunately the backtrace lacks debug symbols. If you're able to reproduce the crash, please install debug packages and submit a new backtrace.

Also, when did KWin crash? when a new window appeared? Can you please post output of
qdbus org.kde.KWin /KWin supportInformation
Comment 2 flyos 2018-10-10 14:10:15 UTC
Created attachment 115538 [details]
Kwin Support Information
Comment 3 flyos 2018-10-10 14:12:15 UTC
Oh, I thought it was OK since DrKonqi said the backtrace was informative. I've install the debug symbols (is kwin5-debuginfo enough?), let's see if this is happening again.

My Kwin Support Information is attached. As I explained, Kwin crashed exactly when RKWard opened a new window.
Comment 4 Vlad Zahorodnii 2018-10-10 14:18:06 UTC
(In reply to flyos from comment #3)
> Oh, I thought it was OK since DrKonqi said the backtrace was informative.
> I've install the debug symbols (is kwin5-debuginfo enough?), let's see if
> this is happening again.
I'm not an openSUSE user, but yeah, seems like that's what we need. :-)
Comment 5 Vlad Zahorodnii 2018-10-11 09:47:00 UTC
Can reproduce.
Comment 6 David Edmundson 2018-10-11 10:06:49 UTC
*** Bug 399630 has been marked as a duplicate of this bug. ***
Comment 7 David Edmundson 2018-10-11 14:25:55 UTC
*** Bug 399660 has been marked as a duplicate of this bug. ***
Comment 8 Vlad Zahorodnii 2018-10-11 14:53:07 UTC
Git commit 396f8f558c07e4c8b0d3090ebe5f65fab1d98f5a by Vlad Zagorodniy.
Committed on 11/10/2018 at 14:48.
Pushed by vladz into branch 'Plasma/5.14'.

[effects/diminactive] Delete active transitions when window is deleted

Summary:
The Dim Inactive effect expects that the windowClosed signal always
proceeds the windowDeleted signal. But in some cases that's not the case.

If a window gets destroyed before becoming ready for painting, only
the windowDeleted signal will be emitted. In addition to that, KWin will
activate that window, which means we'll probably start a transition for
it.

Because this effect cannot terminate active transitions for such
windows, KWin can crash in postPaintScreen.

This change addresses the crash in postPaintScreen by adding extra clean
up stuff in the windowDeleted slot to make sure that there are no
transitions for deleted windows.

The proper fix would be to not emit windowActivated signal for windows
that are not ready for painting.
FIXED-IN: 5.14.1

Test Plan:
Ran
```
x <- seq(5, 15, length=1000)
y <- dnorm(x, mean=10, sd=3)
plot(x, y, type="l", lwd=1)
```
in RKWard multiple times.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16130

M  +6    -0    effects/diminactive/diminactive.cpp

https://commits.kde.org/kwin/396f8f558c07e4c8b0d3090ebe5f65fab1d98f5a
Comment 9 David Edmundson 2018-11-06 00:40:13 UTC
*** Bug 400721 has been marked as a duplicate of this bug. ***