Bug 15881 - [i915 i965] glean case api2/fragProg1/texCombine/vertProg1 failed with assertion failure
Summary: [i915 i965] glean case api2/fragProg1/texCombine/vertProg1 failed with assert...
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-08 19:55 UTC by Shuang He
Modified: 2008-05-22 17:58 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg log (20.40 KB, text/plain)
2008-05-08 19:57 UTC, Shuang He
Details
xorg conf (3.82 KB, text/plain)
2008-05-08 19:58 UTC, Shuang He
Details

Description Shuang He 2008-05-08 19:55:46 UTC
System Environment:
--------------------------

--Platform: 915G, G33, G965


--2D driver:
commit 548d4c0f979a72eac5d0c9c76da12f0bd05e64e1 

--3D driver:
commit 990e010394a2685c1daeaef61cf4f7e2a0ba419e

--Xserver:
commit cf20df39cc78203d17b99223908af388ecbf7d0e 

--Drm
commit b44f2da380e78769b58c751e81f376f0fa1f48aa 

--Kernel:
2.6.23.1


Bug detailed description:
-------------------------
glean case api2/fragProg1/texCombine/vertProg1 failed with following assertion failure:

glean: shader/program.c:306: _mesa_delete_program: Assertion `prog->RefCount==0' failed.

and I see api2 only failure on i965

back trace:
0x0000003a38c30ec5 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x0000003a38c30ec5 in raise () from /lib64/libc.so.6
#1  0x0000003a38c32970 in abort () from /lib64/libc.so.6
#2  0x0000003a38c2a11f in __assert_fail () from /lib64/libc.so.6
#3  0x00007f638dc08bbc in _mesa_delete_program (ctx=<value optimized out>,
	prog=0x8ba450) at shader/program.c:306
#4  0x00007f638dc1153d in _mesa_free_shader (ctx=0x5cc100, sh=0x8ba360)
	at shader/shader_api.c:251
#5  0x00007f638dc1243d in _mesa_reference_shader (ctx=0x5cc100, ptr=0x8c9690,
	sh=0x0) at shader/shader_api.c:288
#6  0x00007f638dc1288d in _mesa_free_shader_program_data (ctx=0x5cc100,
	shProg=0x8c95f0) at shader/shader_api.c:126
#7  0x00007f638dc128f9 in _mesa_free_shader_program (ctx=0xcfa, shProg=0xcfa)
	at shader/shader_api.c:148
#8  0x00007f638dc1299d in _mesa_reference_shader_program (ctx=0x5cc100,
	ptr=0x5df2a8, shProg=0x0) at shader/shader_api.c:184
#9  0x0000000000412a8b in GLEAN::API2Test::testShaderObjectFuncs (
	this=0x5a8940) at tapi2.cpp:491
#10 0x00000000004114b6 in GLEAN::API2Test::runSubTests (this=0x5a8940,
	r=@0x8b9870) at tapi2.cpp:990
#11 0x000000000041361c in GLEAN::API2Test::runOne (this=0x5a8940, r=@0x8b9870,
	w=<value optimized out>) at tapi2.cpp:1007
#12 0x00000000004140d7 in GLEAN::BaseTest<GLEAN::MultiTestResult>::run (
	this=0x5a8940, environment=<value optimized out>) at tbase.h:290
---Type <return> to continue, or q <return> to quit---
#13 0x000000000040e076 in main (argc=6, argv=<value optimized out>)
	at main.cpp:128


Reproduce steps:
----------------
1. start X
2. ./glean -r log -t "api2 fragProg1 vertPorg1"



Current result:
----------------
glean: shader/program.c:306: _mesa_delete_program: Assertion `prog->RefCount==0' failed.
test.sh: line 12:  4346 Aborted                 ./glean -o -r test -t api2


Expected result:
----------------
glean case api2/fragProg1/texCombine/vertProg1 should pass
Comment 1 Shuang He 2008-05-08 19:57:54 UTC
Created attachment 16441 [details]
xorg log
Comment 2 Shuang He 2008-05-08 19:58:15 UTC
Created attachment 16442 [details]
xorg conf
Comment 3 Shuang He 2008-05-13 22:23:06 UTC
this issue is caused by following commit:

author	Brian <brian.paul@tungstengraphics.com>
	 Wed, 7 May 2008 05:08:51 +0000 (23:08 -0600)
committer	Brian <brian.paul@tungstengraphics.com>
	 Wed, 7 May 2008 05:08:51 +0000 (23:08 -0600)
commit	df43fb661b2030d9b833a42dd47b8d7bf58d73aa


implement full reference counting for vertex/fragment programs

Use _mesa_reference_vert/fragprog() wherever we assign program pointers.
Fixes a memory corruption bug found with glean/api2 test.
Comment 4 Gordon Jin 2008-05-18 23:10:38 UTC
Brian, any comments?
Comment 5 Brian Paul 2008-05-19 07:46:51 UTC
Fix committed to git.  Please re-test and update.
Comment 6 Shuang He 2008-05-22 17:57:46 UTC
(In reply to comment #5)
> Fix committed to git.  Please re-test and update.
> 

yeah, this issue has gone with git tip. Thanks, Brian.
Comment 7 Shuang He 2008-05-22 17:58:01 UTC
verified. thanks


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.