[Mesa-dev] piglit: Segmentation fault running fbo-depthstencil -auto readpixels default

Theiss, Ingo ingo.theiss at i-matrixx.de
Wed Nov 16 09:09:45 PST 2011


 
Am Mittwoch, 16. November 2011 15:58 CET, Brian Paul <brianp at vmware.com> schrieb: 
 
> On 11/16/2011 01:38 AM, Theiss, Ingo wrote:
> > Dear devs,
> >
> > I am getting segmentation faults when running piglit r600.tests with latest mesa build from git:
> >
> > Nov 16 09:21:33 spoc kernel: [74538.198983] radeon 0000:05:00.0: object_init failed for (1431699456, 0x00000006)
> > Nov 16 09:21:33 spoc kernel: [74538.198987] [drm:radeon_gem_object_create] *ERROR* Failed to allocate GEM object (1431699456, 4, 4096, -12)
> > Nov 16 09:21:37 spoc kernel: [74542.266472] fbo-depthstenci[6867]: segfault at 0 ip 00007fb271b5414a sp 00007fffbfdf8fd0 error 4 in r600_dri.so[7fb2716c8000+dba000]
> >
> > ---
> > Core was generated by `/home/itheiss/build/mesa.git/piglit/bin/fbo-depthstencil -auto readpixels defau'.
> > Program terminated with signal 11, Segmentation fault.
> > #0  u_transfer_unmap_vtbl (pipe=0x2441df0, transfer=0x0) at util/u_resource.c:63
> > 63	   ur->vtbl->transfer_unmap(pipe, transfer);
> > (gdb) bt
> > #0  u_transfer_unmap_vtbl (pipe=0x2441df0, transfer=0x0) at util/u_resource.c:63
> > #1  0x00007f4cb36cc0eb in pipe_transfer_unmap (transfer=<optimized out>, context=0x2441df0)
> >      at ../../src/gallium/auxiliary/util/u_inlines.h:398
> > #2  st_UnmapRenderbuffer (ctx=<optimized out>, rb=0x25b7fc0) at state_tracker/st_cb_fbo.c:704
> > #3  0x00007f4cb365f925 in slow_read_depth_stencil_pixels_separate (ctx=0x254b720, x=<optimized out>, y=<optimized out>, width=123,
> >      height=123, type=36269, packing=0x7fff653d0750, dst=0x7fff653ee138 "", dstStride=984) at main/readpix.c:427
> > #4  0x00007f4cb36601d6 in read_depth_stencil_pixels (packing=0x7fff653d0750, pixels=<optimized out>, type=36269, height=<optimized out>,
> >      width=123, y=0, x=0, ctx=0x254b720) at main/readpix.c:469
> > #5  _mesa_readpixels (ctx=0x254b720, x=0, y=0, width=123, height=123, format=<optimized out>, type=36269, packing=0x255afb8,
> >      pixels=<optimized out>) at main/readpix.c:508
> > #6  0x00007f4cb3660bbd in _mesa_ReadnPixelsARB (pixels=0x7fff653d0870, type=36269, format=34041, height=123, width=123, y=0, x=0,
> >      bufSize=<optimized out>) at main/readpix.c:753
> > #7  _mesa_ReadPixels (x=0, y=0, width=123, height=123, format=34041, type=36269, pixels=0x7fff653d0870) at main/readpix.c:761
> > #8  0x000000000042eb4a in read_32f_8 ()
> > #9  0x000000000042ec0b in compare ()
> > #10 0x000000000042ef73 in test_readpixels ()
> > #11 0x000000000042f7aa in piglit_display ()
> > #12 0x0000000000430241 in display ()
> > #13 0x00007f4cb6f11808 in ?? () from /usr/lib/libglut.so.3
> > #14 0x00007f4cb6f15339 in fgEnumWindows () from /usr/lib/libglut.so.3
> > #15 0x00007f4cb6f11ca1 in glutMainLoopEvent () from /usr/lib/libglut.so.3
> > #16 0x00007f4cb6f12540 in glutMainLoop () from /usr/lib/libglut.so.3
> > #17 0x0000000000430967 in main ()
> > ---
> >
> > My glxinfo:
> >
> > OpenGL vendor string: X.Org
> > OpenGL renderer string: Gallium 0.4 on AMD BARTS
> > OpenGL version string: 2.1 Mesa 7.12-devel (git-4f677ca)
> > OpenGL shading language version string: 1.20
> >
> >
> > A general question: I am interested in running regular piglit tests on my hardware and would like to help by reporting problems/bugs. What´s the correct way of doing so? Should I post any problems to mesa-dev or should I open a bug.
> >
> > Thanks and keep up the good work!
> 
> I think that this will be fixed by the patch I just posted (mesa: 
> don't map depth+stencil buffer twice in glReadPixels())  Can you try it?
> 
> -Brian
> 
> 

Hi Brian,

I have applied the patch but still getting segfaults from the following piglit tests. The initial segfault I have posted seems to be gone. 

1. fbo-depthstencil -auto drawpixels GL_DEPTH24_STENCIL8 32F_24_8_REV
    fbo-depthstencil -auto readpixels GL_DEPTH24_STENCIL8 32F_24_8_REV

Here is the backtrace:

Core was generated by `/home/itheiss/build/mesa.git/piglit/bin/fbo-depthstencil -auto readpixels GL_DE'.
Program terminated with signal 11, Segmentation fault.
#0  unpack_ubyte_s_Z24_S8 (n=<optimized out>, dst=<optimized out>, src=<optimized out>) at main/format_unpack.c:1896
1896	      dst[i] = src32[i] >> 24;
(gdb) bt
#0  unpack_ubyte_s_Z24_S8 (n=<optimized out>, dst=<optimized out>, src=<optimized out>) at main/format_unpack.c:1896
#1  _mesa_unpack_ubyte_stencil_row (format=<optimized out>, n=123, src=0x7fff609b3c79, dst=0x7fff60977d30 "") at main/format_unpack.c:1918
#2  0x00007fdfa294e8cd in slow_read_depth_stencil_pixels_separate (ctx=0x1963720, x=<optimized out>, y=<optimized out>, width=123, 
    height=123, type=36269, packing=0x7fff6097bdf0, dst=0x7fff6097d9f8 "", dstStride=984) at main/readpix.c:421
#3  0x00007fdfa294f1f6 in read_depth_stencil_pixels (packing=0x7fff6097bdf0, pixels=<optimized out>, type=36269, height=<optimized out>, 
    width=123, y=0, x=0, ctx=0x1963720) at main/readpix.c:477
#4  _mesa_readpixels (ctx=0x1963720, x=0, y=0, width=123, height=123, format=<optimized out>, type=36269, packing=0x1972fb8, 
    pixels=<optimized out>) at main/readpix.c:516
#5  0x00007fdfa294fbdd in _mesa_ReadnPixelsARB (pixels=0x7fff6097bf10, type=36269, format=34041, height=123, width=123, y=0, x=0, 
    bufSize=<optimized out>) at main/readpix.c:761
#6  _mesa_ReadPixels (x=0, y=0, width=123, height=123, format=34041, type=36269, pixels=0x7fff6097bf10) at main/readpix.c:769
#7  0x000000000042eb4a in read_32f_8 ()
#8  0x000000000042ec0b in compare ()
#9  0x000000000042ef73 in test_readpixels ()
#10 0x000000000042f7aa in piglit_display ()
#11 0x0000000000430241 in display ()
#12 0x00007fdfa6200808 in ?? () from /usr/lib/libglut.so.3
#13 0x00007fdfa6204339 in fgEnumWindows () from /usr/lib/libglut.so.3
#14 0x00007fdfa6200ca1 in glutMainLoopEvent () from /usr/lib/libglut.so.3
#15 0x00007fdfa62015a7 in glutMainLoop () from /usr/lib/libglut.so.3
#16 0x0000000000430967 in main ()

2. fbo-depthstencil -auto readpixels GL_DEPTH32F_STENCIL8 32F_24_8_REV
    fbo-depthstencil -auto drawpixels GL_DEPTH32F_STENCIL8 32F_24_8_REV
    fbo-depthstencil -auto readpixels GL_DEPTH32F_STENCIL8 24_8
    fbo-depthstencil -auto drawpixels GL_DEPTH32F_STENCIL8 24_8

Here is the backtrace:

Core was generated by `/home/itheiss/build/mesa.git/piglit/bin/fbo-depthstencil -auto readpixels GL_DE'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f3179a18526 in unpack_ubyte_s_Z32_FLOAT_X24S8 (n=<optimized out>, dst=<optimized out>, src=<optimized out>)
    at main/format_unpack.c:1906
1906	      dst[i] = src32[i * 2 + 1] & 0xff;
(gdb) bt
#0  0x00007f3179a18526 in unpack_ubyte_s_Z32_FLOAT_X24S8 (n=<optimized out>, dst=<optimized out>, src=<optimized out>)
    at main/format_unpack.c:1906
#1  _mesa_unpack_ubyte_stencil_row (format=<optimized out>, n=123, src=0x7fffa7ce2fe7, dst=0x7fffa7ca7560 "") at main/format_unpack.c:1924
#2  0x00007f31798cd8cd in slow_read_depth_stencil_pixels_separate (ctx=0x1478720, x=<optimized out>, y=<optimized out>, width=123, 
    height=123, type=36269, packing=0x7fffa7cab620, dst=0x7fffa7cad228 "", dstStride=984) at main/readpix.c:421
#3  0x00007f31798ce1f6 in read_depth_stencil_pixels (packing=0x7fffa7cab620, pixels=<optimized out>, type=36269, height=<optimized out>, 
    width=123, y=0, x=0, ctx=0x1478720) at main/readpix.c:477
#4  _mesa_readpixels (ctx=0x1478720, x=0, y=0, width=123, height=123, format=<optimized out>, type=36269, packing=0x1487fb8, 
    pixels=<optimized out>) at main/readpix.c:516
#5  0x00007f31798cebdd in _mesa_ReadnPixelsARB (pixels=0x7fffa7cab740, type=36269, format=34041, height=123, width=123, y=0, x=0, 
    bufSize=<optimized out>) at main/readpix.c:761
#6  _mesa_ReadPixels (x=0, y=0, width=123, height=123, format=34041, type=36269, pixels=0x7fffa7cab740) at main/readpix.c:769
#7  0x000000000042eb4a in read_32f_8 ()
#8  0x000000000042ec0b in compare ()
#9  0x000000000042ef73 in test_readpixels ()
#10 0x000000000042f7aa in piglit_display ()
#11 0x0000000000430241 in display ()
#12 0x00007f317d17f808 in ?? () from /usr/lib/libglut.so.3
#13 0x00007f317d183339 in fgEnumWindows () from /usr/lib/libglut.so.3
#14 0x00007f317d17fca1 in glutMainLoopEvent () from /usr/lib/libglut.so.3
#15 0x00007f317d1805a7 in glutMainLoop () from /usr/lib/libglut.so.3
#16 0x0000000000430967 in main ()


Regards,

Ingo






More information about the mesa-dev mailing list