Bug 101885 - [skl] Kwin crashing
Summary: [skl] Kwin crashing
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-23 13:16 UTC by Mike Lothian
Modified: 2017-12-13 01:46 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mike Lothian 2017-07-23 13:16:25 UTC
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f295698ed00 (LWP 12319))]

Thread 6 (Thread 0x7f294cbfd700 (LWP 1393)):
#0  0x00007f295de1893a in ppoll () from /lib64/libc.so.6
#1  0x00007f295ca7a2a5 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () from /usr/lib64/libQt5Core.so.5
#2  0x00007f295ca7b54d in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#3  0x00007f295ca2bb3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x00007f295c883d0a in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#5  0x00007f295c887fa5 in ?? () from /usr/lib64/libQt5Core.so.5
#6  0x00007f295d7e6334 in start_thread () from /lib64/libpthread.so.0
#7  0x00007f295de21c8f in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f293bfff700 (LWP 12346)):
#0  0x00007f295d7ebf3f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f295c3813e4 in ?? () from /usr/lib64/libQt5Script.so.5
#2  0x00007f295c381429 in ?? () from /usr/lib64/libQt5Script.so.5
#3  0x00007f295d7e6334 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f295de21c8f in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f294f5ce700 (LWP 12341)):
#0  0x00007f295c88083c in QMutex::lock() () from /usr/lib64/libQt5Core.so.5
#1  0x00007f295ca2f594 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#2  0x00007f295ca7b3da in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#3  0x00007f295ca2bb3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x00007f295c883d0a in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#5  0x00007f295b71af65 in ?? () from /usr/lib64/libQt5Qml.so.5
#6  0x00007f295c887fa5 in ?? () from /usr/lib64/libQt5Core.so.5
#7  0x00007f295d7e6334 in start_thread () from /lib64/libpthread.so.0
#8  0x00007f295de21c8f in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f2955af5700 (LWP 12327)):
#0  0x00007f295ca7b9cb in ?? () from /usr/lib64/libQt5Core.so.5
#1  0x00007f295ca7b468 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#2  0x00007f295ca2bb3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#3  0x00007f295c883d0a in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#4  0x00007f295b2d25f5 in ?? () from /usr/lib64/libQt5DBus.so.5
#5  0x00007f295c887fa5 in ?? () from /usr/lib64/libQt5Core.so.5
#6  0x00007f295d7e6334 in start_thread () from /lib64/libpthread.so.0
#7  0x00007f295de21c8f in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f2956652700 (LWP 12326)):
#0  0x00007f295de1888d in poll () from /lib64/libc.so.6
#1  0x00007f295e1cb127 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007f295e1ccf1a in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007f29566cfbe9 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007f295c887fa5 in ?? () from /usr/lib64/libQt5Core.so.5
#5  0x00007f295d7e6334 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f295de21c8f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f295698ed00 (LWP 12319)):
[KCrash Handler]
#6  0x00007f294cfdb534 in isl_gen5_emit_depth_stencil_hiz_s (dev=0x0, batch=0x1344830, info=0x1) at /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/intel/isl/isl_emit_depth_stencil.c:67
#7  0x000000000107d350 in ?? ()
#8  0x00007f295cc7f1b9 in ?? () from /usr/lib64/libQt5Core.so.5
#9  0x00007f295dc20642 in KWin::AbstractEglTexture::~AbstractEglTexture() () from /usr/lib64/libkwin.so.5
#10 0x00007f2955dc86c3 in ?? () from /usr/lib64/qt5/plugins/org.kde.kwin.platforms/KWinX11Platform.so
#11 0x00007f295dba3699 in KWin::SceneOpenGL::Texture::~Texture() () from /usr/lib64/libkwin.so.5
#12 0x00007f295dba36cd in ?? () from /usr/lib64/libkwin.so.5
#13 0x00007f295dba36e9 in ?? () from /usr/lib64/libkwin.so.5
#14 0x00007f295dba6263 in ?? () from /usr/lib64/libkwin.so.5
#15 0x00007f295db91e96 in KWin::Scene::windowDeleted(KWin::Deleted*) () from /usr/lib64/libkwin.so.5
#16 0x00007f295ca559f7 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Comment 1 Topi Pohjolainen 2017-07-24 17:34:42 UTC
Looking at the backtrace it looks like there is some sort of of clean-up going on, destructor for KWin::SceneOpenGL::Texture getting called. What surprises me a bit is that it seems to kick off rendering with GPU as isl_emit_depth_stencil_hiz_s() gets called to setup the hardware.

For normal rendering there is its own path for setting depth+stencil and ending up here means that the GPU is being setup for blorp.

Anyway, is ~Texture() really suppose to render something and more importantly is the driver context still suppose to be valid at this point. Looking at:

6  0x00007f294cfdb534 in isl_gen5_emit_depth_stencil_hiz_s (dev=0x0, batch=0x1344830, info=0x1) at /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/intel/isl/isl_emit_depth_stencil.c:67

All three arguments are pointers and must be valid, first is simply NULL and
third clearly invalid "0x1".
Comment 2 Topi Pohjolainen 2017-07-24 17:44:04 UTC
And setting up depth stencil for gen5 means you would need to be running ILK. I'm guessing this is newer hardware, right? If so, it would also indicate that the driver context isn't sound anymore as it contains wrong hardware generation specifier.
Comment 3 Kenneth Graunke 2017-07-24 17:57:05 UTC
I just tried kwin 5.10.4 on my Kabylake system (should be basically identical to Skylake), and it seems to be working fine... :/
Comment 4 Mike Lothian 2017-07-24 22:19:06 UTC
I noticed the trace said KWin::AbstractEglTexture::~AbstractEglTexture()

I thought kwin had removed EGL support, turns out they just removed the setting in Control Panels and I've been using EGL rather than GLX since the option was removed

The option in in ~/.config/kwinrc under compositing 

GLPlatformInterface=egl

I'll try removing it and see if I still have issues, it could be a sign that something is broken in Mesa's EGL code
Comment 5 Mike Lothian 2017-07-24 22:20:53 UTC
Would the 0x1 be related to https://cgit.freedesktop.org/mesa/mesa/commit/?id=63c251e38f9b4ac3606094a72c8c5b658402f3d0
Comment 6 Topi Pohjolainen 2017-07-25 05:26:01 UTC
No, the last argument "info=0x1" is a pointer to a structure (struct isl_depth_stencil_hiz_emit_info) that specifies the depth and stencil buffers against which the depth-stencil state setup for the hardware is based on.
Comment 7 Mark Janes 2017-08-28 21:21:45 UTC
unless someone can reproduce this, it shouldn't block the release.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.