Bug 46156 - [snb][sna] x11 dies during startup with latest xf86-video-intel git
Summary: [snb][sna] x11 dies during startup with latest xf86-video-intel git
Status: RESOLVED 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: 2012-02-16 02:57 UTC by nkalkhof
Modified: 2012-02-16 14:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg (39.57 KB, application/octet-stream)
2012-02-16 02:57 UTC, nkalkhof
no flags Details
xorg.log (39.85 KB, text/plain)
2012-02-16 02:57 UTC, nkalkhof
no flags Details
xorg.log with --enable-debug=full (441.45 KB, application/x-bzip2)
2012-02-16 04:47 UTC, nkalkhof
no flags Details

Description nkalkhof 2012-02-16 02:57:05 UTC
Created attachment 57138 [details]
dmesg

Hello,

latest xf86-video-intel with sna enabled causes x11 to die when starting up xfce 4.8.

gdb backtrace:

Program received signal SIGSEGV, Segmentation fault.
search_linear_cache (kgem=0xac42b0, num_pages=0, flags=<optimized out>) at kgem.c:1940
1940				if (num_pages > num_pages(bo)) {
(gdb) backtrace full
#0  search_linear_cache (kgem=0xac42b0, num_pages=0, flags=<optimized out>) at kgem.c:1940
        for_cpu = <optimized out>
        bo = <optimized out>
        first = 0x0
        use_active = <optimized out>
        cache = 0xac8118
#1  0x00007fdca252cef0 in kgem_create_buffer (kgem=0xac42b0, size=0, flags=1, ret=0x7fffee0c60c8)
    at kgem.c:3199
        bo = 0xeaf050
        offset = <optimized out>
        alloc = 0
        old = <optimized out>
#2  0x00007fdca252d5c2 in kgem_create_buffer_2d (kgem=0xac42b0, width=<optimized out>, height=41, 
    bpp=<optimized out>, flags=<optimized out>, ret=<optimized out>) at kgem.c:3468
        bo = <optimized out>
        stride = 0
#3  0x00007fdca25372dd in sna_pixmap_create_upload (screen=<optimized out>, width=2, height=41, depth=1, 
    flags=1) at sna_accel.c:1970
        sna = 0xac40c0
        pixmap = 0xcf2210
        priv = 0xcf2280
        bpp = 1
        ptr = <optimized out>
#4  0x00007fdca2562b9e in trapezoids_fallback (op=12 '\f', src=0xeb91e0, dst=0xeae680, 
    maskFormat=<optimized out>, xSrc=257, ySrc=0, ntrap=2, traps=0xc823c4) at sna_trapezoids.c:2011
        scratch = <optimized out>
        dst_x = 1
        width = 2
        height = 41
        mask = <optimized out>
        dst_y = 0
        bounds = {x1 = 0, y1 = 0, x2 = 2, y2 = 41}
        depth = 1
        image = <optimized out>
        format = PIXMAN_a1
        error = 0
        screen = 0xadb1a0
#5  0x00000000004dddf0 in ProcRenderTrapezoids ()
No symbol table info available.
#6  0x00000000004351cd in Dispatch ()
No symbol table info available.
#7  0x0000000000425f3a in main ()
No symbol table info available.

dmesg and xorg.log attached. 
Could someone confirm this please?

Thanks
Nic
Comment 1 nkalkhof 2012-02-16 02:57:31 UTC
Created attachment 57139 [details]
xorg.log
Comment 2 Chris Wilson 2012-02-16 03:26:23 UTC
There's something fishy going on here as if everything goes to plan we shouldn't hit this path.

The bug in question will be fixed by:

commit 52b11f63d7922032caef0f0a5979b080dbddcbfc
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Feb 16 11:22:23 2012 +0000

    sna: Upconvert fallback trapezoids to a8
    
    Since the hardware only handles a8 without tricky emulation and pixman
    insists on using a1 for sharp trapezoids we need to ensure that we
    convert the a1 to a8 for our trapezoidal mask.
    
    More worryingly, this path should never be hit...
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=46156
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

But do you mind compiling with ./configure --enable-debug=full and attaching the complete Xorg.log that leads to this crash?
Comment 3 nkalkhof 2012-02-16 04:46:49 UTC
Hi Chris,

ok, recompiled without(!) your fix using --enable-sna and --enable-debug=full.
xorg.log grew pretty large so I've packed it. see attachment.

gdb yields:
Program received signal SIGABRT, Aborted.
0x00007f2541fe8115 in raise () from /lib64/libc.so.6
(gdb) backtrace full
#0  0x00007f2541fe8115 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007f2541fe9352 in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00007f2541fe156a in __assert_fail_base () from /lib64/libc.so.6
No symbol table info available.
#3  0x00007f2541fe1608 in __assert_fail () from /lib64/libc.so.6
No symbol table info available.
#4  0x00007f25400faf1e in kgem_create_buffer (kgem=0x10b4290, size=0, flags=1, ret=0x7fffa158b468)
    at kgem.c:3140
        bo = 0x3000000030
        offset = 32767
        alloc = 2706945072
        old = 0x5558f4
        __FUNCTION__ = "kgem_create_buffer"
        __PRETTY_FUNCTION__ = "kgem_create_buffer"
#5  0x00007f25400fc14b in kgem_create_buffer_2d (kgem=0x10b4290, width=2, height=41, bpp=1, flags=1, 
    ret=0x7fffa158b468) at kgem.c:3468
        bo = 0x7f25400fdd7e
        stride = 0
        __PRETTY_FUNCTION__ = "kgem_create_buffer_2d"
        __FUNCTION__ = "kgem_create_buffer_2d"
#6  0x00007f2540103365 in sna_pixmap_create_upload (screen=0x10cb180, width=2, height=41, depth=1, 
    flags=1) at sna_accel.c:1970
        sna = 0x10b40a0
        pixmap = 0x12e4110
        priv = 0x12e4180
        bpp = 1
        ptr = 0x0
        __FUNCTION__ = "sna_pixmap_create_upload"
        __PRETTY_FUNCTION__ = "sna_pixmap_create_upload"
#7  0x00007f2540150d36 in trapezoids_fallback (op=12 '\f', src=0x149efb0, dst=0x12f1a00, 
    maskFormat=0x10cb780, xSrc=257, ySrc=0, ntrap=2, traps=0x12723a4) at sna_trapezoids.c:2011
        scratch = 0x149ede0
        dst_x = 1
        width = 2
        height = 41
        mask = 0x7f254014d432
        dst_y = 0
        bounds = {x1 = 0, y1 = 0, x2 = 2, y2 = 41}
        depth = 1
        image = 0x7f254014d2ba
        format = PIXMAN_a1
        error = 0
        screen = 0x10cb180
        __FUNCTION__ = "trapezoids_fallback"
#8  0x00007f25401568d7 in sna_composite_trapezoids (op=12 '\f', src=0x149efb0, dst=0x12f1a00, 
    maskFormat=0x10cb780, xSrc=257, ySrc=0, ntrap=2, traps=0x12723a4) at sna_trapezoids.c:3753
        sna = 0x10b40a0
        rectilinear = false
        pixel_aligned = false
        n = 8112888
        __FUNCTION__ = "sna_composite_trapezoids"
#9  0x00000000004dddf0 in ProcRenderTrapezoids ()
No symbol table info available.
#10 0x00000000004351cd in Dispatch ()
No symbol table info available.
#11 0x0000000000425f3a in main ()
No symbol table info available.

Regards
Nic
Comment 4 nkalkhof 2012-02-16 04:47:35 UTC
Created attachment 57151 [details]
xorg.log with --enable-debug=full
Comment 5 Chris Wilson 2012-02-16 14:06:59 UTC
Thanks for the debug log. According to the tail we hit the fallback path for precise rendering of a mono trapezoid. Now my span rasterisation should adhere to the render specification in this regard (and if not there already exist paths that do...) so I think the fallback in that particular case is superfluous.

With the fix, and the attempt to close the optimisation loophole, I think I have this bug covered. I'll read through your debug log for any other gems, ta.


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.