Bug 18035 - [i915 i965 gem-classic] glean case texCube deadlock
Summary: [i915 i965 gem-classic] glean case texCube deadlock
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Eric Anholt
QA Contact:
Depends on:
Reported: 2008-10-12 19:54 UTC by Shuang He
Modified: 2008-10-13 19:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

xorg conf (3.57 KB, text/plain)
2008-10-12 20:04 UTC, Shuang He
xorg log (47.16 KB, text/plain)
2008-10-12 20:05 UTC, Shuang He

Note You need to log in before you can comment on or make changes to this bug.
Description Shuang He 2008-10-12 19:54:02 UTC
System Environment:

--Platform: G33 GM45


Kernel: 2.6.27-rc5

Libdrm: c6109df93bc062d3ec2ff2808babe826532d11b3
Mesa:   (intel-2008-q3)46921a5ee832a3443894dcc98e065d2f535e899d
2D driver:(xf86-video-intel-2.5-branch)979bb109c6d76fe18b9e29f55afb2548f890bbfe

Bug detailed description:
glean/texCube deadlock:
Program received signal SIGINT, Interrupt.
[Switching to Thread -1210886448 (LWP 16198)]
0xb7fc3424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fc3424 in __kernel_vsyscall ()
#1  0x00d6d119 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x00d6889e in _L_lock_88 () from /lib/libpthread.so.0
#3  0x00d683aa in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x00cb47c6 in pthread_mutex_lock () from /lib/libc.so.6
#5  0xb7ad0170 in dri_fake_bo_wait_rendering (bo=0x83f5788)
    at intel_bufmgr_fake.c:725
#6  0xb7ad0e16 in dri_fake_bo_map_locked (bo=0x83f5788, write_enable=1)
    at intel_bufmgr_fake.c:990
#7  0xb7ad0ef5 in dri_fake_bo_map (bo=0x83f5788, write_enable=1)
    at intel_bufmgr_fake.c:1010
#8  0xb7acf009 in dri_bo_map (buf=0x83f5788, write_enable=1)
    at intel_bufmgr.c:72
#9  0xb7b05dd9 in intel_region_map (intel=0x810ff38, region=0x83f57e8)
    at intel_regions.c:65
#10 0xb7b04a83 in intel_miptree_image_map (intel=0x810ff38, mt=0x83f5628,
    face=0, level=0, row_stride=0x83f3dec, image_offsets=0x8131c68)
    at intel_mipmap_tree.c:407
#11 0xb7b18884 in intel_tex_map_level_images (intel=0x810ff38,
    intelObj=0x812b728, level=0) at intel_tex_validate.c:247
#12 0xb7b188f6 in intel_tex_map_images (intel=0x810ff38, intelObj=0x812b728)
    at intel_tex_validate.c:289
#13 0xb7b08251 in intelSpanRenderStart (ctx=0x810ff38) at intel_span.c:662
---Type <return> to continue, or q <return> to quit---
#14 0xb7cb6a4c in _swrast_ReadPixels (ctx=0x810ff38, x=1, y=1, width=1,
    height=1, format=6407, type=5126, packing=0x811bbb8, pixels=0xbfcc31d0)
    at swrast/s_readpix.c:562
#15 0xb7c80bd2 in _mesa_ReadPixels (x=1, y=1, width=1, height=1, format=6407,
    type=5126, pixels=0xbfcc31d0) at main/drawpix.c:336
#16 0x0809ab33 in GLEAN::TexCubeTest::TestNormalMap (this=0x80f4840,
    modeName=0x80d2df0 "Direct specification of texture coordinates")
    at ttexcube.cpp:179
#17 0x0809b129 in GLEAN::TexCubeTest::runOne (this=0x80f4840, r=@0x8131db8,
    w=@0xbfcc32a4) at ttexcube.cpp:381
#18 0x0805b9bc in GLEAN::BaseTest<GLEAN::BasicResult>::run (this=0x80f4840,
    environment=@0xbfcc3330) at tbase.h:290
#19 0x080544bb in main (argc=6, argv=0xbfcc3474) at main.cpp:128

Current result:
glean/texCube deadlock at some point

Expected result:
run normally
Comment 1 Shuang He 2008-10-12 19:57:24 UTC
this issue seems caused by this commit:
commit 3169d9639bd002b43e4064cea32e0d262076c1e0
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Jun 12 23:22:26 2008 -0700

    intel: Protect bufmgr objects with a pthread mutex.

    We want to be able to use the bufmgr from multiple threads for GL, and thus
    we need to protect the internal structures.

    The pthread-stubs package is used so that programs not linked against
    pthreads get weak symbols to stubs and don't eat most of the cost.
Comment 2 Shuang He 2008-10-12 20:04:17 UTC
Created attachment 19612 [details]
xorg conf
Comment 3 Shuang He 2008-10-12 20:05:06 UTC
Created attachment 19613 [details]
xorg log
Comment 4 Eric Anholt 2008-10-13 13:44:36 UTC
commit 3e03d781f7c41a88d5d5f895be9c443bf3592ef0
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Oct 13 13:41:10 2008 -0700

    intel: Avoid pthread mutex recursion in bufmgr_fake.
    Bug #18035. Fixes deadlock in glean texCube testcase.
Comment 5 Shuang He 2008-10-13 19:30:18 UTC
verified against drm d9c2f65dd8e50736a33e97a55c257ef6843e1ce7

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.