Bug 314194 - catalyst crashes because of mixed mode installation with MESA drivers
Summary: catalyst crashes because of mixed mode installation with MESA drivers
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (show other bugs)
Version: 4.10.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 325237 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-31 15:21 UTC by omeringen
Modified: 2013-09-24 11:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
mgraesslin: Catalyst+


Attachments
New crash information added by DrKonqi (2.94 KB, text/plain)
2013-04-15 14:52 UTC, Gopalakrishna Bhat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description omeringen 2013-01-31 15:21:01 UTC
Hi,
Application: kwin (4.9.98)
KDE Platform Version: 4.9.98
Qt Version: 4.8.4
Operating System: Linux 3.7.5-1-ARCH x86_64

ATI HD 2400 with latest catalyst-legacy driver 13.1-1

kwin is crashing, there is not much info at bug reporter : Executable: kwin PID: 1407 Signal: Segmentation fault (11)
Systems settings -> Desktop Effects says "OpenGL compositing (the default) has crashed KWin"

Note that everything is fine on KDE-stable 4.9.5-1


Reproducible: Always

Steps to Reproduce:
1.On every restart or whenever you try to click "Re-enable OpenGL detection" at System Settings -> Desktop Effects.
2.
3.
Actual Results:  
kwin crashes

Expected Results:  
kwin shouldn't crash
Comment 1 Martin Flöser 2013-01-31 15:46:22 UTC
if it crashes, please provide a backtrace.
Comment 2 Thomas Lübking 2013-01-31 16:04:06 UTC
> kwin is crashing, there is not much info at bug reporter : Executable: kwin PID: 1407 Signal: Segmentation fault (11)

click on "details"
Comment 3 omeringen 2013-02-06 19:44:39 UTC
Hi,
Sorry for the delay but i wanted to try 4.10.00 packages from testing repo.

I am using archlinux, there is no debug symbols yet : https://bugs.archlinux.org/task/10975
I am not sure if these information is enough or not but this is all i have :

Application: kwin (4.10.00)
KDE Platform Version: 4.10.00
Qt Version: 4.8.4
Operating System: Linux 3.7.6-1-ARCH x86_64

-- Information about the crash:
<In detail, tell us what you were doing  when the application crashed.>

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[KCrash Handler]
#5  0x00007fb60d8635ee in glXGetFBConfigs () from /usr/lib/libGL.so.1
#6  0x00007fb611d12648 in ?? () from /usr/lib/libkdeinit4_kwin.so
#7  0x00007fb611d12d2a in ?? () from /usr/lib/libkdeinit4_kwin.so
#8  0x00007fb611d08c87 in ?? () from /usr/lib/libkdeinit4_kwin.so
#9  0x00007fb611cf7d55 in ?? () from /usr/lib/libkdeinit4_kwin.so
#10 0x00007fb60cd9ab8f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#11 0x00007fb60cc79487 in QFutureWatcherBase::event(QEvent*) () from /usr/lib/libQtCore.so.4
#12 0x00007fb60bf1718c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#13 0x00007fb60bf1b60a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#14 0x00007fb611473426 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#15 0x00007fb60cd856ae in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#16 0x00007fb60cd89011 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#17 0x00007fb60bfb831c in ?? () from /usr/lib/libQtGui.so.4
#18 0x00007fb60cd843ff in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#19 0x00007fb60cd84688 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#20 0x00007fb60cd89328 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#21 0x00007fb611cadd9a in kdemain () from /usr/lib/libkdeinit4_kwin.so
#22 0x00007fb6118baa15 in __libc_start_main () from /usr/lib/libc.so.6
#23 0x0000000000400701 in _start ()

Report to https://bugs.kde.org/
Comment 4 Thomas Lübking 2013-02-06 20:40:03 UTC
glXGetFBConfigs()

The trace does not contain enough information to say what actually is the problem, but it crashes in a GL call (the very first one) -> driver issue (wrong driver for GPU?)

Can you run "glxinfo" or "glxgears" (without them crashing)?
Comment 5 omeringen 2013-02-06 20:44:45 UTC
Yeah i can run "glxinfo" and "glxgears" without any crash.
glxinfo output :
http://pastie.org/6082117
Comment 6 Thomas Lübking 2013-02-06 21:02:37 UTC
random guess:
KWIN_DIRECT_GL="" LIBGL_ALWAYS_INDIRECT=1 kwin --replace &
Comment 7 omeringen 2013-02-06 21:21:28 UTC
FYI, i downgraded to KDE-stable 4.9.5-1 again. Everything works fine.
Do you need any other information ?

@Thomas Lübking,
Like i said at first post, i'm using ATI HD 2400 with latest catalyst-legacy driver 13.1-1
Comment 8 Thomas Lübking 2013-02-06 21:33:36 UTC
We activated direct rendering for latter fglrx (whether that also impacts their legacy series, i frankly don't know - neither whether this call actually occurs after creating the context)

Please attach the output of "qdbus org.kde.kwin /KWin supportInformation" on the working 4.9.5
Comment 9 omeringen 2013-02-06 21:37:50 UTC
Here it is : http://pastie.org/6082489
Comment 10 Thomas Lübking 2013-02-06 21:52:52 UTC
Ok, that is on indirect rendering.
I'd try comment #6 in that regard.

(reg. the GPU comment you were pointing the "wrong driver for wrong gpu" estimation? -> i've no idea where you need the legacy flgrx version ;-)
Comment 11 Martin Flöser 2013-02-06 21:56:32 UTC
We changed quite some code around the Scene creation. Maybe some code path gets exposed which hadn't been taken in 4.9. For that we need to get a proper backtrace - the one in comment #3 is lacking the debug symbol information for KWin.
Comment 12 omeringen 2013-02-07 08:30:41 UTC
Then, there is nothing i can do until https://bugs.archlinux.org/task/10975 resolved. Thanks for your interests.
Comment 13 Martin Flöser 2013-02-07 08:38:40 UTC
> Then, there is nothing i can do until https://bugs.archlinux.org/task/10975
> resolved. Thanks for your interests.
No big deal, just upload once it's ready. If we are "lucky" another user will 
hit it and upload a better stacktrace
Comment 14 Thomas Lübking 2013-02-07 15:33:16 UTC
There's our backtrace.

*** This bug has been marked as a duplicate of bug 314602 ***
Comment 15 omeringen 2013-02-07 15:37:12 UTC
Oh nice ! Thanks for your interest again.
Comment 16 Martin Flöser 2013-02-07 15:54:37 UTC
(In reply to comment #14)
> There's our backtrace.
And here's our driver bug:
GLXFBConfig *fbconfigs = glXGetFBConfigs(display(), DefaultScreen(display()), &cnt);
Comment 17 Martin Flöser 2013-02-07 16:02:41 UTC
and the reason for the regression:


commit 950b8a63f7ba23c486b02c5a2c720b68275e4a97
Author: Martin Gräßlin <mgraesslin@kde.org>
Date:   Wed Oct 3 10:28:43 2012 +0200

    Do not resolve glx functions specified in GLX 1.3
    
    According to the OpenGL ABI for Linux GLX 1.3 is a minimum requirement.
    Therefore we do not need to resolve the symbols which are present in that
    version.
    
    KWin did always require at least 1.3, for all the resolved functions
    there were checks in the Scene, but they might have been incorrect.
    Instead now the GLX version is checked and OpenGL compositing is blocked
    if there is not at least GLX 1.3.
    
    REVIEW: 106704

diff --git a/kwin/glxbackend.cpp b/kwin/glxbackend.cpp
index a9228f7..8b2360a 100644
--- a/kwin/glxbackend.cpp
+++ b/kwin/glxbackend.cpp
@@ -68,12 +68,10 @@ GlxBackend::~GlxBackend()
 void GlxBackend::init()
 {
     initGLX();
-    // check for FBConfig support
-    if (!hasGLExtension("GLX_SGIX_fbconfig") || !glXGetFBConfigAttrib || !glXGetFBConfigs ||
-            !glXGetVisualFromFBConfig || !glXCreatePixmap || !glXDestroyPixmap ||
-            !glXCreateWindow || !glXDestroyWindow) {
-        setFailed("GLX_SGIX_fbconfig or required GLX functions missing");
-        return; // error
+    // require at least GLX 1.3
+    if (!hasGLXVersion(1, 3)) {
+        setFailed("Requires at least GLX 1.3");
+        return;
     }
     if (!initDrawableConfigs()) {
         setFailed("Could not initialize the drawable configs");


so looks like the driver "supports" GLX 1.3 without providing the required function calls.
Comment 18 Thomas Lübking 2013-02-11 20:00:48 UTC
There goes our duplicate :-(

What can be said so far is that there's no confirmation of the issue nor it's absence on a HD 2400

We'll need a better backtrace. (but i can't select that atm)
Comment 19 omeringen 2013-02-12 17:53:09 UTC
Using catalyst-hook package instead of catalyst solved the issue. Note that i've never used it before because catalyst was working fine until now.

The mysterious thing is, when KDE 4.10 released, with same kernel and catalyst package i have had crashes on 4.10, but no crash when i downgrade to 4.9.5

Thanks for your interests.
Comment 20 Gopalakrishna Bhat 2013-04-15 14:52:22 UTC
Created attachment 78932 [details]
New crash information added by DrKonqi

kwin (4.10.2) on KDE Platform 4.10.2 using Qt 4.8.4

- What I was doing when the application crashed:
I changed the compositing type from XRender to OpenGL when this crash occured
- Unusual behavior I noticed:

- Custom settings of the application:

-- Backtrace (Reduced):
#5  0x00007f8a9fdd874e in glXGetFBConfigs () from /usr/lib/libGL.so.1
[...]
#12 0x00007f8a9f1ed487 in QFutureWatcherBase::event(QEvent*) () from /usr/lib/libQtCore.so.4
#13 0x00007f8a9e48c18c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#14 0x00007f8a9e49060a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#15 0x00007f8aa39e196a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
Comment 21 Mattia 2013-09-14 16:45:07 UTC
I have the same problem on Fedora 19 with non-legacy catalyst drivers running on a HD5750 card.
Whenever I click on "re-enable desktop effects" X server crashes and restarts.
Comment 22 Thomas Lübking 2013-09-14 19:23:54 UTC
(In reply to comment #21)
> Whenever I click on "re-enable desktop effects" X server crashes and
> restarts.

Crashing X server is
a) not (directly) this bug
b) a server/driver bug by definition

regardless, it is as many fglrx related bugs we receive lately most likely due to a cross installation of fglrx and MESA, ie. you're loading the driver of the one, but it resolves to libGL from the other.

/var/log/Xorg.0.log will tell you and running "aticonfig --initial" *might* fix that problem.
Comment 23 Mattia 2013-09-15 08:07:41 UTC
(In reply to comment #22)

> /var/log/Xorg.0.log will tell you and running "aticonfig --initial" *might*
> fix that problem.

Thanks, this has solved the problem.
Comment 24 Martin Flöser 2013-09-24 11:38:30 UTC
*** Bug 325237 has been marked as a duplicate of this bug. ***