Bug 70088 - Glamor on r600g crashes Xserver
Glamor on r600g crashes Xserver
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600
git
x86-64 (AMD64) Linux (All)
: medium normal
Assigned To: Default DRI bug account
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-03 17:26 UTC by Krzysztof A. Sobiecki
Modified: 2013-10-17 04:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Crash log (72.51 KB, text/plain)
2013-10-03 17:26 UTC, Krzysztof A. Sobiecki
Details
Xorg log with shader dump and sb dump (83.60 KB, text/plain)
2013-10-03 21:47 UTC, Grigori Goronzy
Details
Xorg backtrace (11.76 KB, text/plain)
2013-10-03 21:48 UTC, Grigori Goronzy
Details
It fixes my crash problem (653 bytes, patch)
2013-10-04 03:44 UTC, Krzysztof A. Sobiecki
Details | Splinter Review
patch (5.44 KB, patch)
2013-10-05 00:58 UTC, Vadim Girlin
Details | Splinter Review
patch (4.93 KB, patch)
2013-10-14 13:25 UTC, Vadim Girlin
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof A. Sobiecki 2013-10-03 17:26:56 UTC
Created attachment 87079 [details]
Crash log

When I try to run Xserver and radeon driver with glamor accel method I get a crash from Xserver. It happens when I'm starting blackbox or Gnome(from GDM3). While GNOME causes crash, gdm3 works.
Comment 1 Grigori Goronzy 2013-10-03 17:57:31 UTC
That looks exactly like the crash I see on PALM ASICs, too. I just didn't have time to properly report it yet. Something is going wrong in SB's gcm phase.

This only seems to happen on certain ASICs, it works fine on TURKS.
Comment 2 Vadim Girlin 2013-10-03 18:39:42 UTC
Please attach the output with R600_DEBUG=ps,vs
Comment 3 Marek Olšák 2013-10-03 21:07:23 UTC
You should be able to obtain a better backtrace if you do this:

1) Delete /etc/X11/core.
2) Reproduce the crash. This should create a new core file in /etc/X11.
3) Run: gdb /usr/bin/Xorg /etc/X11/core
4) Type bt in gdb.

The paths may differ depending on your distribution. Please attach the backtrace you will get from gdb.
Comment 4 Grigori Goronzy 2013-10-03 21:47:54 UTC
Created attachment 87094 [details]
Xorg log with shader dump and sb dump
Comment 5 Grigori Goronzy 2013-10-03 21:48:29 UTC
Created attachment 87095 [details]
Xorg backtrace
Comment 6 Krzysztof A. Sobiecki 2013-10-04 03:44:12 UTC
Created attachment 87098 [details] [review]
It fixes my crash problem

It fixes my crash problem. Maybe code needs more checks for null values?
As always my patch is subpar, You shouldn't use it.
Comment 7 Vadim Girlin 2013-10-05 00:58:26 UTC
Created attachment 87148 [details] [review]
patch

This patch should fix this issue.


(In reply to comment #6)
> It fixes my crash problem. Maybe code needs more checks for null values?
> As always my patch is subpar, You shouldn't use it.

Checking for null is not enough in this case, it may prevent segfault but generated shader code would be incorrect anyway, when we have null there it means that something is already broken.
Comment 8 Krzysztof A. Sobiecki 2013-10-05 03:09:03 UTC
(In reply to comment #7)
> Created attachment 87148 [details] [review] [review]
> patch
> 
> This patch should fix this issue.
> 
> 
> (In reply to comment #6)
> > It fixes my crash problem. Maybe code needs more checks for null values?
> > As always my patch is subpar, You shouldn't use it.
> 
> Checking for null is not enough in this case, it may prevent segfault but
> generated shader code would be incorrect anyway, when we have null there it
> means that something is already broken.

Yes it fixed the problem. Thank You.
When it will be pushed into git I will close this bug.
Comment 9 Grigori Goronzy 2013-10-06 13:12:04 UTC
I can also confirm that the patch fixes the issue.
Comment 10 Krzysztof A. Sobiecki 2013-10-13 03:34:22 UTC
When Your patch will go into a git?
Comment 11 Vadim Girlin 2013-10-14 13:25:18 UTC
Created attachment 87597 [details] [review]
patch

This is an improved version of the patch, please test.
Comment 12 Krzysztof A. Sobiecki 2013-10-14 16:49:46 UTC
(In reply to comment #11)
> Created attachment 87597 [details] [review] [review]
> patch
> 
> This is an improved version of the patch, please test.

Glamor acceleration with mesa + this patch works fine, will try to run piglit.
Comment 13 Vadim Girlin 2013-10-17 04:03:57 UTC
Fix pushed with commit 62c8149472903a2f3fc4d319c3799b9e729419d5