Closed Bug 635325 Opened 13 years ago Closed 13 years ago

WebGL SIGSEGV crash in strcmp

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 635401

People

(Reporter: gwagner, Assigned: bjacob)

Details

http://www.chromeexperiments.com/detail/jellyfish/?f=webgl

Whenever I start the WebGL demo on Linux I get the following crash:
Maybe a library issue?

0x00007fc35a3ad39d in nanosleep () at ../sysdeps/unix/syscall-template.S:82
82	../sysdeps/unix/syscall-template.S: No such file or directory.
	in ../sysdeps/unix/syscall-template.S
(gdb) bt
#0  0x00007fc35a3ad39d in nanosleep () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007fc35a3ad210 in __sleep (seconds=<value optimized out>) at ../sysdeps/unix/sysv/linux/sleep.c:138
#2  0x00007fc35edf154b in ah_crap_handler (signum=11) at /home/mozilla/gwagner/ws0/toolkit/xre/nsSigHandlers.cpp:132
#3  0x00007fc35edf6160 in nsProfileLock::FatalSignalHandler (signo=11, info=0x7fff5cdf0e30, context=0x7fff5cdf0d00) at nsProfileLock.cpp:226
#4  <signal handler called>
#5  __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp.S:129
#6  0x00007fc3607ece15 in mozilla::gl::GLXLibrary::EnsureInitialized (this=0x7fc361fceb20)
    at /home/mozilla/gwagner/ws0/gfx/thebes/GLContextProviderGLX.cpp:186
#7  0x00007fc3607ed76e in CreateOffscreenPixmapContext (aSize=..., aFormat=..., aShare=1)
    at /home/mozilla/gwagner/ws0/gfx/thebes/GLContextProviderGLX.cpp:561
#8  0x00007fc3607eddab in mozilla::gl::GLContextProviderGLX::CreateOffscreen (aSize=..., aFormat=...)
    at /home/mozilla/gwagner/ws0/gfx/thebes/GLContextProviderGLX.cpp:681
#9  0x00007fc35f55e481 in mozilla::WebGLContext::SetDimensions (this=0x7fc33d3c5800, width=968, height=817)
    at /home/mozilla/gwagner/ws0/content/canvas/src/WebGLContext.cpp:477
#10 0x00007fc35f610930 in nsHTMLCanvasElement::UpdateContext (this=0x7fc33d937ce0, aNewContextOptions=0x0)
    at /home/mozilla/gwagner/ws0/content/html/content/src/nsHTMLCanvasElement.cpp:611
#11 0x00007fc35f6104db in nsHTMLCanvasElement::GetContext (this=0x7fc33d937ce0, aContextId=..., aContextOptions=..., aContext=0x7fff5cdf1c90)
    at /home/mozilla/gwagner/ws0/content/html/content/src/nsHTMLCanvasElement.cpp:534
#12 0x00007fc35fe49fce in nsIDOMHTMLCanvasElement_GetContext (cx=0x7fc33e7a0c00, argc=1, vp=0x7fc34dbfe2a8) at dom_quickstubs.cpp:20366
#13 0x00007fc36096e1f8 in js::CallJSNative (cx=0x7fc33e7a0c00, native=0x7fc35fe49d6a <nsIDOMHTMLCanvasElement_GetContext>, argc=1, 
    vp=0x7fc34dbfe2a8) at /home/mozilla/gwagner/ws0/js/src/jscntxtinlines.h:701
#14 0x00007fc360bbf032 in js::Interpret (cx=0x7fc33e7a0c00, entryFrame=0x7fc34dbfe178, inlineCallCount=2, interpMode=JSINTERP_NORMAL)
    at /home/mozilla/gwagner/ws0/js/src/jsinterp.cpp:4763
#15 0x00007fc36096a1ec in js::RunScript (cx=0x7fc33e7a0c00, script=0x7fc33d38c600, fp=0x7fc34dbfe178)
    at /home/mozilla/gwagner/ws0/js/src/jsinterp.cpp:650
#16 0x00007fc36096a6b7 in js::Invoke (cx=0x7fc33e7a0c00, argsRef=..., flags=8192) at /home/mozilla/gwagner/ws0/js/src/jsinterp.cpp:730
#17 0x00007fc360942c13 in js_fun_call (cx=0x7fc33e7a0c00, argc=1, vp=0x7fc34dbfe130) at /home/mozilla/gwagner/ws0/js/src/jsfun.cpp:2143
#18 0x00007fc36096e1f8 in js::CallJSNative (cx=0x7fc33e7a0c00, native=0x7fc3609429ed <js_fun_call(JSContext*, unsigned int, js::Value*)>, 
    argc=2, vp=0x7fc34dbfe130) at /home/mozilla/gwagner/ws0/js/src/jscntxtinlines.h:701
#19 0x00007fc360bbf032 in js::Interpret (cx=0x7fc33e7a0c00, entryFrame=0x7fc34dbfe060, inlineCallCount=1, interpMode=JSINTERP_NORMAL)
Beta11 or nightlies?
What's your graphics driver?
Did you define MOZ_GLX_IGNORE_BLACKLIST?
Did you set layers.acceleration.force-enabled?
(In reply to comment #1)
> Beta11 or nightlies?

Tracemonkey build from yesterday

> What's your graphics driver?

07:00.0 VGA compatible controller: ATI Technologies Inc Device 68d8

> Did you define MOZ_GLX_IGNORE_BLACKLIST?

No don't think so.

> Did you set layers.acceleration.force-enabled?
No don't think so.

The machine is in MV so I can give you access if you want.
Does your build include this changeset?
http://hg.mozilla.org/mozilla-central/rev/be64c2d2b306

It should really fix exactly your crash (which was the top linux crasher last week, and was landed last weekend (despite the commit date on Friday).
...and note that your graphics driver is currently blacklisted. If you want to try WebGL stuff, define the env var MOZ_GLX_IGNORE_BLACKLIST.
It still crashes with a MC debug build from today.
Shouldn't I get an error or warning if I don't define the ignore blacklist?
Definitely, you shouldn't crash if you don't ignore the blacklist. That's the point of a blacklist.

Can you please attach a backtrace from your MC debug build from today?

Also, what are the last lines of terminal output? Anything about a X error?

The backtrace in comment 0 would be weird if it applied to today's MC. Indeed, it's apparently the default X error handler aborting here, and that shouldn't happen there because at this place we have set up a custom X error handler to avoid that. So, the exact line number in GLContextProviderGLX.cpp matters.
WARNING: No script language registered for this mime-type: file /home/mozilla/gwagner/mozilla-central/dom/base/nsDOMScriptObjectFactory.cpp, line 160
WARNING: Failed to find a scripting language: file /home/mozilla/gwagner/mozilla-central/content/base/src/nsScriptLoader.cpp, line 459
WARNING: No script language registered for this mime-type: file /home/mozilla/gwagner/mozilla-central/dom/base/nsDOMScriptObjectFactory.cpp, line 160
WARNING: Failed to find a scripting language: file /home/mozilla/gwagner/mozilla-central/content/base/src/nsScriptLoader.cpp, line 459
JavaScript strict warning: resource://testpilot/modules/setup.js, line 353: assignment to undeclared variable i

Program received signal SIGSEGV, Segmentation fault.
__strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp.S:129
129	../sysdeps/x86_64/multiarch/strcmp.S: No such file or directory.
	in ../sysdeps/x86_64/multiarch/strcmp.S
(gdb) bt
#0  __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp.S:129
#1  0x00007ffff63ca669 in mozilla::gl::GLXLibrary::EnsureInitialized (this=0x7ffff7bb9b40)
    at /home/mozilla/gwagner/mozilla-central/gfx/thebes/GLContextProviderGLX.cpp:186
#2  0x00007ffff63cafc2 in CreateOffscreenPixmapContext (aSize=..., aFormat=..., aShare=1)
    at /home/mozilla/gwagner/mozilla-central/gfx/thebes/GLContextProviderGLX.cpp:561
#3  0x00007ffff63cb5ff in mozilla::gl::GLContextProviderGLX::CreateOffscreen (aSize=..., aFormat=...)
    at /home/mozilla/gwagner/mozilla-central/gfx/thebes/GLContextProviderGLX.cpp:681
#4  0x00007ffff513a801 in mozilla::WebGLContext::SetDimensions (this=0x7fffd1fba800, width=968, height=817)
    at /home/mozilla/gwagner/mozilla-central/content/canvas/src/WebGLContext.cpp:477
#5  0x00007ffff51ecb60 in nsHTMLCanvasElement::UpdateContext (this=0x7fffd1f70160, aNewContextOptions=0x0)
    at /home/mozilla/gwagner/mozilla-central/content/html/content/src/nsHTMLCanvasElement.cpp:611
#6  0x00007ffff51ec70b in nsHTMLCanvasElement::GetContext (this=0x7fffd1f70160, aContextId=..., aContextOptions=..., aContext=0x7fffffff9850)
    at /home/mozilla/gwagner/mozilla-central/content/html/content/src/nsHTMLCanvasElement.cpp:534
Ah, segfault in strcmp, that looks like a different issue: bug 635401. It has a patch already.

But regarding your crash in comment 0... that looked different. Can you try running with the environment variable MOZ_X_SYNC=1 ? Should give more consistent stacks.
Assignee: nobody → bjacob
Status: NEW → ASSIGNED
The crash in comment 0 is the same.
ah_crap_handler in nsSigHandlers.cpp is the handler for fatal signals such as SEGV.

Forward duping to bug 635401 because that has a patch.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Summary: WebGL crash → WebGL SIGSEGV crash in strcmp
You need to log in before you can comment on or make changes to this bug.