Bug 53494 - [snb] crash in texsubimage to a large atlas in clutter
[snb] crash in texsubimage to a large atlas in clutter
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
8.0
x86-64 (AMD64) Linux (All)
: medium normal
Assigned To: Ian Romanick
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-14 14:00 UTC by Debarshi Ray
Modified: 2013-04-08 20:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debarshi Ray 2012-08-14 14:00:18 UTC
Crashes when trying to render the attached image using Clutter. eg., http://git.gnome.org/browse/gnome-photos/tree/src/photos-embed.c#n85


(gdb) bt
#0  0x00007ffff5f2bd9f in _mesa_texstore_argb8888 (ctx=<optimized out>, dims=2, baseInternalFormat=<optimized out>, 
    dstFormat=<optimized out>, dstRowStride=<optimized out>, dstSlices=<optimized out>, srcWidth=5184, srcHeight=
    3456, srcDepth=1, srcFormat=6407, srcType=5121, srcAddr=0x7fffcccbd010, srcPacking=0x7b0618)
    at ../main/texstore.c:1341
#1  0x00007ffff5f2d052 in store_texsubimage (ctx=ctx@entry=0x7a9d90, texImage=texImage@entry=0x1740230, 
    xoffset=xoffset@entry=1, yoffset=yoffset@entry=1, zoffset=zoffset@entry=0, width=5184, width@entry=3456, height=
    3456, depth=1, format=6407, type=5121, pixels=0x7fffcccbd010, packing=0x7b0618, caller=
    0x7ffff6093dd1 "glTexSubImage") at ../main/texstore.c:4239
#2  0x00007ffff5f2d3bb in _mesa_store_texsubimage (ctx=ctx@entry=0x7a9d90, dims=dims@entry=2, 
    texImage=texImage@entry=0x1740230, xoffset=xoffset@entry=1, yoffset=yoffset@entry=1, zoffset=zoffset@entry=0, 
    width=3456, width@entry=5184, height=1, height@entry=3456, depth=6407, depth@entry=1, format=5121, format@entry=
    6407, type=3435909136, type@entry=5121, pixels=0x7b0618, pixels@entry=0x7fffcccbd010, packing=0x7ffff6093dd1, 
    packing@entry=0x7b0618) at ../main/texstore.c:4306
#3  0x00007ffff63e6755 in intelTexSubImage (ctx=0x7a9d90, dims=2, texImage=0x1740230, xoffset=1, yoffset=1, zoffset=
    0, width=5184, height=3456, depth=1, format=6407, type=5121, pixels=0x7fffcccbd010, packing=0x7b0618)
    at intel_tex_subimage.c:166
#4  0x00007ffff5f18a9b in texsubimage (ctx=0x7a9d90, dims=dims@entry=2, target=3553, level=0, xoffset=1, yoffset=1, 
    zoffset=zoffset@entry=0, width=5184, height=3456, depth=depth@entry=1, format=format@entry=6407, type=type@entry=
    5121, pixels=pixels@entry=0x7fffcccbd010) at ../main/teximage.c:2804
#5  0x00007ffff5f1b975 in texsubimage (pixels=0x7fffcccbd010, type=5121, format=6407, depth=1, 
    height=<optimized out>, width=<optimized out>, zoffset=0, yoffset=<optimized out>, xoffset=<optimized out>, 
    level=<optimized out>, target=<optimized out>, dims=2, ctx=<optimized out>) at ../main/teximage.c:2752
#6  _mesa_TexSubImage2D (target=<optimized out>, level=<optimized out>, xoffset=<optimized out>, 
    yoffset=<optimized out>, width=<optimized out>, height=<optimized out>, format=6407, type=5121, pixels=
    0x7fffcccbd010) at ../main/teximage.c:2840
#7  0x0000003a7f2182de in _cogl_texture_driver_upload_subregion_to_gl (gl_target=3553, gl_handle=12, is_foreign=0, 
    src_x=0, src_y=0, dst_x=1, dst_y=1, width=5184, height=3456, source_bmp=0x1555f20, source_gl_format=6407, 
    source_gl_type=5121) at driver/gl/cogl-texture-driver-gl.c:176
#8  0x0000003a7f24edf9 in _cogl_texture_2d_set_region (tex=0x28e83c0, src_x=0, src_y=0, dst_x=1, dst_y=1, dst_width=
    5184, dst_height=3456, bmp=0x1555f20) at ./cogl-texture-2d.c:783
#9  0x0000003a7f253aa9 in _cogl_atlas_texture_set_region_with_border (atlas_tex=atlas_tex@entry=0x28ee0d0, 
    src_x=src_x@entry=0, src_y=src_y@entry=0, dst_x=dst_x@entry=0, dst_y=dst_y@entry=0, dst_width=dst_width@entry=
    5184, dst_height=dst_height@entry=3456, bmp=bmp@entry=0x1555f20) at ./cogl-atlas-texture.c:445
#10 0x0000003a7f254504 in _cogl_atlas_texture_new_from_bitmap (bmp=bmp@entry=0x1695c10, flags=flags@entry=
    COGL_TEXTURE_NONE, internal_format=<optimized out>, internal_format@entry=COGL_PIXEL_FORMAT_ANY)
    at ./cogl-atlas-texture.c:768
#11 0x0000003a7f24d3a0 in cogl_texture_new_from_bitmap (bitmap=<optimized out>, flags=<optimized out>, 
    internal_format=<optimized out>) at ./cogl-texture.c:366
#12 0x0000003a7f24d487 in cogl_texture_new_from_data (width=<optimized out>, height=<optimized out>, 
    flags=<optimized out>, format=<optimized out>, internal_format=<optimized out>, rowstride=<optimized out>, 
    data=data@entry=
    0x7fffcccbd010 "\316\320\335\317\321\336\317\323\337\316\322\336\313\321\335\314\322\336\315\323\337\317\325\341\320\324\340\321\325\341\321\325\341\320\324\340\321\325\340\320\324\337\322\326\337\323\327\340\322\326\337\323\327\340\325\331\342\325\331\342\325\331\342\325\331\342\325\331\342\325\331\342\327\331\345\326\330\344\325\327\343\326\330\344\326\331\342\327\332\343\330\333\342\331\334\343\333\333\343\332\332\342\330\333\342\330\333\342\330\333\342\330\333\342\330\333\340\330\333\340\327\332\337\331\334\341\333\336\343\332\335\342\332\335\342\332\335\342\335\336\343\335\336\343\335\336\343\335\336\343\335\336\343\335\336\343\335\336\343\335\336\343\335\336\342\335\336\342\337\340\344\336\337\343\336\337\343\336\337\343\336\337\344\336\337\344\336\337\344\336\337\344\337\340\345\337\340\345\335", <incomplete sequence \341>...) at ./cogl-texture.c:351
#13 0x0000003a7e683572 in clutter_image_set_data (image=0x175e630 [ClutterImage], data=data@entry=
    0x7fffcccbd010 "\316\320\335\317\321\336\317\323\337\316\322\336\313\321\335\314\322\336\315\323\337\317\325\341\320\324\340\321\325\341\321\325\341\320\324\340\321\325\340\320\324\337\322\326\337\323\327\340\322\326\337\323\327\340\325\331\342\325\331\342\325\331\342\325\331\342\325\331\342\325\331\342\327\331\345\326\330\344\325\327\343\326\330\344\326\331\342\327\332\343\330\333\342\331\334\343\333\333\343\332\332\342\330\333\342\330\333\342\330\333\342\330\333\342\330\333\340\330\333\340\327\332\337\331\334\341\333\336\343\332\335\342\332\335\342\332\335\342\335\336\343\335\336\343\335\336\343\335\336\343\335\336\343\335\336\343\335\336\343\335\336\343\335\336\342\335\336\342\337\340\344\336\337\343\336\337\343\336\337\343\336\337\344\336\337\344\336\337\344\336\337\344\337\340\345\337\340\345\335", <incomplete sequence \341>..., pixel_format=COGL_PIXEL_FORMAT_RGB_888, width=width@entry=5184, height=height@entry=3456, 
    row_stride=15552, error=error@entry=0x0) at ./clutter-image.c:238
#14 0x0000000000414f9a in photos_embed_item_load (source_object=<optimized out>, res=<optimized out>, 
    user_data=user_data@entry=0x6851d0) at photos-embed.c:94
#15 0x0000003a5ec720be in g_simple_async_result_complete (simple=0x172b810 [GSimpleAsyncResult])
    at gsimpleasyncresult.c:775
#16 0x0000003a5ec72158 in complete_in_idle_cb_for_thread (_data=0x155ebc0) at gsimpleasyncresult.c:843
#17 0x0000003a5d447c55 in g_main_dispatch (context=0x642800) at gmain.c:2691
#18 g_main_context_dispatch (context=context@entry=0x642800) at gmain.c:3195
#19 0x0000003a5d447f88 in g_main_context_iterate (context=context@entry=0x642800, block=block@entry=1, 
    dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3266
#20 0x0000003a5d448044 in g_main_context_iteration (context=0x642800, context@entry=0x0, may_block=may_block@entry=1)
    at gmain.c:3327
#21 0x0000003a5eca177c in g_application_run (application=0x63d000 [PhotosApplication], argc=argc@entry=1, 
    argv=argv@entry=0x7fffffffe0d8) at gapplication.c:1607
#22 0x000000000040e070 in main (argc=1, argv=0x7fffffffe0d8) at photos-main.c:43
(gdb) info registers
rax            0x7fffcccbd010	140736629297168
rbx            0x1440	5184
rcx            0x7fffcccbd013	140736629297171
rdx            0xffced0dd	4291743965
rsi            0xd000	53248
rdi            0x7fffb8008004	140736280428548
rbp            0xd80	0xd80
rsp            0x7fffffffd7c0	0x7fffffffd7c0
r8             0x7fffcccc0cd0	140736629312720
r9             0x0	0
r10            0x3cc0	15552
r11            0x7fffb8008004	140736280428548
r12            0x7fffffffd8e8	140737488345320
r13            0x0	0
r14            0x8000	32768
r15            0x3cc0	15552
rip            0x7ffff5f2bd9f	0x7ffff5f2bd9f <_mesa_texstore_argb8888+1679>
eflags         0x10286	[ PF SF IF RF ]
cs             0x33	51
ss             0x2b	43
ds             0x0	0
es             0x0	0
fs             0x0	0
gs             0x0	0
(gdb) disassemble 0x7ffff5f2bd9f,+100
Dump of assembler code from 0x7ffff5f2bd9f to 0x7ffff5f2be03:
=> 0x00007ffff5f2bd9f <_mesa_texstore_argb8888+1679>:	mov    %edx,(%rdi)
   0x00007ffff5f2bda1 <_mesa_texstore_argb8888+1681>:	add    $0x4,%rdi
   0x00007ffff5f2bda5 <_mesa_texstore_argb8888+1685>:	cmp    %rcx,%r8
   0x00007ffff5f2bda8 <_mesa_texstore_argb8888+1688>:	jne    0x7ffff5f2bd80 <_mesa_texstore_argb8888+1648>
   0x00007ffff5f2bdaa <_mesa_texstore_argb8888+1690>:	add    $0x1,%r9d
   0x00007ffff5f2bdae <_mesa_texstore_argb8888+1694>:	add    %r14,%r11
   0x00007ffff5f2bdb1 <_mesa_texstore_argb8888+1697>:	add    %r15,%rax
   0x00007ffff5f2bdb4 <_mesa_texstore_argb8888+1700>:	cmp    %ebp,%r9d
   0x00007ffff5f2bdb7 <_mesa_texstore_argb8888+1703>:	jne    0x7ffff5f2bd70 <_mesa_texstore_argb8888+1632>
   0x00007ffff5f2bdb9 <_mesa_texstore_argb8888+1705>:	add    $0x1,%r13d
   0x00007ffff5f2bdbd <_mesa_texstore_argb8888+1709>:	add    $0x8,%r12
   0x00007ffff5f2bdc1 <_mesa_texstore_argb8888+1713>:	cmp    0xd0(%rsp),%r13d
   0x00007ffff5f2bdc9 <_mesa_texstore_argb8888+1721>:	jne    0x7ffff5f2bd08 <_mesa_texstore_argb8888+1528>
   0x00007ffff5f2bdcf <_mesa_texstore_argb8888+1727>:	jmpq   0x7ffff5f2ba71 <_mesa_texstore_argb8888+865>
   0x00007ffff5f2bdd4 <_mesa_texstore_argb8888+1732>:	callq  0x7ffff5e68c90 <__stack_chk_fail@plt>
   0x00007ffff5f2bdd9:	nopl   0x0(%rax)
   0x00007ffff5f2bde0 <_mesa_texstore_sargb8+0>:	mov    $0x3,%ecx
   0x00007ffff5f2bde5 <_mesa_texstore_sargb8+5>:	jmpq   0x7ffff5f2b710 <_mesa_texstore_argb8888>
   0x00007ffff5f2bdea:	nopw   0x0(%rax,%rax,1)
   0x00007ffff5f2bdf0 <_mesa_texstore_rgba8888+0>:	mov    %rbx,-0x30(%rsp)
   0x00007ffff5f2bdf5 <_mesa_texstore_rgba8888+5>:	mov    %rbp,-0x28(%rsp)
   0x00007ffff5f2bdfa <_mesa_texstore_rgba8888+10>:	mov    %r8d,%r10d
   0x00007ffff5f2bdfd <_mesa_texstore_rgba8888+13>:	mov    %r12,-0x20(%rsp)
   0x00007ffff5f2be02 <_mesa_texstore_rgba8888+18>:	mov    %r13,-0x18(%rsp)
End of assembler dump.
(gdb) 


I have:

[rishi@kolache ~]$ rpm -qa | grep mesa
mesa-dri-filesystem-8.1-0.16.fc18.x86_64
mesa-libGLU-8.1-0.16.fc18.x86_64
mesa-dri-filesystem-8.1-0.16.fc18.i686
mesa-debuginfo-8.1-0.16.fc18.x86_64
mesa-libGLES-8.1-0.16.fc18.x86_64
mesa-libGL-devel-8.1-0.16.fc18.x86_64
mesa-libEGL-devel-8.1-0.16.fc18.x86_64
mesa-libxatracker-8.1-0.16.fc18.x86_64
mesa-libglapi-8.1-0.16.fc18.x86_64
mesa-libGL-8.1-0.16.fc18.x86_64
mesa-libGLU-devel-8.1-0.16.fc18.x86_64
mesa-libEGL-8.1-0.16.fc18.x86_64
mesa-dri-drivers-8.1-0.16.fc18.x86_64
mesa-libgbm-8.1-0.16.fc18.x86_64
[rishi@kolache ~]$ rpm -qa | grep xorg
xorg-x11-server-utils-7.5-13.fc18.x86_64
xorg-x11-drv-qxl-0.0.22-3.20120718gitde6620788.fc18.x86_64
xorg-x11-drv-ati-7.0.0-0.3.20120629git5ebebfdb4.fc18.x86_64
xorg-x11-drv-evdev-2.7.2-6.fc18.x86_64
xorg-x11-xinit-1.3.2-6.fc18.x86_64
abrt-addon-xorg-2.0.11-1.fc18.x86_64
xorg-x11-drv-nouveau-1.0.1-4.fc18.x86_64
xorg-x11-utils-7.5-7.fc18.x86_64
xorg-x11-fonts-misc-7.5-6.fc18.noarch
xorg-x11-proto-devel-7.6-24.fc18.noarch
xorg-x11-drv-ast-0.97.0-2.fc18.x86_64
xorg-x11-drv-dummy-0.3.6-2.fc18.x86_64
xorg-x11-util-macros-1.17-2.fc18.noarch
xorg-x11-xkb-utils-7.7-2.fc18.x86_64
xorg-x11-drv-openchrome-0.3.0-2.20120805git131175a71.fc18.x86_64
xorg-x11-drv-wacom-0.16.0-5.fc18.x86_64
xorg-x11-server-devel-1.12.99.904-1.20120808.fc18.x86_64
xorg-x11-xauth-1.0.7-2.fc18.x86_64
xorg-x11-server-common-1.12.99.904-1.20120808.fc18.x86_64
xorg-x11-drv-cirrus-1.5.1-2.fc18.x86_64
xorg-x11-drv-mga-1.6.1-2.fc18.x86_64
xorg-x11-xtrans-devel-1.2.7-2.fc18.noarch
xorg-x11-drv-synaptics-1.6.2-5.fc18.x86_64
xorg-x11-drv-vmmouse-12.9.0-5.fc18.x86_64
xorg-x11-server-Xephyr-1.12.99.904-1.20120808.fc18.x86_64
xorg-x11-drv-wacom-devel-0.16.0-5.fc18.x86_64
xorg-x11-font-utils-7.5-9.fc18.x86_64
xorg-x11-drv-fbdev-0.4.3-3.fc18.x86_64
xorg-x11-drv-intel-2.20.2-1.fc18.x86_64
xorg-x11-drv-vesa-2.3.2-2.fc18.x86_64
xorg-x11-drv-void-1.4.0-11.fc18.x86_64
xorg-x11-server-Xorg-1.12.99.904-1.20120808.fc18.x86_64
xorg-x11-drv-vmware-12.0.2-3.20120718gite5ac80d8f.fc18.x86_64
[rishi@kolache ~]$ rpm -qa | grep clutter
clutter-gtk-devel-1.3.2-2.fc18.x86_64
clutter-devel-1.11.10-1.fc18.x86_64
clutter-gst-devel-1.6.0-2.fc18.x86_64
clutter-doc-1.11.10-1.fc18.x86_64
clutter-gst-debuginfo-1.6.0-2.fc18.x86_64
clutter-gst-1.6.0-2.fc18.x86_64
clutter-1.11.10-1.fc18.x86_64
clutter-gtk-debuginfo-1.3.2-2.fc18.x86_64
clutter-debuginfo-1.11.10-1.fc18.x86_64
clutter-gtk-1.3.2-2.fc18.x86_64
[rishi@kolache ~]$
Comment 1 Debarshi Ray 2012-08-14 14:01:06 UTC
Forgot to mention, the hardware that I have is a Thinkpad x220 with Intel Sandybridge.
Comment 2 Debarshi Ray 2012-08-14 14:08:05 UTC
Problems attaching the image, so here it is: http://rishi.fedorapeople.org/IMG_0415.JPG
Comment 3 Eric Anholt 2013-02-06 23:31:21 UTC
I wonder how big the BO is, and if this is another case of trying to access an object larger than the GTT through the GTT.  p *intelImage->mt->region in frame 3 would be interesting.
Comment 4 Eric Anholt 2013-04-08 20:20:51 UTC
I think it should be fixed by the patch series ending with:

commit ca9a7d975af228cabb79c3040ec67f26f94f90a2
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Apr 2 17:28:41 2013 -0700

    intel: Avoid making tiled miptrees we won't be able to blit.