Bug 31561 - [i915] intel_regions.c:289: intel_region_release: Assertion `region->map_refcount == 0' failed.
[i915] intel_regions.c:289: intel_region_release: Assertion `region->map_refc...
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915
x86 (IA32) Linux (All)
: medium critical
Assigned To: Eric Anholt
Depends on:
  Show dependency treegraph
Reported: 2010-11-11 16:58 UTC by Vinson Lee
Modified: 2011-08-18 19:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2010-11-11 16:58:50 UTC
mesa: d18df9e336b5d2e68a4a6185f7b9d0d0c095c3c4 (master)

chipset: 945GM (Intel GMA 950)
system architecture: i686
xserver-xorg-video-intel: 2:2.12.0-1ubuntu5.1
libdrm-intel1: 2.4.21-1ubuntu2.1
kernel version: 2.6.35-22-generic
Linux distribution: Ubuntu 10.10 i386
Machine model: Macmini1,1

Run glean pixelFormats test.

$ ./bin/glean -r results -t pixelFormats --quick
glean: intel_regions.c:289: intel_region_release: Assertion `region->map_refcount == 0' failed.

(gdb) bt
#0  0x00737416 in __kernel_vsyscall ()
#1  0x008fd941 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x00900e42 in abort () at abort.c:92
#3  0x008f68e8 in __assert_fail (
    assertion=0x12112db "region->map_refcount == 0", 
    file=0x1211299 "intel_regions.c", line=289, 
    function=0x1211447 "intel_region_release") at assert.c:81
#4  0x00f4d3f2 in intel_region_release (region_handle=0xa489bb4)
    at intel_regions.c:289
#5  0x00f508dd in intel_miptree_release (intel=0xa155ef8, mt=0xa489350)
    at intel_mipmap_tree.c:204
#6  0x00f54ee0 in intel_finalize_mipmap_tree (intel=0xa155ef8, unit=0)
    at intel_tex_validate.c:162
#7  0x00f5aa7f in i915_update_tex_unit (intel=0xa155ef8, unit=0, ss3=0)
    at i915_texstate.c:153
#8  0x00f5b38c in i915UpdateTextureState (intel=0xa155ef8)
    at i915_texstate.c:392
#9  0x00fbe143 in intelRunPipeline (ctx=0xa155ef8) at intel_tris.c:1063
#10 0x010a0a4a in _tnl_draw_prims (ctx=0xa155ef8, arrays=0xa19c438, 
    prim=0xbfcfd45c, nr_prims=1, ib=0x0, min_index=0, max_index=3)
    at tnl/t_draw.c:478
#11 0x010a07b7 in _tnl_vbo_draw_prims (ctx=0xa155ef8, arrays=0xa19c438, 
    prim=0xbfcfd45c, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', 
    min_index=0, max_index=3) at tnl/t_draw.c:384
#12 0x0109013e in vbo_draw_arrays (ctx=0xa155ef8, mode=6, start=0, count=4, 
    numInstances=1) at vbo/vbo_exec_array.c:588
#13 0x01090295 in vbo_exec_DrawArrays (mode=6, start=0, count=4)
    at vbo/vbo_exec_array.c:619
#14 0x01091851 in _mesa_DrawArrays (mode=6, first=0, count=4)
    at vbo/vbo_exec_array.c:1223
#15 0x01137191 in _mesa_meta_DrawPixels (ctx=0xa155ef8, x=0, y=0, width=16, 
    height=16, format=6410, type=5121, unpack=0xa164bc8, pixels=0xa48ec78)
    at drivers/common/meta.c:1970
#16 0x00f575af in intelDrawPixels (ctx=0xa155ef8, x=0, y=0, width=16, 
    height=16, format=6410, type=5121, unpack=0xa164bc8, pixels=0xa48ec78)
    at intel_pixel_draw.c:56
#17 0x011b42da in _mesa_DrawPixels (width=16, height=16, format=6410, 
    type=5121, pixels=0xa48ec78) at main/drawpix.c:96
#18 0x08107463 in GLEAN::PixelFormatsTest::DrawImage (this=0x81b99c0, 
    width=16, height=16, format=6410, type=5121, intFormat=0, 
    image=0xa48ec78 "\377")
    at piglit/tests/glean/tpixelformats.cpp:794
#19 0x081085cc in GLEAN::PixelFormatsTest::TestCombination (this=0x81b99c0, 
    format=6410, type=5121, intFormat=0)
    at piglit/tests/glean/tpixelformats.cpp:1237
#20 0x08108971 in GLEAN::PixelFormatsTest::runOne (this=0x81b99c0, r=..., w=
    ...) at piglit/tests/glean/tpixelformats.cpp:1371
#21 0x080c591e in GLEAN::BaseTest<GLEAN::MultiTestResult>::run (
    this=0x81b99c0, environment=...)
    at piglit/tests/glean/tbase.h:325
#22 0x080bdc46 in main (argc=7, argv=0xbfcfda24)
    at piglit/tests/glean/main.cpp:141

(gdb) frame 4
#4  0x00f4d3f2 in intel_region_release (region_handle=0xa489bb4)
    at intel_regions.c:289
289	      assert(region->map_refcount == 0);
(gdb) print region->map_refcount
$1 = 1
Comment 1 Eric Anholt 2011-07-12 14:42:24 UTC
commit 6e6b38860488a0b2b282866f095cea9860503a14
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Jul 11 11:32:04 2011 -0700

    i915: Fix map/unmap mismatches from leaving INTEL_FALLBACK during TNL.
    The first rendering after context create didn't know of the color
    buffer yet, triggering a sw fallback.  The intel_prepare_render() from
    intelSpanRenderStart then found the buffer and turned off fallbacks,
    but intelSpanRenderFinish was never called and things were left
    mapped.  By checking buffers before making the call on whether to do
    the fallback pipeline or not, we avoid the fallback change inside of
    the rendering pipeline.
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31561
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Comment 2 Vinson Lee 2011-08-18 19:34:33 UTC
mesa: 09042e08cbdfe61bb860a9d62151e136e6e278a4 (master)

Verified fixed.