Last Comment Bug 659560 - SIGSEGV with OpenGL layers and in classic r600 _mesa_glsl_parse_state under GLContext::fCompileShader
: SIGSEGV with OpenGL layers and in classic r600 _mesa_glsl_parse_state under G...
Status: VERIFIED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla8
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: ogl-linux-beta
  Show dependency treegraph
 
Reported: 2011-05-24 20:59 PDT by Karl Tomlinson (:karlt)
Modified: 2011-10-03 04:46 PDT (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
Require Mesa 7.10.3 (4.04 KB, patch)
2011-07-30 21:25 PDT, Matt Woodrow (:mattwoodrow)
jacob.benoit.1: review+
Details | Diff | Splinter Review
Require Mesa 7.10.3 v2 (4.20 KB, patch)
2011-08-04 18:06 PDT, Matt Woodrow (:mattwoodrow)
matt.woodrow: review+
bugzilla: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Karl Tomlinson (:karlt) 2011-05-24 20:59:21 PDT
I see this sometimes but not reliably-reproducibly when opening menus for the first time or when when remember-password doorhanger begins to appear.

#4  <signal handler called>
#5  __strlen_sse42 () at ../sysdeps/x86_64/multiarch/strlen.S:64
#6  0x00007f5dd0f8fc7b in ralloc_vasprintf_append (str=0x7fff639d2778, fmt=0x7f5dd10d545f "%s%d.%02d%s", args=0x7fff639d2690) at ralloc.c:432
#7  0x00007f5dd0f8fdbd in ralloc_asprintf_append (str=0x7f5dde8ffff0, fmt=0x7f5dd10d545f "%s%d.%02d%s") at ralloc.c:413
#8  0x00007f5dd0fa978d in _mesa_glsl_parse_state::_mesa_glsl_parse_state (this=0x7f5d789f9930, ctx=<value optimized out>, target=<value optimized out>, mem_ctx=<value optimized out>) at glsl_parser_extras.cpp:110
#9  0x00007f5dd0f899e3 in _mesa_glsl_compile_shader (ctx=0x7f5d793e7000, shader=0x7f5d788b2230) at program/ir_to_mesa.cpp:2945
#10 0x00007f5e1a2143bc in mozilla::gl::GLContext::fCompileShader (this=0x7f5d79ae3800, shader=148) at ../../../dist/include/GLContext.h:1851
#11 0x00007f5e1b3adf08 in mozilla::layers::LayerManagerOGLProgram::CreateShader (this=0x7f5db62b2800, aShaderType=35633, aShaderSource=0x7f5e1beb9500 "/* sLayerVS */\n/* Vertex Shader */\n\nuniform mat4 uMatrixProj;\nuniform mat4 uLayerQuadTransform;\nuniform mat4 uLayerTransform;\nuniform vec4 uRenderTargetOffset;\nattribute vec4 aVertexCoord;\nattribute v"...) at /home/karl/moz/dev/gfx/layers/opengl/LayerManagerOGLProgram.h:231
#12 0x00007f5e1b3ae1a4 in mozilla::layers::LayerManagerOGLProgram::CreateProgram (this=0x7f5db62b2800, aVertexShaderString=0x7f5e1beb9500 "/* sLayerVS */\n/* Vertex Shader */\n\nuniform mat4 uMatrixProj;\nuniform mat4 uLayerQuadTransform;\nuniform mat4 uLayerTransform;\nuniform vec4 uRenderTargetOffset;\nattribute vec4 aVertexCoord;\nattribute v"..., aFragmentShaderString=0x7f5e1beb9ae0 "/* sRGBARectTextureLayerFS */\n#extension GL_ARB_texture_rectangle : enable\n/* Fragment Shader */\n#ifdef GL_ES\nprecision lowp float;\n#endif\n\n#ifndef NO_LAYER_OPACITY\nuniform float uLayerOpacity;\n#endif"...) at /home/karl/moz/dev/gfx/layers/opengl/LayerManagerOGLProgram.h:271
#13 0x00007f5e1b3ae91d in mozilla::layers::LayerProgram::Initialize (this=0x7f5db62b2800, aVertexShaderString=0x7f5e1beb9500 "/* sLayerVS */\n/* Vertex Shader */\n\nuniform mat4 uMatrixProj;\nuniform mat4 uLayerQuadTransform;\nuniform mat4 uLayerTransform;\nuniform vec4 uRenderTargetOffset;\nattribute vec4 aVertexCoord;\nattribute v"..., aFragmentShaderString=0x7f5e1beb9ae0 "/* sRGBARectTextureLayerFS */\n#extension GL_ARB_texture_rectangle : enable\n/* Fragment Shader */\n#ifdef GL_ES\nprecision lowp float;\n#endif\n\n#ifndef NO_LAYER_OPACITY\nuniform float uLayerOpacity;\n#endif"...) at /home/karl/moz/dev/gfx/layers/opengl/LayerManagerOGLProgram.h:418
#14 0x00007f5e1b3aebfe in mozilla::layers::ColorTextureLayerProgram::Initialize (this=0x7f5db62b2800, aVertexShaderString=0x7f5e1beb9500 "/* sLayerVS */\n/* Vertex Shader */\n\nuniform mat4 uMatrixProj;\nuniform mat4 uLayerQuadTransform;\nuniform mat4 uLayerTransform;\nuniform vec4 uRenderTargetOffset;\nattribute vec4 aVertexCoord;\nattribute v"..., aFragmentShaderString=0x7f5e1beb9ae0 "/* sRGBARectTextureLayerFS */\n#extension GL_ARB_texture_rectangle : enable\n/* Fragment Shader */\n#ifdef GL_ES\nprecision lowp float;\n#endif\n\n#ifndef NO_LAYER_OPACITY\nuniform float uLayerOpacity;\n#endif"...) at /home/karl/moz/dev/gfx/layers/opengl/LayerManagerOGLProgram.h:526
#15 0x00007f5e1b3a995f in mozilla::layers::LayerManagerOGL::Initialize (this=0x7f5d7880e4a0, aContext=...) at /home/karl/moz/dev/gfx/layers/opengl/LayerManagerOGL.cpp:227
#16 0x00007f5e1af3e471 in mozilla::layers::LayerManagerOGL::Initialize (this=0x7f5d7880e4a0) at ../../../dist/include/LayerManagerOGL.h:110
#17 0x00007f5e1af3bdf0 in nsBaseWidget::GetLayerManager (this=0x7f5d789f9180, aAllowRetaining=0x0) at /home/karl/moz/dev/widget/src/xpwidgets/nsBaseWidget.cpp:880
#18 0x00007f5e19d8301a in nsIWidget::GetLayerManager (this=0x7f5d789f9180, aAllowRetaining=0x0) at ../../dist/include/nsIWidget.h:906
#19 0x00007f5e1af01bc2 in nsWindow::OnExposeEvent (this=0x7f5d789f9180, aWidget=0x7f5d7886a680, aEvent=0x7fff639d38e0) at /home/karl/moz/dev/widget/src/gtk2/nsWindow.cpp:2207

A hang occurred in a similar place on restart:

#8  0x00007f377dc6478d in _mesa_glsl_parse_state::_mesa_glsl_parse_state (this=0x7f377e314230, ctx=<value optimized out>, target=<value optimized out>, mem_ctx=<value optimized out>) at glsl_parser_extras.cpp:110
#9  0x00007f377dc519c1 in read_builtins (target=35633, protos=0x7f377dd30860 "(\n(function radians\n  (signature float\n    (parameters\n      (declare (in) float degrees))\n    ())\n  (signature vec2\n    (parameters\n      (declare (in) vec2 degrees))\n    ())\n  (signature vec3\n    (p"..., functions=<value optimized out>, count=72) at builtin_function.cpp:42
#10 0x00007f377dc51b50 in _mesa_read_profile (state=0x7f377e3140b0, instructions=<value optimized out>, profile_index=3, prototypes=0xa5 <Address 0xa5 out of bounds>, functions=0x106200, count=1048576) at builtin_function.cpp:13535
#11 0x00007f377dc51de4 in _mesa_glsl_initialize_functions (instructions=0x7f377b4fdb80, state=0x7f377e3140b0) at builtin_function.cpp:13580
#12 0x00007f377dc516f3 in _mesa_ast_to_hir (instructions=0x7f377b4fdb80, state=0x7f377e3140b0) at ast_to_hir.cpp:63
#13 0x00007f377dc44a85 in _mesa_glsl_compile_shader (ctx=0x7f377c6aa000, shader=0x7f377e36bd30) at program/ir_to_mesa.cpp:2973
#14 0x00007f37e30523bc in mozilla::gl::GLContext::fCompileShader (this=0x7f377c6c8000, shader=1) at ../../../dist/include/GLContext.h:1851
#15 0x00007f37e41ebf08 in mozilla::layers::LayerManagerOGLProgram::CreateShader (this=0x7f377c6d06c0, aShaderType=35633, aShaderSource=0x7f37e4cf7500 "/* sLayerVS */\n/* Vertex Shader */\n\nuniform mat4 uMatrixProj;\nuniform mat4 uLayerQuadTransform;\nuniform mat4 uLayerTransform;\nuniform vec4 uRenderTargetOffset;\nattribute vec4 aVertexCoord;\nattribute v"...) at /home/karl/moz/dev/gfx/layers/opengl/LayerManagerOGLProgram.h:231
#16 0x00007f37e41ec1a4 in mozilla::layers::LayerManagerOGLProgram::CreateProgram (this=0x7f377c6d06c0, aVertexShaderString=0x7f37e4cf7500 "/* sLayerVS */\n/* Vertex Shader */\n\nuniform mat4 uMatrixProj;\nuniform mat4 uLayerQuadTransform;\nuniform mat4 uLayerTransform;\nuniform vec4 uRenderTargetOffset;\nattribute vec4 aVertexCoord;\nattribute v"..., aFragmentShaderString=0x7f37e4cf7940 "/* sRGBATextureLayerFS */\n/* Fragment Shader */\n#ifdef GL_ES\nprecision lowp float;\n#endif\n\n#ifndef NO_LAYER_OPACITY\nuniform float uLayerOpacity;\n#endif\n#ifdef GL_ES // for tiling, texcoord can be grea"...) at /home/karl/moz/dev/gfx/layers/opengl/LayerManagerOGLProgram.h:271
#17 0x00007f37e41ec91d in mozilla::layers::LayerProgram::Initialize (this=0x7f377c6d06c0, aVertexShaderString=0x7f37e4cf7500 "/* sLayerVS */\n/* Vertex Shader */\n\nuniform mat4 uMatrixProj;\nuniform mat4 uLayerQuadTransform;\nuniform mat4 uLayerTransform;\nuniform vec4 uRenderTargetOffset;\nattribute vec4 aVertexCoord;\nattribute v"..., aFragmentShaderString=0x7f37e4cf7940 "/* sRGBATextureLayerFS */\n/* Fragment Shader */\n#ifdef GL_ES\nprecision lowp float;\n#endif\n\n#ifndef NO_LAYER_OPACITY\nuniform float uLayerOpacity;\n#endif\n#ifdef GL_ES // for tiling, texcoord can be grea"...) at /home/karl/moz/dev/gfx/layers/opengl/LayerManagerOGLProgram.h:418
#18 0x00007f37e41ecbfe in mozilla::layers::ColorTextureLayerProgram::Initialize (this=0x7f377c6d06c0, aVertexShaderString=0x7f37e4cf7500 "/* sLayerVS */\n/* Vertex Shader */\n\nuniform mat4 uMatrixProj;\nuniform mat4 uLayerQuadTransform;\nuniform mat4 uLayerTransform;\nuniform vec4 uRenderTargetOffset;\nattribute vec4 aVertexCoord;\nattribute v"..., aFragmentShaderString=0x7f37e4cf7940 "/* sRGBATextureLayerFS */\n/* Fragment Shader */\n#ifdef GL_ES\nprecision lowp float;\n#endif\n\n#ifndef NO_LAYER_OPACITY\nuniform float uLayerOpacity;\n#endif\n#ifdef GL_ES // for tiling, texcoord can be grea"...) at /home/karl/moz/dev/gfx/layers/opengl/LayerManagerOGLProgram.h:526
#19 0x00007f37e41e7577 in mozilla::layers::LayerManagerOGL::Initialize (this=0x7f37a79ccaa0, aContext=...) at /home/karl/moz/dev/gfx/layers/opengl/LayerManagerOGL.cpp:219
#20 0x00007f37e3d7c471 in mozilla::layers::LayerManagerOGL::Initialize (this=0x7f37a79ccaa0) at ../../../dist/include/LayerManagerOGL.h:110
#21 0x00007f37e3d79df0 in nsBaseWidget::GetLayerManager (this=0x7f37b3f1d400, aAllowRetaining=0x0) at /home/karl/moz/dev/widget/src/xpwidgets/nsBaseWidget.cpp:880
#22 0x00007f37e2bc101a in nsIWidget::GetLayerManager (this=0x7f37b3f1d400, aAllowRetaining=0x0) at ../../dist/include/nsIWidget.h:906
#23 0x00007f37e3d3fbc2 in nsWindow::OnExposeEvent (this=0x7f37b3f1d400, aWidget=0x7f37b3ffca00, aEvent=0x7fff9b0f33f0) at /home/karl/moz/dev/widget/src/gtk2/nsWindow.cpp:2207
#24 0x00007f37e3d48d76 in expose_event_cb (widget=0x7f37b3ffca00, event=0x7fff9b0f33f0) at /home/karl/moz/dev/widget/src/gtk2/nsWindow.cpp:5561

OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: Mesa DRI R600 (JUNIPER 68A0) 20090101  TCL DRI2
OpenGL version string: 2.1 Mesa 7.10.2
OpenGL shading language version string: 1.20
Comment 1 Nicholas Nethercote [:njn] 2011-07-05 18:58:29 PDT
I see something very similar with a trunk build when running www.ro.me on my Linux64 box.  The crash doesn't always happen, though, and when it does it happens at different times.  This one occurred just after the loading progress bar reached 100%:

#0  0x00007f19fe0375ad in nanosleep ()
    at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f19fe03743c in __sleep (seconds=0)
    at ../sysdeps/unix/sysv/linux/sleep.c:138
#2  0x00007f19fb478d23 in ah_crap_handler (signum=11)
    at /home/njn/moz/mi4/toolkit/xre/nsSigHandlers.cpp:121
#3  0x00007f19fb47dea5 in nsProfileLock::FatalSignalHandler (signo=11, 
    info=0x7fff9332ed30, context=0x7fff9332ec00)
    at /home/njn/moz/mi4/d64/toolkit/profile/nsProfileLock.cpp:226
#4  <signal handler called>
#5  __strlen_sse42 () at ../sysdeps/x86_64/multiarch/strlen-sse4.S:52
#6  0x00007f19d74b3405 in ralloc_vasprintf_append ()
   from /usr/lib/dri/libglsl.so
#7  0x00007f19d74b3534 in ralloc_asprintf_append ()
   from /usr/lib/dri/libglsl.so
#8  0x00007f19d74d4cf9 in _mesa_glsl_parse_state::_mesa_glsl_parse_state(gl_context*, unsigned int, void*) () from /usr/lib/dri/libglsl.so
#9  0x00007f19d7928c57 in _mesa_glsl_compile_shader ()
   from /usr/lib/dri/libdricore.so
#10 0x00007f19fbb562be in fCompileShader (this=0x7f19c36ae400, 
    sobj=<value optimised out>) at ../../../dist/include/GLContext.h:1838
#11 mozilla::WebGLContext::CompileShader (this=0x7f19c36ae400, 
    sobj=<value optimised out>)
    at /home/njn/moz/mi4/content/canvas/src/WebGLContextGL.cpp:3936
#12 0x00007f19fc2ec050 in nsIDOMWebGLRenderingContext_CompileShader (
    cx=0x7f19e5129400, argc=1, vp=0x7f19e91fea28)
    at /home/njn/moz/mi4/d64/js/src/xpconnect/src/dom_quickstubs.cpp:29372
#13 0x00007f19e912beeb in ?? ()
#14 0x00007f19e0985000 in ?? ()
#15 0x00007f19c1b2e4c0 in ?? ()
#16 0x00007fff9332f530 in ?? ()
#17 0x00007fff933300c0 in ?? ()
#18 0x00007fff9332f570 in ?? ()
#19 0x00007f19e91fea40 in ?? ()
#20 0x00007f19d98ea589 in ?? ()
---Type <return> to continue, or q <return> to quit---
#21 0x00007f19e91fe9c8 in ?? ()
#22 0x00007f19e5129400 in ?? ()
#23 0x00007f19e95fe000 in ?? ()
#24 0x00007f19e91fe608 in ?? ()
#25 0x000000000000ffff in ?? ()
#26 0x00007f19e95fe000 in ?? ()
#27 0x00007f19da14f000 in ?? ()
#28 0x00007fff9332f790 in ?? ()
#29 0x00007f19e91fe608 in ?? ()
#30 0x00007f19e5129400 in ?? ()
#31 0x00007f19fce55905 in js::mjit::EnterMethodJIT (cx=0x7fff9332f580, 
    fp=0x7f19c1b42030, code=0x7f19e0985000, stackLimit=0x7f19e91fea40)
    at /home/njn/moz/mi4/js/src/methodjit/MethodJIT.cpp:686
#32 0x00007f19fce5682a in CheckStackAndEnterMethodJIT (cx=0x7f19e5129400)
    at /home/njn/moz/mi4/js/src/methodjit/MethodJIT.cpp:716
#33 js::mjit::JaegerShot (cx=0x7f19e5129400)
    at /home/njn/moz/mi4/js/src/methodjit/MethodJIT.cpp:733
#34 0x00007f19fcf41cac in js::Interpret (cx=<value optimised out>, 
    entryFrame=0x7f19e91fe578, interpMode=js::JSINTERP_NORMAL)
    at /home/njn/moz/mi4/js/src/jsinterp.cpp:4122
#35 0x00007f19fcec7968 in UncachedInlineCall (f=..., 
    construct=js::NO_CONSTRUCT, pret=0x7fff93330040, 
    unjittable=0x7fff93330048, argc=15)
    at /home/njn/moz/mi4/js/src/methodjit/InvokeHelpers.cpp:346
#36 0x00007f19fcec94aa in js::mjit::stubs::UncachedCallHelper (f=..., argc=3, 
    ucr=0x7fff93330030)
    at /home/njn/moz/mi4/js/src/methodjit/InvokeHelpers.cpp:418
#37 0x00007f19fceae4d7 in CallCompiler::update (this=0x7fff93330090)
    at /home/njn/moz/mi4/js/src/methodjit/MonoIC.cpp:963
#38 0x00007f19fcea79dc in js::mjit::ic::Call (f=<value optimised out>, 
    ic=<value optimised out>)
    at /home/njn/moz/mi4/js/src/methodjit/MonoIC.cpp:1017
#39 0x00007f19d2c6be0d in ?? ()
#40 0x0000000000000000 in ?? ()

This one occured when loading the page, before it even showed anything (the tab is still completely grey):

#0  0x00007f2eaa90c5ad in nanosleep ()
    at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f2eaa90c43c in __sleep (seconds=0)
    at ../sysdeps/unix/sysv/linux/sleep.c:138
#2  0x00007f2ea7d78d23 in ah_crap_handler (signum=11)
    at /home/njn/moz/mi4/toolkit/xre/nsSigHandlers.cpp:121
#3  0x00007f2ea7d7dea5 in nsProfileLock::FatalSignalHandler (signo=11, 
    info=0x7fff89ce0170, context=0x7fff89ce0040)
    at /home/njn/moz/mi4/d64/toolkit/profile/nsProfileLock.cpp:226
#4  <signal handler called>
#5  __strlen_sse42 () at ../sysdeps/x86_64/multiarch/strlen-sse4.S:52
#6  0x00007f2e84fb3405 in ralloc_vasprintf_append ()
   from /usr/lib/dri/libglsl.so
#7  0x00007f2e84fb3534 in ralloc_asprintf_append ()
   from /usr/lib/dri/libglsl.so
#8  0x00007f2e84fd4cf9 in _mesa_glsl_parse_state::_mesa_glsl_parse_state(gl_context*, unsigned int, void*) () from /usr/lib/dri/libglsl.so
#9  0x00007f2e85428c57 in _mesa_glsl_compile_shader ()
   from /usr/lib/dri/libdricore.so
#10 0x00007f2ea84562be in fCompileShader (this=0x7f2e7b160800, 
    sobj=<value optimised out>) at ../../../dist/include/GLContext.h:1838
#11 mozilla::WebGLContext::CompileShader (this=0x7f2e7b160800, 
    sobj=<value optimised out>)
    at /home/njn/moz/mi4/content/canvas/src/WebGLContextGL.cpp:3936
#12 0x00007f2ea8bec050 in nsIDOMWebGLRenderingContext_CompileShader (
    cx=0x7f2e8986b400, argc=1, vp=0x7f2e95afe8b0)
    at /home/njn/moz/mi4/d64/js/src/xpconnect/src/dom_quickstubs.cpp:29372
#13 0x00007f2ea95ad021 in CallJSNative (cx=0x7f2e8986b400, 
    argsRef=<value optimised out>, construct=<value optimised out>)
    at /home/njn/moz/mi4/js/src/jscntxtinlines.h:284
#14 js::Invoke (cx=0x7f2e8986b400, argsRef=<value optimised out>, 
    construct=<value optimised out>)
    at /home/njn/moz/mi4/js/src/jsinterp.cpp:656
#15 0x00007f2ea98418c0 in js::Interpret (cx=<value optimised out>, 
    entryFrame=0x7f2e95afe320, interpMode=js::JSINTERP_NORMAL)
    at /home/njn/moz/mi4/js/src/jsinterp.cpp:4085
#16 0x00007f2ea95ac779 in js::RunScript (cx=0x7f2e8986b400, 
    script=0x7f2e86008000, fp=0x7f2e95afe320)
    at /home/njn/moz/mi4/js/src/jsinterp.cpp:613
#17 0x00007f2ea95ad4f7 in js::Invoke (cx=0x7f2e8986b400, 
    argsRef=<value optimised out>, construct=js::NO_CONSTRUCT)
    at /home/njn/moz/mi4/js/src/jsinterp.cpp:686
#18 0x00007f2ea957babe in Invoke (cx=0x7f2e8986b400, 
    argc=<value optimised out>, vp=0x7f2e95afe2f0)
    at /home/njn/moz/mi4/js/src/jsinterp.h:169
#19 js_fun_apply (cx=0x7f2e8986b400, argc=<value optimised out>, 
    vp=0x7f2e95afe2f0) at /home/njn/moz/mi4/js/src/jsfun.cpp:2129
#20 0x00007f2ea95ad021 in CallJSNative (cx=0x7f2e8986b400, 
    argsRef=<value optimised out>, construct=<value optimised out>)
    at /home/njn/moz/mi4/js/src/jscntxtinlines.h:284
#21 js::Invoke (cx=0x7f2e8986b400, argsRef=<value optimised out>, 
    construct=<value optimised out>)
    at /home/njn/moz/mi4/js/src/jsinterp.cpp:656
#22 0x00007f2ea98418c0 in js::Interpret (cx=<value optimised out>, 
    entryFrame=0x7f2e95afe030, interpMode=js::JSINTERP_NORMAL)
    at /home/njn/moz/mi4/js/src/jsinterp.cpp:4085
#23 0x00007f2ea95ac779 in js::RunScript (cx=0x7f2e8986b400, 
    script=0x7f2e86034000, fp=0x7f2e95afe030)
    at /home/njn/moz/mi4/js/src/jsinterp.cpp:613
#24 0x00007f2ea95ae157 in js::Execute (cx=0x7f2e8986b400, 
    script=0x7f2e86034000, scopeChain=<value optimised out>, thisv=..., 
    type=<value optimised out>, evalInFrame=<value optimised out>, result=0x0)
    at /home/njn/moz/mi4/js/src/jsinterp.cpp:908
#25 0x00007f2ea95ae2a1 in js::ExternalExecute (cx=0x7f2e8986b400, 
    script=0x7f2e86034000, scopeChainArg=<value optimised out>, rval=0x0)
    at /home/njn/moz/mi4/js/src/jsinterp.cpp:944
#26 0x00007f2ea94f81e0 in EvaluateUCScriptForPrincipalsCommon (
    cx=0x7f2e8986b400, obj=0x7f2e88696088, principals=0x7f2e882c2088, 
    chars=0x7f2e86c00008, length=580231, filename=<value optimised out>, 
    lineno=1, rval=0x0, compileVersion=JSVERSION_DEFAULT)
    at /home/njn/moz/mi4/js/src/jsapi.cpp:4941
#27 0x00007f2ea94f8770 in JS_EvaluateUCScriptForPrincipalsVersion (
    cx=0x7f2e8986b400, obj=0x7f2e88696088, principals=0x7f2e882c2088, 
    chars=0x7f2e86c00008, length=580231, 
    filename=0x7f2e882253a8 "http://www.ro.me/main.min.js", lineno=1, 
    rval=0x0, version=JSVERSION_DEFAULT)
    at /home/njn/moz/mi4/js/src/jsapi.cpp:4957
#28 0x00007f2ea86768e2 in nsJSContext::EvaluateString (this=0x7f2e88a4c5f0, 
    aScript=..., aScopeObject=0x7f2e88696088, 
    aPrincipal=<value optimised out>, 
    aURL=0x7f2e882253a8 "http://www.ro.me/main.min.js", aLineNo=1, 
    aVersion=0, aRetValue=0x0, aIsUndefined=0x7fff89ce223c)
    at /home/njn/moz/mi4/dom/base/nsJSEnvironment.cpp:1453
#29 0x00007f2ea83cb4ec in nsScriptLoader::EvaluateScript (
    this=0x7f2e88214c00, aRequest=<value optimised out>, aScript=...)
    at /home/njn/moz/mi4/content/base/src/nsScriptLoader.cpp:906
#30 0x00007f2ea83cbc90 in nsScriptLoader::ProcessRequest (
    this=0x7f2e88214c00, aRequest=0x7f2e8824da60)
    at /home/njn/moz/mi4/content/base/src/nsScriptLoader.cpp:799
#31 0x00007f2ea83cc06d in nsScriptLoader::ProcessPendingRequests (
    this=0x7f2e88214c00)
    at /home/njn/moz/mi4/content/base/src/nsScriptLoader.cpp:949
#32 0x00007f2ea83cfc6a in nsScriptLoader::OnStreamComplete (
    this=0x7f2e88214c00, aLoader=0x7f2e88291480, 
    aContext=<value optimised out>, aStatus=0, aStringLen=580231, 
    aString=<value optimised out>)
    at /home/njn/moz/mi4/content/base/src/nsScriptLoader.cpp:1183
#33 0x00007f2ea7ddf8ec in nsStreamLoader::OnStopRequest (this=0x7f2e88291480, 
    request=<value optimised out>, ctxt=<value optimised out>, aStatus=0)
    at /home/njn/moz/mi4/netwerk/base/src/nsStreamLoader.cpp:125
#34 0x00007f2ea7dff7ee in nsHTTPCompressConv::OnStopRequest (
    this=<value optimised out>, request=<value optimised out>, 
    aContext=<value optimised out>, aStatus=<value optimised out>)
    at /home/njn/moz/mi4/netwerk/streamconv/converters/nsHTTPCompressConv.cpp:127
#35 0x00007f2ea7e8d0a5 in nsHttpChannel::OnStopRequest (this=0x7f2e88548800, 
    request=<value optimised out>, ctxt=<value optimised out>, status=0)
    at /home/njn/moz/mi4/netwerk/protocol/http/nsHttpChannel.cpp:4205
#36 0x00007f2ea7db0003 in nsInputStreamPump::OnStateStop (this=0x7f2e88286e80)
    at /home/njn/moz/mi4/netwerk/base/src/nsInputStreamPump.cpp:578
#37 0x00007f2ea7db013a in nsInputStreamPump::OnInputStreamReady (
    this=0x7f2e88286e80, stream=<value optimised out>)
    at /home/njn/moz/mi4/netwerk/base/src/nsInputStreamPump.cpp:403
#38 0x00007f2ea927cd4e in nsInputStreamReadyEvent::Run (
    this=<value optimised out>)
    at /home/njn/moz/mi4/xpcom/io/nsStreamUtils.cpp:114
#39 0x00007f2ea929c261 in nsThread::ProcessNextEvent (this=0x7f2eaa716fe0, 
    mayWait=0, result=0x7fff89ce26bc)
    at /home/njn/moz/mi4/xpcom/threads/nsThread.cpp:617
#40 0x00007f2ea923bc24 in NS_ProcessNextEvent_P (
    thread=<value optimised out>, mayWait=0)
    at /home/njn/moz/mi4/d64/xpcom/build/nsThreadUtils.cpp:245
#41 0x00007f2ea913fdfd in mozilla::ipc::MessagePump::Run (
    this=0x7f2e9ec84c00, aDelegate=0x7f2eaa7ed8f0)
    at /home/njn/moz/mi4/ipc/glue/MessagePump.cpp:110
#42 0x00007f2ea92d1da2 in MessageLoop::RunInternal (this=0x7f2eaa7ed8f0)
    at /home/njn/moz/mi4/ipc/chromium/src/base/message_loop.cc:218
#43 0x00007f2ea92d1db1 in MessageLoop::RunHandler (this=<value optimised out>)
    at /home/njn/moz/mi4/ipc/chromium/src/base/message_loop.cc:202
#44 0x00007f2ea92d20bd in MessageLoop::Run (this=0x7f2eaa7ed8f0)
    at /home/njn/moz/mi4/ipc/chromium/src/base/message_loop.cc:176
#45 0x00007f2ea8fe89e8 in nsBaseAppShell::Run (this=0x7f2e9ec51900)
    at /home/njn/moz/mi4/widget/src/xpwidgets/nsBaseAppShell.cpp:189
#46 0x00007f2ea8d4a1c7 in nsAppStartup::Run (this=0x7f2e98b1f150)
    at /home/njn/moz/mi4/toolkit/components/startup/nsAppStartup.cpp:222
#47 0x00007f2ea7d71699 in XRE_main (argc=<value optimised out>, 
    argv=<value optimised out>, aAppData=<value optimised out>)
    at /home/njn/moz/mi4/toolkit/xre/nsAppRunner.cpp:3570
#48 0x0000000000402050 in do_main (argc=<value optimised out>, 
    argv=<value optimised out>)
    at /home/njn/moz/mi4/browser/app/nsBrowserApp.cpp:198
#49 main (argc=<value optimised out>, argv=<value optimised out>)
    at /home/njn/moz/mi4/browser/app/nsBrowserApp.cpp:281
Comment 2 Karl Tomlinson (:karlt) 2011-07-05 19:08:04 PDT
This looks like https://bugs.freedesktop.org/show_bug.cgi?id=35603
AIUI introduced in 7.10.1 and should be resolved in 7.10.3.
Comment 3 Matt Woodrow (:mattwoodrow) 2011-07-30 21:11:22 PDT
We should blacklist that version of the driver then :)

Looks like our blacklisting code only detects the major/minor version though (ie 7.10), we'd need to add a way to check for the third number.
Comment 4 Matt Woodrow (:mattwoodrow) 2011-07-30 21:25:22 PDT
Created attachment 549622 [details] [diff] [review]
Require Mesa 7.10.3

Builds, haven't tested it as such.
Comment 5 Benoit Jacob [:bjacob] (mostly away) 2011-08-01 20:41:41 PDT
(In reply to comment #4)
> Created attachment 549622 [details] [diff] [review] [diff] [details] [review]
> Require Mesa 7.10.3
> 
> Builds, haven't tested it as such.

The patch looks good and you'll get r+ as soon as it has received basic testing :) Especially the part where you parse the GL strings. I'd like you to do that testing so I don't have to make a build myself :) Fortunately there's a facility in place exactly for that purpose: by defining the MOZ_GFX_SPOOF_GL_VENDOR, MOZ_GFX_SPOOF_GL_RENDERER and MOZ_GFX_SPOOF_GL_VERSION environment variables you can simulate GL strings.
Comment 6 Benoit Jacob [:bjacob] (mostly away) 2011-08-04 09:30:48 PDT
Comment on attachment 549622 [details] [diff] [review]
Require Mesa 7.10.3

Tested with

    MOZ_GFX_SPOOF_GL_VERSION="2.1 Mesa 7.10.3"

(and other strings) and it works fine :)

>-static inline PRUint64 version(PRUint32 major, PRUint32 minor)
>+static inline PRUint64 version(PRUint32 major, PRUint32 minor, PRUint32 revision)

How about default parameter value revision = 0 ?...

>-        if (version(mMajorVersion, mMinorVersion) < version(257,21)) {
>+        if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(257,21,0)) {

...so that you wouldn't need that.

>-        if (version(mMajorVersion, mMinorVersion) < version(3, 0)) {
>+        if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(3, 0, 0)) {

Same.
Comment 7 Matt Woodrow (:mattwoodrow) 2011-08-04 18:06:16 PDT
Created attachment 550914 [details] [diff] [review]
Require Mesa 7.10.3 v2

Added default parameter to version.

Carrying forward r=bjacob
Comment 8 Matt Woodrow (:mattwoodrow) 2011-08-04 18:15:53 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/c0adebd5c58d
Comment 9 Marco Bonardo [::mak] 2011-08-05 09:06:36 PDT
http://hg.mozilla.org/mozilla-central/rev/c0adebd5c58d
Comment 10 Benoit Jacob [:bjacob] (mostly away) 2011-08-05 11:58:49 PDT
Comment on attachment 550914 [details] [diff] [review]
Require Mesa 7.10.3 v2

I'd like to land this on Aurora:
 - it blacklists a kind of system where WebGL is enabled by default in Aurora i.e. it fixes a crash in Aurora
 - having this in Firefox 7 would allow me to keep the wiki page not too complex, 
   https://wiki.mozilla.org/Blocklisting/Blocked_Graphics_Drivers#On_X11
Comment 11 Johnathan Nightingale [:johnath] 2011-08-09 14:12:11 PDT
Comment on attachment 550914 [details] [diff] [review]
Require Mesa 7.10.3 v2

Get it in before beta next monday, please
Comment 12 Benoit Jacob [:bjacob] (mostly away) 2011-08-11 15:36:41 PDT
Landed on aurora:
http://hg.mozilla.org/releases/mozilla-aurora/rev/e18e32c32fa9
Comment 13 AndreiD[QA] 2011-08-25 05:05:14 PDT
I was trying to see if this is fixed for Fx7 since the flag "status-firefox7" is set to "fixed", but I couldn't.
The fixes/changes that landed in Aurora are currently visible in the Beta repo as well (i.e. the changes made to the file GfxInfoX11.cpp)
However, is there a test case or any steps / guidelines for this bug that can be used to verify the fix? Thanks
Comment 14 Benoit Jacob [:bjacob] (mostly away) 2011-08-25 12:11:11 PDT
Testing instructions are given in comment 6. You want to test that Mesa 7.10.3 or later is accepted, and earlier versions are blocked. The way to test is to spoof Mesa versions by running Firefox with this environment variable:

   MOZ_GFX_SPOOF_GL_VERSION="2.1 Mesa 7.10.3" ./firefox -P -no-remote about:support

It doesn't matter what you put before Mesa, all what matters is what's after. In about:support check the 'WebGL renderer' line to see if it's blocked or not.
Comment 15 Ioana (away) 2011-08-26 05:17:47 PDT
Verified fixed on:
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:7.0) Gecko/20100101 Firefox/7.0
Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20100101 Firefox/7.0

I used "MOZ_GFX_SPOOF_GL_VERSION="2.1 Mesa x.x.x" ./firefox -P -no-remote about:support" in the terminal, then checked the WebGL renderer line in about:support.

Mesa versions older than 7.10.3 were blocked (7.10.2,7.10.2,7.9,6.9 etc).
Mesa 7.10.3 and newer versions (7.10.4) were accepted.
Comment 16 Fabio 2011-09-30 01:54:44 PDT
I just upgraded FF to 7.0.1 (official Ubuntu packages) but WebGL is still disabled even if I am using mesa git (7.12-devel with r300g). about:support gives:

Grafica

Descrizione scheda grafica - X.Org R300 Project -- Gallium 0.4 on ATI RV530

Versione driver - 2.1 Mesa 7.12-devel (git-4c84fbe natty-oibaf-ppa)

Rendering WebGL - Bloccato a causa della versione dei driver della scheda grafica. Aggiornare i driver alla versione <NOT Gallium> o successiva.

Finestre con accelerazione GPU - 0/1. Bloccato a causa della versione dei driver della scheda grafica. Aggiornare i driver alla versione <NOT Gallium> o successiva.
Comment 17 Benoit Jacob [:bjacob] (mostly away) 2011-09-30 05:43:35 PDT
Fabio, are you sure that's Firefox 7? This <NOT Gallium> message is characteristic of Firefox 6, and Firefox 7 should never give you that.
Comment 18 Fabio 2011-10-03 00:00:14 PDT
You are right, it's working fine now.

However it's really strange that similar problems always appears when I upgrade FF before rebooting my system. This time there was the old gallium message, and I also always get the default English language (rather than my localized one) after an upgrade and a FF restart. After a system reboot I get the correct behavior.
Comment 19 Benoit Jacob [:bjacob] (mostly away) 2011-10-03 04:46:35 PDT
(In reply to Fabio from comment #18)
> You are right, it's working fine now.
> 
> However it's really strange that similar problems always appears when I
> upgrade FF before rebooting my system. This time there was the old gallium
> message,

The fact that you got this message really means that you were still running Firefox 6.

> and I also always get the default English language (rather than my
> localized one) after an upgrade and a FF restart. After a system reboot I
> get the correct behavior.

That would be worth a separate bug report.

Note You need to log in before you can comment on or make changes to this bug.