FS#20423 - libgl segfault on KDE 4.4.95 window decoration change

Attached to Project: Arch Linux
Opened by João Rodrigues (gothicknight) - Tuesday, 10 August 2010, 00:27 GMT
Last edited by Andreas Radke (AndyRTR) - Wednesday, 24 November 2010, 17:02 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Andrea Scarpino (BaSh)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I was about to send a report to KDE upstream for constant crashes to Kwin when changing the window decoration buttons/theme/...

After linking GDB to kwin I've seen that in fact the segfault was in libGL.so.1, and from time to time I have my screen blank and no computer response (keyboard/mouse input).


This may happen because miss use by KDE's window manager or in MESA itself.

Additional info:
* package version(s)
extra/libgl 7.8.2-1
extra/kdebase-workspace 4.4.5-1
extra/xf86-video-ati 6.13.1-1 (if it matters)

* config and/or log files etc.
N/A

Steps to reproduce:
Just change anything in the window decoration under KDE 4.4.95 (I haven't tried with any other WM).
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Wednesday, 24 November 2010, 17:02 GMT
Reason for closing:  None
Comment by Jan de Groot (JGC) - Wednesday, 11 August 2010, 06:42 GMT
Please provide traces and information about what drivers you're using.
Comment by João Rodrigues (gothicknight) - Wednesday, 11 August 2010, 17:26 GMT

Update: Also happens in KDE SC 4.5.



Backtrace information from KDE's bug report utility:

---------------------------------------------------
Application: KWin (kwin), signal: Segmentation fault
[KCrash Handler]
#6 0x00007f086b7b7470 in ?? () from /usr/lib/libGL.so.1
#7 0x00007f086b79272d in ?? () from /usr/lib/libGL.so.1
#8 0x00007f086dd525e1 in KWin::SceneOpenGL::waitSync() () from /usr/lib/libkdeinit4_kwin.so
#9 0x00007f086dd56b20 in KWin::SceneOpenGL::flushBuffer(int, QRegion) () from /usr/lib/libkdeinit4_kwin.so
#10 0x00007f086dd5733a in KWin::SceneOpenGL::paint(QRegion, QList<KWin::Toplevel*>) () from /usr/lib/libkdeinit4_kwin.so
#11 0x00007f086dd4348c in KWin::Workspace::performCompositing() () from /usr/lib/libkdeinit4_kwin.so
#12 0x00007f086dcccafd in KWin::Workspace::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkdeinit4_kwin.so
#13 0x00007f086a31dd9f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#14 0x00007f086a31b35e in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#15 0x00007f08694e5854 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#16 0x00007f08694e993a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#17 0x00007f086d52f146 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#18 0x00007f086a309d3c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#19 0x00007f086a3351d2 in ?? () from /usr/lib/libQtCore.so.4
#20 0x00007f086a335310 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#21 0x00007f0869585ea2 in ?? () from /usr/lib/libQtGui.so.4
#22 0x00007f086a309122 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#23 0x00007f086a30935c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#24 0x00007f086a30d76b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#25 0x00007f086dce7138 in kdemain () from /usr/lib/libkdeinit4_kwin.so
#26 0x00007f086d95ac4d in __libc_start_main () from /lib/libc.so.6
#27 0x00000000004005c9 in _start ()
---------------------------------------------------

I don't see a frame zero in the GDB output but it's the same. I can only use GDB in non-X console, and I don't quite know how to copy/output that into something.


As I told in the bug report:
> extra/xf86-video-ati 6.13.1-1
> extra/libgl 7.8.2-1
> extra/mesa 7.8.2-1

Comment by Laurent Carlier (lordheavy) - Wednesday, 11 August 2010, 18:57 GMT
A bug report was filled upstream:
https://bugs.freedesktop.org/show_bug.cgi?id=29513
Comment by Laurent Carlier (lordheavy) - Wednesday, 11 August 2010, 21:13 GMT
Can you try to rebuilt mesa-7.8.2-1 with debugging symbols ? 'options=('!strip')'

This should produce a more complete libgl backtrace.
Comment by João Rodrigues (gothicknight) - Thursday, 12 August 2010, 07:28 GMT
Hi Laurent,

Yep, no problem. I'll try to give you the detailed GDB backtrace, by the end of day.
Comment by João Rodrigues (gothicknight) - Thursday, 12 August 2010, 17:27 GMT
OK, So I've recompiled mesa and installed the new packages. Now it only gives a segfault every 2 times, or at least not at the first.

I'm now also having doubts regarding the kernel driver or (god forsake HW failure), as I leave this laptop at home as my server, when I got home I does not respond to anything.


In annex is the backtrace generated by KDE's bug report tool. Hope it helps

Comment by João Rodrigues (gothicknight) - Thursday, 12 August 2010, 17:29 GMT
I forgot, I've modified the compile flags to:

CFLAGS="-g -march=x86-64 -mtune=generic -O0 -pipe"
CXXFLAGS="-g -march=x86-64 -mtune=generic -O0 -pipe"

As my wife is currently waiting for me to helper her clean the house, I've reduced the optimization level to speed things up a bit :)
Comment by Laurent Carlier (lordheavy) - Thursday, 12 August 2010, 19:44 GMT
Can you test if the attached package fix the problem ?
Comment by João Rodrigues (gothicknight) - Thursday, 12 August 2010, 20:33 GMT
The problem still persists.

In annex is the new backtrace.
Comment by Laurent Carlier (lordheavy) - Thursday, 12 August 2010, 20:47 GMT
Can you try with that patch ?
(replace the file in the 'patches' directory with this one)
Comment by Laurent Carlier (lordheavy) - Thursday, 12 August 2010, 21:16 GMT
Digging a bit in kwin/scene_opengl.cpp source code, you should avoid the segfault if you disable the vsync option ('Use Vsync' option)
Comment by João Rodrigues (gothicknight) - Thursday, 12 August 2010, 21:16 GMT
Again, same problem :(

Edit: This will be my last try tonight, I've got to get up early tomorrow.
Comment by João Rodrigues (gothicknight) - Thursday, 12 August 2010, 21:21 GMT
Sorry, I've just now have seen your 21:16GMT post, I haven't tried.

If I have the time, I'll bring this laptop with me to the weekend and dig into the code, it's just been a very busy week :(

Do you have any more pointers/hints where should I search?
Comment by Laurent Carlier (lordheavy) - Thursday, 12 August 2010, 21:34 GMT
You can always test with the mesa git tree, a repo is available with some instructions here:
https://bbs.archlinux.org/viewtopic.php?id=79509&p=1

So i could report the results upstream
Comment by João Rodrigues (gothicknight) - Sunday, 22 August 2010, 21:20 GMT
Hi, I've tried with mesa-git AUR packages the other day, and still the problem maintains.
Comment by Andreas Radke (AndyRTR) - Saturday, 30 October 2010, 12:24 GMT
How's state with new Xorg, new Mesa and new AMD/Ati driver in testing?
Comment by João Rodrigues (gothicknight) - Wednesday, 24 November 2010, 16:59 GMT
Sorry, I no longer have this laptop, so I'm unable to test this issue any longer.

Loading...