Bug 57863

Summary: [llvmpipe] SIGSEGV src/gallium/drivers/llvmpipe/lp_rast.c:407
Product: Mesa Reporter: Vinson Lee <vlee>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: medium CC: jfonseca
Version: gitKeywords: regression
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2012-12-04 06:25:45 UTC
mesa: bdba4b30de15c4e7e6546f7eda37932d281f869c (master)

Run piglit copyteximage 1D on llvmpipe.

$ ./bin/copyteximage 1D -auto
Testing GL_TEXTURE_1D
Segmentation fault (core dumped)

(gdb) bt
#0  0x00007f6c09f05545 in fs33_variant3_partial ()
#1  0x00007f6c0c0c9b02 in lp_rast_shade_quads_mask (task=0xf6d888, inputs=0xfbf480, x=8, y=0, mask=15)
    at src/gallium/drivers/llvmpipe/lp_rast.c:407
#2  0x00007f6c0c0ccc4c in lp_rast_triangle_3_16 (task=0xf6d888, arg=...) at src/gallium/drivers/llvmpipe/lp_rast_tri.c:353
#3  0x00007f6c0c0c9e6f in do_rasterize_bin (task=0xf6d888, bin=0x7f6c0eda1158) at src/gallium/drivers/llvmpipe/lp_rast.c:550
#4  0x00007f6c0c0c9ed0 in rasterize_bin (task=0xf6d888, bin=0x7f6c0eda1158) at src/gallium/drivers/llvmpipe/lp_rast.c:569
#5  0x00007f6c0c0c9fce in rasterize_scene (task=0xf6d888, scene=0x7f6c0eda1010) at src/gallium/drivers/llvmpipe/lp_rast.c:628
#6  0x00007f6c0c0ca075 in lp_rast_queue_scene (rast=0xf6d870, scene=0x7f6c0eda1010) at src/gallium/drivers/llvmpipe/lp_rast.c:657
#7  0x00007f6c0c0d5154 in lp_setup_rasterize_scene (setup=0xfac950) at src/gallium/drivers/llvmpipe/lp_setup.c:159
#8  0x00007f6c0c0d56e5 in set_scene_state (setup=0xfac950, new_state=SETUP_FLUSHED, 
    reason=0x7f6c0ccbda90 <__FUNCTION__.13351> "lp_setup_bind_framebuffer") at src/gallium/drivers/llvmpipe/lp_setup.c:315
#9  0x00007f6c0c0d5837 in lp_setup_bind_framebuffer (setup=0xfac950, fb=0xf6fa98) at src/gallium/drivers/llvmpipe/lp_setup.c:360
#10 0x00007f6c0c0edace in llvmpipe_set_framebuffer_state (pipe=0xf6f140, fb=0x1063e90)
    at src/gallium/drivers/llvmpipe/lp_state_surface.c:84
#11 0x00007f6c0c3d4f0c in cso_restore_framebuffer (ctx=0x10631e0) at src/gallium/auxiliary/cso_cache/cso_context.c:640
#12 0x00007f6c0c42149d in util_blit_pixels (ctx=0x10a0b50, src_tex=0x1053f40, src_level=0, srcX0=0, srcY0=16, srcX1=16, 
    srcY1=15, srcZ0=0, dst=0x1d501d0, dstX0=0, dstY0=0, dstX1=16, dstY1=1, z=0, filter=0, writemask=7, zs_writemask=0)
    at src/gallium/auxiliary/util/u_blit.c:795
#13 0x00007f6c0c23c041 in st_CopyTexSubImage (ctx=0x1004d50, dims=1, texImage=0x112e6c0, destX=0, destY=0, destZ=0, 
    rb=0x1053db0, srcX=0, srcY=0, width=16, height=1) at src/mesa/state_tracker/st_cb_texture.c:1058
#14 0x00007f6c0c1f238b in copyteximage (ctx=0x1004d50, dims=1, target=3552, level=0, internalFormat=34837, x=0, y=0, width=16, 
    height=1, border=0) at src/mesa/main/teximage.c:3329
#15 0x00007f6c0c1f247c in _mesa_CopyTexImage1D (target=3552, level=0, internalFormat=34837, x=0, y=0, width=16, border=0)
    at src/mesa/main/teximage.c:3352
#16 0x0000000000401c08 in test_target_and_format (x=96, y=0, target=3552, format=34837, expected=0x402b80 <fcolor+32>)
    at piglit/tests/texturing/copyteximage.c:448
#17 0x00000000004028bc in piglit_display () at piglit/tests/texturing/copyteximage.c:638
#18 0x00007f6c0ea002b0 in display () at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:60
#19 0x00007f6c0e1b6fc4 in ?? () from /usr/lib/x86_64-linux-gnu/libglut.so.3
#20 0x00007f6c0e1ba719 in fgEnumWindows () from /usr/lib/x86_64-linux-gnu/libglut.so.3
#21 0x00007f6c0e1b745c in glutMainLoopEvent () from /usr/lib/x86_64-linux-gnu/libglut.so.3
#22 0x00007f6c0e1b7d1d in glutMainLoop () from /usr/lib/x86_64-linux-gnu/libglut.so.3
#23 0x00007f6c0ea00482 in run_test (gl_fw=0x7f6c0ecc8800 <glut_fw>, argc=2, argv=0x7fff30ddf428)
    at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:127
#24 0x00007f6c0e9fe5a1 in piglit_gl_test_run (argc=2, argv=0x7fff30ddf428, config=0x7fff30ddf310)
    at piglit/tests/util/piglit-framework-gl.c:127
#25 0x00000000004015c6 in main (argc=3, argv=0x7fff30ddf428) at piglit/tests/texturing/copyteximage.c:117


03aa3fd54bd8824d90307b3fbe5e26606212be40 is the first bad commit
commit 03aa3fd54bd8824d90307b3fbe5e26606212be40
Author: José Fonseca <jfonseca@vmware.com>
Date:   Mon Dec 3 13:55:45 2012 +0000

    llvmpipe: Improve color buffer loads/stores alignment.
    
    Tell LLVM the exact alignment we can guarantee, based on the fs block
    dimensions, pixel format, and the alignment of the resource base pointer
    and stride.
    
    Reviewed-by: Roland Scheidegger <sroland@vmware.com>

:040000 040000 9771e7e6f123205af175aaec42504409b05d3c02 f37c56f49bec18cc049dae291847016f28b9d4f2 M	src
bisect run success
Comment 1 Jose Fonseca 2012-12-04 19:48:42 UTC
Should be fixed with 

commit 294d8a71efe0d85d7212c9b0f465e8637cc25e77
Author: José Fonseca <jfonseca@vmware.com>
Date:   Tue Dec 4 19:09:28 2012 +0000

    llvmpipe: Fix alignment.
    
    My understanding and actual implementation of how the pixels are being
    fetch differed.
    
    This fixes bug 57863.
    
    Trivial.


Thanks Vinson!

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.