Bug 271166 - Crash with Gallium 0.4 on softpipe
Summary: Crash with Gallium 0.4 on softpipe
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-17 17:26 UTC by Unknown
Modified: 2011-05-06 18:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.7.0


Attachments
the crash-handler (1.73 KB, text/plain)
2011-04-17 17:26 UTC, Unknown
Details
the output of glxinfo (23.46 KB, text/plain)
2011-04-18 17:08 UTC, Unknown
Details
the output from kwin --replace at the console (1.33 KB, text/plain)
2011-05-03 18:06 UTC, Unknown
Details
Detects softpipe driver (751 bytes, patch)
2011-05-03 20:01 UTC, Martin Flöser
Details
the output on May-04 (1.02 KB, text/plain)
2011-05-04 18:11 UTC, Unknown
Details
Detect softpipe driver (2.54 KB, patch)
2011-05-06 07:04 UTC, Martin Flöser
Details
output from kwin --replace # May-06 (1.80 KB, text/plain)
2011-05-06 17:58 UTC, Unknown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2011-04-17 17:26:20 UTC
Created attachment 59069 [details]
the crash-handler

Version:           unspecified (using Devel) 
OS:                Linux

with a new linux-account, at start (login) kwin crashes everytime.
crash handler is attached

Reproducible: Always

Steps to Reproduce:
new linux-account
login
Comment 1 Thomas Lübking 2011-04-17 17:56:28 UTC
crashes in glCreateProgram() - please attach a dump of glxinfo
Comment 2 Unknown 2011-04-18 17:08:30 UTC
Created attachment 59101 [details]
the output of glxinfo

This bug occurs only the *first* time the user is logging on.
Comment 3 Thomas Lübking 2011-04-18 22:02:36 UTC
from the glxinfo:
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on softpipe

so this happens in vmware, ritght? (i actually thought it was blacklisted for compositing but perhaps cheated in by the gallium string ;-)

I guess kwin crashes and at some point restarts with disabled compositing - is that correct?
Comment 4 Unknown 2011-04-19 19:42:05 UTC
No!
I am using Archlinux 64 bits.
I got kdelibs and more from git, compiled myself.
Comment 5 Thomas Lübking 2011-04-20 17:36:59 UTC
What kind of system (notably GPU & Driver) do you have and why does it claim vmware as vendor if it's *not* vmware??
Comment 6 Unknown 2011-04-27 19:21:29 UTC
sorry for delay, I was a few days out of home.
I get an update from Archlinux today to 7.10.2-2 for sis-dri and libgl.
The problem is still present.
The /var/log/Xorg.0.log says:
X.Org X Server 1.9.4
...
Current Operating System: Linux falun 2.6.37-ARCH #1 SMP PREEMPT Fri Feb 18 18:32:16 CET 2011 x86_64
Loading /usr/lib/xorg/modules/drivers/sis_drv.so
  compiled for 1.9.0, module version = 0.10.3
...
AIGLX: Loaded and initialized /usr/lib/xorg/modules/dri/swrast_dri.so
GLX: Initialized DRISWRAST GL provider for screen 0

pacman -Q -o  /usr/lib/xorg/modules/dri/swrastg_dri.so
/usr/lib/xorg/modules/dri/swrastg_dri.so is owned by libgl 7.10.2-2
pacman -Q -o /usr/lib/xorg/modules/dri/sis_dri.so
/usr/lib/xorg/modules/dri/sis_dri.so is owned by sis-dri 7.10.2-2

The packages are (with ls -l): 
860620 Apr 11 00:13 /var/cache/pacman/pkg/sis-dri-7.10.2-2-x86_64.pkg.tar.xz
974844 Apr 11 00:12 /var/cache/pacman/pkg/libgl-7.10.2-2-x86_64.pkg.tar.xz
Comment 7 Martin Flöser 2011-04-28 22:12:23 UTC
you are using SIS hardware? It is unlikely that this supports OpenGL compositing.

Seems like we need to adjust our tests to recognize softpipe.

@Thomas: VMWare is developing Gallium3D
Comment 8 Unknown 2011-04-29 17:53:53 UTC
Yes, here some informations from /var/log/messages at boot-time, all the lines with "sis":
pata_sis 0000:00:02.5: PCI INT A -> GSI 16 (level, low) -> IRQ 16
scsi0 : pata_sis
scsi1 : pata_sis
sata_sis 0000:00:05.0: version 1.0
sata_sis 0000:00:05.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
sata_sis 0000:00:05.0: Detected SiS 180/181/964 chipset in SATA mode
scsi2 : sata_sis
scsi3 : sata_sis
agpgart-sis 0000:00:00.0: SiS chipset [1039/0661]
agpgart-sis 0000:00:00.0: AGP aperture is 64M @ 0xf8000000

do you need anything more?
Comment 9 Martin Flöser 2011-04-30 10:20:35 UTC
Git commit 6aa2b5caf625a142e92bf4e7c99452bfad968a8c by Martin Gräßlin.
Committed on 30/04/2011 at 10:29.
Pushed by graesslin into branch 'master'.

No OpenGL/GLX compositing on Gallium softpipe

BUG: 271166
FIXED-IN: 4.7.0

M  +3    -2    kwin/scene_opengl_glx.cpp     

http://commits.kde.org/kde-workspace/6aa2b5caf625a142e92bf4e7c99452bfad968a8c
Comment 10 Unknown 2011-05-02 17:53:22 UTC
Sorry, but I get the crash again, even after I got the new sources over git.
Comment 11 Martin Flöser 2011-05-02 18:00:18 UTC
so probably the driver check for softpipe is not working.

Can you please start kwin from konsole and post the debug output with the driver information?
Comment 12 Unknown 2011-05-03 18:06:49 UTC
Created attachment 59581 [details]
the output from kwin --replace at the console

let me remember you that the crash occurs **only** the **first** time the **new** user is logging in. I never seen the crash after. The attached output is from the command kwin --replace at the console, the second time (or later) the user has logged in.
Comment 13 Martin Flöser 2011-05-03 18:38:01 UTC
Thanks that should help a lot: the driver is not detected. I will try to get a patch and this time I will 
ask you to test it before I commit :-)
> let me remember you that the crash occurs **only** the **first** time the
> **new** user is logging in. I never seen the crash after. The attached output
> is from the command kwin --replace at the console, the second time (or later)
> the user has logged in.
Yes that is expected as KWin recognizes the crash and disables compositing for the future.
Comment 14 Martin Flöser 2011-05-03 20:01:20 UTC
Created attachment 59584 [details]
Detects softpipe driver

Please try this patch. It should detect the softpipe driver correctly, now.
Comment 15 Unknown 2011-05-04 18:11:07 UTC
Created attachment 59619 [details]
the output on May-04

mmmh!
- set a new user
- login 1.st time
The crash occurs at new
kwin --replace gives some more informations (siehe attachment but ...
- login 2.nd time
I get two crashes and not any kwin is running, so I don't get any K-Start-Icon
I need to kill from a tty-console.
- login 3.rd time
no crash but kwin --replace gives not any output.
Comment 16 Martin Flöser 2011-05-04 18:38:24 UTC
ok the driver is now detected, but still crash - not good. Is it still the same crash or has the backtrace changed?

Oh and I am going to add a new patch, disabling GLSL for softpipe.
Comment 17 Unknown 2011-05-05 15:09:51 UTC
the backtrace looks like the old one. Only addresses have changed a little bit.
I would be glad to help you/us/me more at this problem.
Comment 18 Martin Flöser 2011-05-06 07:04:20 UTC
Created attachment 59681 [details]
Detect softpipe driver

Improved detection: new method isSoftwareEmulation() plus disabling GLSL for software emulated drivers.

This patch should no longer trigger the crash, though it is possible that a different crash could be triggered.
Comment 19 Unknown 2011-05-06 17:58:16 UTC
Created attachment 59707 [details]
output from kwin --replace # May-06

looks very fine, thanks
Comment 20 Martin Flöser 2011-05-06 18:04:33 UTC
Git commit 14782f22239c0dfe02fb96e4a8ddedad44ee8cce by Martin Gräßlin.
Committed on 06/05/2011 at 18:13.
Pushed by graesslin into branch 'master'.

Improved detection of OpenGL software emulation

Adding a new method to retrieve whether the OpenGL implementation
uses any kind of software emulation and no software emulation can
provide GLSL support, even if it claims so.

Thanks to Maurel for testing again and again proposed patches.

BUG: 271166

M  +18   -3    kwin/libkwineffects/kwinglplatform.cpp     
M  +6    -0    kwin/libkwineffects/kwinglplatform.h     
M  +1    -1    kwin/scene_opengl_glx.cpp     

http://commits.kde.org/kde-workspace/14782f22239c0dfe02fb96e4a8ddedad44ee8cce