Bug 40474 - [regression bisected] Segfault failure in piglit test copyteximage
Summary: [regression bisected] Segfault failure in piglit test copyteximage
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium major
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-29 16:21 UTC by Ian Romanick
Modified: 2011-08-30 23:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Ian Romanick 2011-08-29 16:21:59 UTC
On Ironlake, get the following segfault in piglit's copyteximage:

Program received signal SIGSEGV, Segmentation fault.
drm_intel_bo_busy (bo=0x0) at intel_bufmgr.c:251
251		if (bo->bufmgr->bo_busy)
(gdb) print bo
$3 = (drm_intel_bo *) 0x0
(gdb) bt
#0  drm_intel_bo_busy (bo=0x0) at intel_bufmgr.c:251
#1  0x00007ffff5e32f90 in intelTexSubimage (ctx=0x7ffff59a4040, dims=2, 
    target=3553, level=0, xoffset=0, yoffset=0, zoffset=0, width=64, 
    height=64, depth=1, imageSize=0, format=6408, type=5121, pixels=0xa6ce50, 
    packing=0x7ffff59b36c8, texObj=0xa29320, texImage=0x9ba570)
    at intel_tex_subimage.c:67
#2  0x00007ffff5e33521 in intelTexSubImage2D (ctx=0x7ffff59a4040, target=3553, 
    level=0, xoffset=0, yoffset=0, width=64, height=64, format=6408, 
    type=5121, pixels=0xa6ce50, packing=0x7ffff59b36c8, texObj=0xa29320, 
    texImage=0x9ba570) at intel_tex_subimage.c:184
#3  0x00007ffff6056f06 in copy_tex_sub_image (ctx=0x7ffff59a4040, dims=2, 
    target=3553, level=0, xoffset=0, yoffset=0, zoffset=0, x=0, y=0, width=64, 
    height=64) at drivers/common/meta.c:2900
#4  0x00007ffff6056ffd in _mesa_meta_CopyTexSubImage2D (ctx=0x7ffff59a4040, 
    target=3553, level=0, xoffset=0, yoffset=0, x=0, y=0, width=64, height=64)
    at drivers/common/meta.c:2928
#5  0x00007ffff5e30964 in intelCopyTexSubImage2D (ctx=0x7ffff59a4040, 
    target=3553, level=0, xoffset=0, yoffset=0, x=0, y=0, width=64, height=64)
    at intel_tex_copy.c:211
#6  0x00007ffff5f6403f in copyteximage (ctx=0x7ffff59a4040, dims=2, 
    target=3553, level=0, internalFormat=6409, x=0, y=0, width=64, height=64, 
    border=0) at main/teximage.c:2828
#7  0x00007ffff5f641b1 in _mesa_CopyTexImage2D (target=3553, level=0, 
    internalFormat=6409, x=0, y=0, width=64, height=64, border=0)
    at main/teximage.c:2869
#8  0x0000000000428910 in test ()
    at /home/idr/devel/graphics/piglit/tests/texturing/copyteximage.c:95
#9  0x0000000000428a84 in piglit_display ()
    at /home/idr/devel/graphics/piglit/tests/texturing/copyteximage.c:134
#10 0x0000000000428aad in display ()
    at /home/idr/devel/graphics/piglit/tests/util/piglit-framework.c:48
#11 0x00007ffff7b13f75 in ?? () from /usr/lib64/libglut.so.3
#12 0x00007ffff7b17ab9 in fgEnumWindows () from /usr/lib64/libglut.so.3
#13 0x00007ffff7b144da in glutMainLoopEvent () from /usr/lib64/libglut.so.3
#14 0x00007ffff7b14db5 in glutMainLoop () from /usr/lib64/libglut.so.3
#15 0x0000000000428daa in main (argc=1, argv=0x7fffffffe0d8)
    at /home/idr/devel/graphics/piglit/tests/util/piglit-framework.c:144

I bisected this to:

commit 336f87d5d5a4cb7809d136c03ac6f53b1d312d24
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Aug 1 14:37:19 2011 -0700

    intel: Rely on Mesa core for the non-blit glTexSubImage* implementation.
    
    It uses MapTextureImage() now, so we don't need our own mapping.
    
    Reviewed-by: Brian Paul <brianp@vmware.com>
Comment 1 Ian Romanick 2011-08-30 10:10:45 UTC
It's worth pointing out that the test runs perfectly on SNB, so this appears to be specific to ILK (and earlier?).
Comment 2 Tobias Jakobi 2011-08-30 11:13:19 UTC
Also hitting this segfault. Ironlake (Core i5) here.
Comment 3 Sean McNamara 2011-08-30 11:49:35 UTC
(In reply to comment #2)
> Also hitting this segfault. Ironlake (Core i5) here.

"Me Too" on 965GM. In my case, this happens when starting gnome-shell.
Comment 4 Sean McNamara 2011-08-30 12:00:38 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Also hitting this segfault. Ironlake (Core i5) here.
> 
> "Me Too" on 965GM. In my case, this happens when starting gnome-shell.

Fixed by applying this patchset:

http://thread.gmane.org/gmane.comp.video.mesa3d.devel/30043

Thanks, David.
Comment 5 Eric Anholt 2011-08-30 14:59:40 UTC
commit 0b96b3ffa92285d281de82442743402cf374973a
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Aug 30 10:31:41 2011 -0700

    intel: Restructure TexSubImage as just the 2D implementation and blit func.
    
    Fixes a segfault in piglit copyteximage where I accidentally removed
    the dst_bo setup in the previous cleanup.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40474
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Tested-by: Sean McNamara <gm.potato.ul@gmail.com>
    Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Comment 6 fangxun 2011-08-30 23:29:15 UTC
This regression appeared on our yesterday testing. It works fine with today's mesa master commit 93d59637446ba98802fa349afc1f365d71a66c9d.


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.