Bug 43802 - [SNB] Xorg dies when starting gtk applications using latest xf86-video-intel git on SNB hardware with SNA enabled
Summary: [SNB] Xorg dies when starting gtk applications using latest xf86-video-intel ...
Status: CLOSED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-13 12:26 UTC by nkalkhof
Modified: 2012-01-03 22:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
xorg.log (38.16 KB, text/plain)
2011-12-13 12:26 UTC, nkalkhof
no flags Details
dmesg (38.25 KB, application/octet-stream)
2011-12-13 12:27 UTC, nkalkhof
no flags Details

Description nkalkhof 2011-12-13 12:26:54 UTC
Created attachment 54400 [details]
xorg.log

Hello,

when using latest xf86-video-intel git, X dies as soon as I fire up gtk applications like eclipse, firefox or claws mail.

dmesg and Xorg.log attached. 

GDB yields:
Program received signal SIGSEGV, Segmentation fault.
0x00007fcfc975d15f in sna_poly_fill_rect_stippled_blt ()
   from /usr/lib64/xorg/modules/drivers/intel_drv.so
(gdb) t
[Current thread is 1 (Thread 0x7fcfcd335880 (LWP 3158))]
(gdb) backtrace ful,l  l
#0  0x00007fcfc975d15f in sna_poly_fill_rect_stippled_blt ()
   from /usr/lib64/xorg/modules/drivers/intel_drv.so
No symbol table info available.
#1  0x00007fcfc9765167 in sna_poly_fill_rect () from /usr/lib64/xorg/modules/drivers/intel_drv.so
No symbol table info available.
#2  0x00000000004f99a9 in damagePolyFillRect ()
No symbol table info available.
#3  0x000000000043201e in ProcPolyFillRectangle ()
No symbol table info available.
#4  0x00000000004357e1 in Dispatch ()
No symbol table info available.
#5  0x000000000042485a in main ()
No symbol table info available.

Could someone please confirm this?

Thanks and Regards
Nic
Comment 1 nkalkhof 2011-12-13 12:27:14 UTC
Created attachment 54401 [details]
dmesg
Comment 2 Chris Wilson 2011-12-13 12:45:15 UTC
It would be useful if you could grab that stack again after rebuilding the ddx with debugging symbols.
Comment 3 nkalkhof 2011-12-13 12:55:15 UTC
(In reply to comment #2)
> It would be useful if you could grab that stack again after rebuilding the ddx
> with debugging symbols.

you mean with the --enable-debug configure switch?
Comment 4 Chris Wilson 2011-12-13 13:40:40 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > It would be useful if you could grab that stack again after rebuilding the ddx
> > with debugging symbols.
> 
> you mean with the --enable-debug configure switch?

Not necessarily, but if it dies extremely quickly then it would also help. No, it appears that the installed intel_drv.so is stripped of its debug symbols and so gdb can't resolve the line number or local variables, which are extremely useful in working out what the problem is.
Comment 5 nkalkhof 2011-12-13 23:25:33 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > It would be useful if you could grab that stack again after rebuilding the ddx
> > > with debugging symbols.
> > 
> > you mean with the --enable-debug configure switch?
> 
> Not necessarily, but if it dies extremely quickly then it would also help. No,
> it appears that the installed intel_drv.so is stripped of its debug symbols and
> so gdb can't resolve the line number or local variables, which are extremely
> useful in working out what the problem is.

Hi Chris,

you're right. using --enable-debug didn't expose any debug symbols. however you should be able to reproduce the issue very quick when you fire up eclipse for example. X dies as soon as the workbench comes up. ot try to start firefox or claws-mail. any app kills my X instantly after fired up.

Regards
Nic
Comment 6 Chris Wilson 2011-12-14 00:22:05 UTC
Now you would think that if nearly any app killed X, I'd have a problem typing this into firefox...

Can you try installing the intel_drv.so by hand to avoid any stripping? Just
./configure --enable-sna && make && sudo make src/.libs/intel_drv.so /usr/lib/xorg/modules/drivers/intel_drv.so should do the trick. (Give or take /usr/lib64.)
Comment 7 nkalkhof 2011-12-14 04:58:42 UTC
(In reply to comment #6)
> Now you would think that if nearly any app killed X, I'd have a problem typing
> this into firefox...
> 
> Can you try installing the intel_drv.so by hand to avoid any stripping? Just
> ./configure --enable-sna && make && sudo make src/.libs/intel_drv.so
> /usr/lib/xorg/modules/drivers/intel_drv.so should do the trick. (Give or take
> /usr/lib64.)


Hi Chris,

ok I've compiled xf86-video-intel latest git from scratch using --enable-sna --enable-dri --enable-xvmc and replaced intel_drv.so.

Here is what GDB spits out shortly after firing up firefox and doing a little webbrowsing. Hope this helps.

 Segmentation fault.
0x00007f18a193b869 in sna_poly_fill_rect_stippled_1_blt (clipped=0, extents=0x7fff0d7a5490, r=0x18eb5a8, 
    n=1, gc=0x18edb30, damage=0x0, drawable=0x18d9390, bo=<optimized out>) at sna_accel.c:6567
6567		br13 = priv->gpu_bo->pitch;
(gdb) backtrace full
#0  0x00007f18a193b869 in sna_poly_fill_rect_stippled_1_blt (clipped=0, extents=0x7fff0d7a5490, 
    r=0x18eb5a8, n=1, gc=0x18edb30, damage=0x0, drawable=0x18d9390, bo=<optimized out>)
    at sna_accel.c:6567
        stipple = 0x181e860
        origin = <optimized out>
        dx = <optimized out>
        br00 = 3145728
        br13 = <optimized out>
        sna = 0x1335720
        priv = 0x18b77f0
        dy = <optimized out>
#1  sna_poly_fill_rect_stippled_blt (drawable=0x18d9390, bo=0x18d8fd0, damage=0x0, gc=0x18edb30, n=1, 
    rect=0x18eb5a8, extents=0x7fff0d7a5490, clipped=0) at sna_accel.c:7026
        stipple = <optimized out>
#2  0x00007f18a1943795 in sna_poly_fill_rect (draw=0x18d9390, gc=0x18edb30, n=1, rect=0x18eb5a8)
    at sna_accel.c:7154
        priv = 0x18b77f0
        damage = <optimized out>
        pixmap = 0x0
        region = {extents = {x1 = 5, y1 = 4, x2 = 11, y2 = 13}, data = 0x18edb30}
        flags = 0
#3  0x00000000004f99a9 in damagePolyFillRect ()
No symbol table info available.
#4  0x000000000043201e in ProcPolyFillRectangle ()
No symbol table info available.
#5  0x00000000004357e1 in Dispatch ()
No symbol table info available.
#6  0x000000000042485a in main ()
No symbol table info available.
Comment 8 Chris Wilson 2011-12-14 06:16:07 UTC
Gotcha! Fallen afoul of the recent availability of the CPU bo, instead of using priv->gpu_bo, we need to use the bo passed into the function. Thanks.
Comment 9 nkalkhof 2011-12-14 06:22:45 UTC
(In reply to comment #8)
> Gotcha! Fallen afoul of the recent availability of the CPU bo, instead of using
> priv->gpu_bo, we need to use the bo passed into the function. Thanks.

Great! :) Will test the fix as soon as it hits git and close the ticket if successful.

Thx
Nic
Comment 10 Chris Wilson 2011-12-14 06:35:41 UTC
commit 43a22743124a83310379122d509c35840b583b2e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Dec 14 13:26:05 2011 +0000

    sna: Use the provided bo for blitting rather than assume priv->gpu_bo
    
    Reported-by: nkalkhof@web.de
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43802
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 11 nkalkhof 2011-12-14 06:41:45 UTC
Patch is good! Closing Bug. Thanks!


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.