Bug 65438

Summary: GTK apps crash X11 since last update of LLVMM
Product: Mesa Reporter: Rafael Castillo <jrch2k10>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: highest    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: crash report
xfce with RADEON_DUMP_SHADERS=1
Possible Fix / Work Around

Description Rafael Castillo 2013-06-06 01:51:29 UTC
Created attachment 80375 [details]
crash report

firefox / google-chrome or any other GTK2 app crash X11 inmediately since last checkout of llvm svn


01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde XT [Radeon HD 7770 GHz Edition]

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD CAPE VERDE
OpenGL version string: 2.1 Mesa 9.2.0 (git-ce67fb4)
OpenGL shading language version string: 1.30

attached log of the crash

i got this other bug https://bugzilla.kernel.org/show_bug.cgi?id=58621 not sure if related
Comment 1 Michel Dänzer 2013-06-06 10:03:42 UTC
I can't reproduce this. Make sure your LLVM and Mesa snapshots are both up to date and built consistently.

If that doesn't help, can you isolate which LLVM change introduced the problem for you? The Git mirror at http://llvm.org/git/llvm.git might be useful for that.
Comment 2 Rafael Castillo 2013-06-06 15:13:40 UTC
well im sure everything is latest bit, i even did an emerge -C to the entire graphical stack [xserver mesa llvm clang libclc cairo libx11 xcb glamor gtk+] en re emerge with defaults cflags and the same things Qt4 works perfectly but gtk apps crash X[i guess is cairo related]. so im sure is not software related and since my 7770 can't reclock either i guess i got the short straw with this brand.

so can you provide me some help to do what you ask in gentoo? or howto debug the gpu properly? since gdb/valgrind/etc dont do anything against llvm[i guess is cuz is getting loaded by mesa and the output goes to the gpu]

im using FireBurn overlay
Comment 3 Michel Dänzer 2013-06-07 10:21:28 UTC
(In reply to comment #2)
> so can you provide me some help to do what you ask in gentoo?

I'm not familiar with Gentoo, but I'm sure there are many tutorials on Git bisect on the 'net, there might even be one specific to Gentoo.


> or howto debug the gpu properly? since gdb/valgrind/etc dont do anything
> against llvm[i guess is cuz is getting loaded by mesa and the output goes to
> the gpu]

It should work just like for any other X server crash, see http://wiki.x.org/wiki/Development/Documentation/ServerDebugging .
Comment 4 hadack 2013-06-08 13:01:45 UTC
I have the same problem on a 7750 CAPE VERDE card.

When starting a xfce session X craches with the error message from above, starting kde works fine.

bisecting shows this bad commit:

8a72c73032707c7b3c042b716286a1ac33720991 is the first bad commit
commit 8a72c73032707c7b3c042b716286a1ac33720991
Author: Tom Stellard <thomas.stellard@amd.com>
Date:   Mon Jun 3 17:39:46 2013 +0000

    R600/SI: Fixup CopyToReg register class in PostprocessISelDAG()
    
    The CopyToReg nodes will sometimes try to copy a value from a VGPR to an
    SGPR.  This kind of copy is not possible, so we need to detect
    VGPR->SGPR copies and do something else.  The current strategy is to
    replace these copies with VGPR->VGPR copies and hope that all the users
    of CopyToReg can accept VGPRs as arguments.
    
    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183132 91177308-0d34-0410-b5e6-96231b3b80d8
Comment 5 Rafael Castillo 2013-06-08 23:49:49 UTC
i confirm that commit 8a72c73032707c7b3c042b716286a1ac33720991
seems the culprit

btw hadack and michael many thanks for you help
Comment 6 Rafael Castillo 2013-06-08 23:52:46 UTC
btw hadack your 7750 can reclock? i mean profile mid/high or dynpm, in case it crashes the kernel like mine i made this bug report  https://bugzilla.kernel.org/show_bug.cgi?id=58621
Comment 7 Tom Stellard 2013-06-09 00:12:34 UTC
Can you set the environment variable RADEON_DUMP_SHADERS=1 and re-post the output you get when starting xfce?
Comment 8 hadack 2013-06-09 14:53:00 UTC
Created attachment 80567 [details]
xfce with RADEON_DUMP_SHADERS=1

heres the output with RADEON_DUMP_SHADERS

Rafael: I can reclock the card, but i have to go first to low and than i can set high, else it locks up. After boot it is in a strange state with clocks/voltage combination that no profile sets.
Comment 9 Tom Stellard 2013-06-10 16:42:54 UTC
Created attachment 80630 [details] [review]
Possible Fix / Work Around

Can you try this patch?  It should fix the segfault, but it looks to me like the real bug might be in the CFG Structurizer.  There are a number of PHI nodes that take undef as an argument, and I'm not sure if that is correct.
Comment 10 hadack 2013-06-10 20:19:59 UTC
Yes, with your patch xfce starts fine.
Do you need more info to find the real issue?
Comment 11 Tom Stellard 2013-06-10 22:13:23 UTC
(In reply to comment #10)
> Yes, with your patch xfce starts fine.
> Do you need more info to find the real issue?

No, I think we have enough.
Comment 12 Michel Dänzer 2013-06-14 08:28:24 UTC
Tom committed his fix as revision 183937.
Comment 13 Rafael Castillo 2013-06-14 18:55:51 UTC
many thanks for the help very appreciated

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.