Bug 32308

Summary: [llvmpipe] src/gallium/auxiliary/gallivm/lp_bld_init.c:319:gallivm_register_garbage_collector_callback: Assertion `NumCallbacks < 32' failed.
Product: Mesa Reporter: Vinson Lee <vlee>
Component: OtherAssignee: Brian Paul <brianp>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: medium CC: jfonseca
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2010-12-10 18:48:04 UTC
mesa: 783e7caadf945f176cb297b8791769e2855fc9ef (master)

Go to WebGL Conformance Test Runner at https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/webgl-conformance-tests.html.

Click 'run tests'. llvmpipe crashes at the gl-bind-attrib-location-test test. Running that test by itself does not trigger the crash.


src/gallium/auxiliary/gallivm/lp_bld_init.c:319:gallivm_register_garbage_collector_callback: Assertion `NumCallbacks < 32' failed.


(gdb) bt
#0  0xa8358940 in _debug_assert_fail (expr=0xa8c94cc8 "NumCallbacks < 32", file=0xa8c94c34 "src/gallium/auxiliary/gallivm/lp_bld_init.c", line=319, 
    function=0xa8c94d20 "gallivm_register_garbage_collector_callback") at src/gallium/auxiliary/util/u_debug.c:234
#1  0xa839456d in gallivm_register_garbage_collector_callback (func=0xa83a749c <draw_llvm_garbage_collect_callback>, cb_data=0x99bf2000)
    at src/gallium/auxiliary/gallivm/lp_bld_init.c:319
#2  0xa83a824e in draw_llvm_create (draw=0x99bd6000, gallivm=0xa9078c20) at src/gallium/auxiliary/draw/draw_llvm.c:375
#3  0xa830f599 in draw_create_gallivm (pipe=0x99bd5000, gallivm=0xa9078c20) at src/gallium/auxiliary/draw/draw_context.c:91
#4  0xa80c6787 in llvmpipe_create_context (screen=0xb11e7c80, priv=0x0) at src/gallium/drivers/llvmpipe/lp_context.c:189
#5  0xa813a4a7 in st_api_create_context (stapi=0xa8e632a0, smapi=0xa905b5d0, attribs=0xbf832db0, shared_stctxi=0xa7480000) at src/mesa/state_tracker/st_manager.c:676
#6  0xa811b8f6 in XMesaCreateContext (v=0x9ade9d00, share_list=0xa905b630) at src/gallium/state_trackers/glx/xlib/xm_api.c:880
#7  0xa81202ba in glXCreateNewContext (dpy=0xb7550000, config=0x9ade9d00, renderType=32788, shareList=0xa9078c00, direct=1)
    at src/gallium/state_trackers/glx/xlib/glx_api.c:2105
#8  0x018da1af in mozilla::gl::GLContextGLX::CreateGLContext (format=..., display=0xb7550000, drawable=62946823, cfg=0x9ade9d00, vinfo=0xaac20f70, 
    shareContext=0xa90d4000, deleteDrawable=1, pixmap=0xaac20fa0) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/gfx/thebes/GLContextProviderGLX.cpp:192
#9  0x018d96d8 in mozilla::gl::CreateOffscreenPixmapContext (aFormat=..., aShare=1, aSize=<value optimized out>)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/gfx/thebes/GLContextProviderGLX.cpp:624
#10 0x00000001 in ?? ()
#11 0x018d97bb in mozilla::gl::GLContextProviderGLX::CreateOffscreen (aSize=..., aFormat=...)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/gfx/thebes/GLContextProviderGLX.cpp:635
#12 0x01110242 in mozilla::WebGLContext::SetDimensions (this=0xa6dc10c0, width=1, height=1)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/content/canvas/src/WebGLContext.cpp:395
#13 0x0111061b in mozilla::WebGLContext::SetIsOpaque (this=0xa6dc10c0, b=1)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/content/canvas/src/WebGLContext.h:307
#14 0x0115b853 in nsHTMLCanvasElement::UpdateContext (this=0xa351c240)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/content/html/content/src/nsHTMLCanvasElement.cpp:514
#15 0x0115be3b in nsHTMLCanvasElement::GetContext (this=0xa351c240, aContextId=..., aContext=0xbf83310c)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/content/html/content/src/nsHTMLCanvasElement.cpp:447
#16 0x014e6854 in nsIDOMHTMLCanvasElement_GetContext (cx=0xaab23210, argc=2, vp=0xb37fd0b8) at dom_quickstubs.cpp:20968
#17 0x01b4594e in CallJSNative (this=0xbf8336ec) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/js/src/jscntxtinlines.h:684
#18 CallCompiler::generateNativeStub (this=0xbf8336ec) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/js/src/methodjit/MonoIC.cpp:627
#19 0x01b3c0ec in js::mjit::ic::NativeCall (f=<value optimized out>, ic=0x9991cae8)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/js/src/methodjit/MonoIC.cpp:851
#20 0x0833c845 in ?? ()
#21 0x01aec02f in EnterMethodJIT (cx=0xaab23210) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/js/src/methodjit/MethodJIT.cpp:739
#22 CheckStackAndEnterMethodJIT (cx=0xaab23210) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/js/src/methodjit/MethodJIT.cpp:764
#23 js::mjit::JaegerShot (cx=0xaab23210) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/js/src/methodjit/MethodJIT.cpp:781
#24 0x019ad82f in RunScript (cx=0xaab23210, chain=0xb2dcec08, script=0xa394b800, prev=0x0, flags=0, result=0x0)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/js/src/jsinterp.cpp:662
#25 js::Execute (cx=0xaab23210, chain=0xb2dcec08, script=0xa394b800, prev=0x0, flags=0, result=0x0)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/js/src/jsinterp.cpp:1008
#26 0x01936c8d in JS_EvaluateUCScriptForPrincipals (cx=0xaab23210, obj=0xb2dcec08, principals=0xa338cb04, chars=0x99bab008, length=1334, 
    filename=0xa31fa3a8 "https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/gl-clear.html", lineno=19, rval=0x0)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/js/src/jsapi.cpp:4819
#27 0x01937026 in JS_EvaluateUCScriptForPrincipalsVersion (cx=0xaab23210, obj=0xb2dcec08, principals=0xa338cb04, chars=0x99bab008, length=1334, 
    filename=0xa31fa3a8 "https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/gl-clear.html", lineno=19, rval=0x0, 
    version=JSVERSION_DEFAULT) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/js/src/jsapi.cpp:4795
#28 0x0121e6af in nsJSContext::EvaluateString (this=0xa91d9a00, aScript=..., aScopeObject=0xb2dcec08, aPrincipal=0xa338cb00, 
    aURL=0xa31fa3a8 "https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/gl-clear.html", aLineNo=19, aVersion=0, aRetValue=0x0, 
    aIsUndefined=0xbf8339e4) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/dom/base/nsJSEnvironment.cpp:1731
#29 0x010e34f5 in nsScriptLoader::EvaluateScript (this=0x99b3ed40, aRequest=0xaac20d30, aScript=...)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/content/base/src/nsScriptLoader.cpp:845
#30 0x010e37af in nsScriptLoader::ProcessRequest (this=0x99b3ed40, aRequest=0xaac20d30)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/content/base/src/nsScriptLoader.cpp:748
#31 0x010e52a7 in nsScriptLoader::ProcessScriptElement (this=0x99b3ed40, aElement=0x99b8ad94)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/content/base/src/nsScriptLoader.cpp:700
#32 0x010e2875 in nsScriptElement::MaybeProcessScript (this=0x99b8ad94)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/content/base/src/nsScriptElement.cpp:197
#33 0x01180708 in nsHTMLScriptElement::MaybeProcessScript (this=0x99b8ad60)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/content/html/content/src/nsHTMLScriptElement.cpp:551
#34 0x0117ff67 in nsHTMLScriptElement::DoneAddingChildren (this=0x99b8ad60, aHaveNotified=1)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/content/html/content/src/nsHTMLScriptElement.cpp:480
#35 0x012edffb in nsHtml5TreeOpExecutor::RunScript (this=0x9a7315d0, aScriptElement=0x99b8ad60)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/parser/html/nsHtml5TreeOpExecutor.cpp:730
#36 0x012eea37 in nsHtml5TreeOpExecutor::RunFlushLoop (this=0x9a7315d0)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/parser/html/nsHtml5TreeOpExecutor.cpp:525
#37 0x012eec75 in nsHtml5ExecutorReflusher::Run (this=0x99bac950) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/parser/html/nsHtml5TreeOpExecutor.cpp:90
#38 0x0184a54d in nsThread::ProcessNextEvent (this=0xb75dc9c0, mayWait=1, result=0xbf83424c)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/xpcom/threads/nsThread.cpp:609
#39 0x0181584e in NS_ProcessNextEvent_P (thread=<value optimized out>, mayWait=1) at nsThreadUtils.cpp:250
#40 0x0184a7e7 in nsThread::Shutdown (this=0xa351c6f0) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/xpcom/threads/nsThread.cpp:491
#41 0x01857aa3 in NS_InvokeByIndex_P () from /usr/lib/firefox-4.0b7/libxul.so
#42 0x0184ee1c in nsProxyObjectCallInfo::Run (this=0x9bdff2e0) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/xpcom/proxy/src/nsProxyEvent.cpp:181
#43 0x0184a54d in nsThread::ProcessNextEvent (this=0xb75dc9c0, mayWait=0, result=0xbf83435c)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/xpcom/threads/nsThread.cpp:609
#44 0x0181584e in NS_ProcessNextEvent_P (thread=<value optimized out>, mayWait=0) at nsThreadUtils.cpp:250
#45 0x0175fe7b in mozilla::ipc::MessagePump::Run (this=0xb75d6910, aDelegate=0xb75216e0)
    at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/ipc/glue/MessagePump.cpp:110
#46 0x0187c0fc in MessageLoop::RunInternal (this=0xb75216e0) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/ipc/chromium/src/base/message_loop.cc:219
#47 0x0187c160 in RunHandler (this=0xb75216e0) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/ipc/chromium/src/base/message_loop.cc:202
#48 MessageLoop::Run (this=0xb75216e0) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/ipc/chromium/src/base/message_loop.cc:176
#49 0x016b9c1b in nsBaseAppShell::Run (this=0xb36d3560) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/widget/src/xpwidgets/nsBaseAppShell.cpp:181
#50 0x015835f2 in nsAppStartup::Run (this=0xb3576d60) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/toolkit/components/startup/src/nsAppStartup.cpp:191
#51 0x00e0ba18 in XRE_main (argc=1, argv=0xbf834b24, aAppData=0xb750e380) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/toolkit/xre/
#52 0x080494c2 in main (argc=1, argv=0xbf834b24) at /build/buildd/firefox-4.0~b7+nobinonly/build-tree/mozilla/browser/app/nsBrowserApp.cpp:158
(gdb) frame 1
#1  0xa839456d in gallivm_register_garbage_collector_callback (func=0xa83a749c <draw_llvm_garbage_collect_callback>, cb_data=0x99bf2000)
    at src/gallium/auxiliary/gallivm/lp_bld_init.c:319
319	   assert(NumCallbacks < MAX_CALLBACKS);
(gdb) print NumCallbacks
$1 = 32
(gdb) print MAX_CALLBACKS
$2 = 32
Comment 1 Brian Paul 2010-12-13 10:49:07 UTC
I don't have a webGL browser set up yet, but this commit should fix it:
b363dd43d6f7f63bfe5261a46f8bdb2024f85db1

Can you retest, Vinson?
Comment 2 Vinson Lee 2010-12-13 12:21:13 UTC
mesa: b363dd43d6f7f63bfe5261a46f8bdb2024f85db1 (master)

The WebGL Conformance Test Runner ran to completion.

Results: (3532 of 3754 passed, 5 timed out)
Comment 3 Vinson Lee 2011-01-13 15:57:52 UTC
mesa: a2ab929ab2d7dd4fcbbc5f32c8feabf42cad4d34 (master)

The WebGL Conformance Test Runner ran to completion.

Results: (5188 of 5296 passed, 4 timed out)

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.