Closed Bug 634366 Opened 15 years ago Closed 15 years ago

Crash on Marek's "banner" demo [@ @0x7fXXXXXXXXXX ] (X = random values) with layers acceleration enabled

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: dholbert, Assigned: mattwoodrow)

References

()

Details

(Keywords: crash, crashreportid, Whiteboard: [sg:critical?][softblocker])

Crash Data

Attachments

(3 files, 3 obsolete files)

STEPS TO REPRODUCE: 1. Enable layers accel. (Restart Firefox & confirm that it's enabled in about:support) 2. Visit http://svg.kvalitne.cz/banner/index.html 3. Reload if you haven't crashed yet. ACTUAL RESULTS: Usually an immediate crash, at a random address beginning with 7f. The crash-report backtrace is pretty much useless - it just has that address and nothing else. (It says "No proper signature could be created because no good data for the crashing thread (0) was found") Some crash reports: bp-19b363a0-18ed-4b4f-9246-44ec02110215 bp-24151f1b-4a11-4775-8095-3fc5e2110215 bp-028c8b9e-f7ee-4cc1-874d-976472110215 From intercepting this in GDB a minute ago, it looked like we were crashing due to referencing an absurdly high index in an array. GDB backtrace & more info coming up soon.
This is with today's nightly on x86_64 Ubuntu 10.10 Video card: NVS 3100M Driver version 260.19.36 (downloaded from nvidia site for latest version) Mozilla/5.0 (X11; Linux x86_64; rv:2.0b12pre) Gecko/20110215 Firefox/4.0b12pre
In a debug build, I get this output spammed continuously: WARNING: Failed to create GLXContext!: file ../../../mozilla/gfx/thebes/GLContextProviderGLX.cpp, line 307 ###!!! ASSERTION: Failed to make GL context current!: 'succeeded', file ../../../mozilla/gfx/thebes/GLContextProviderGLX.cpp, line 353 and then finally: ###!!! ASSERTION: invalid array index: 'i < Length()', file ../../dist/include/nsTArray.h, line 455 and crash.
Attached file backtrace of crash —
Here's the backtrace. Notice in particular: > #4 <signal handler called> > #5 0x00007fb5191ace6e in mozilla::layers::LayerManagerOGL::GetColorTextureLayerProgram (this=0x7fb4f6fa4040, type=2779096485) The variable "type" there is used as an index into the nsTArray called "mPrograms", here: > ColorTextureLayerProgram *GetColorTextureLayerProgram(ProgramType type){ > return static_cast<ColorTextureLayerProgram*>(mPrograms[type]); Unfortunately mPrograms has a length of 11, so index 2779096485 is way past its end.
Attachment #512563 - Attachment is patch: false
Attached file (testcase helper: svg-web JS) (obsolete) —
Attached image (testcase helper: trivial SVG file) (obsolete) —
Attached file testcase (obsolete) —
Attachment #512576 - Attachment is obsolete: true
Attachment #512578 - Attachment is obsolete: true
Comment on attachment 512580 [details] testcase For some reason I can't reproduce this with the bugzilla-hosted testcase. However, I can reproduce using a version I uploaded to a password-protected directory on people.mozilla.com: https://people.mozilla.com/~dholbert/secure/marek_crash/test.html
Attachment #512580 - Attachment is obsolete: true
(In reply to comment #7) > https://people.mozilla.com/~dholbert/secure/marek_crash/test.html For that testcase -- username is mozilla, password is montinv3w
In this case, CairoImageOGL::mLayerProgram (which is used as "type" in comment 3) is uninitialized. The only place we ever initialize it is at the end of CairoImageOGL::SetData. But in this case, we're taking this early return from SetData: > if (mASurfaceAsGLContext) > return; right before the initialization of mLayerProgram. Patch coming up to initialize mLayerProgram to a sentinel value, and then check for that value before using it. (Open to suggestions on smarter things to do here -- without knowing this code better, this seems like the most straightforward band-aid to start out with.)
Attached patch band-aid v1 — — Splinter Review
patch as described at end of previous comment.
Attachment #512600 - Flags: review?(roc)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Assignee: dholbert → nobody
Component: Layout → Graphics
QA Contact: layout → thebes
Assignee: nobody → dholbert
I don't think this is right. I think we actually need to set CairoImageOGL::mLayerProgram to the correct program to use when GLContextProvider::CreateForNativePixmapSurface has succeeded. But it's not obvious to me what program that should be!
Attachment #512600 - Attachment description: fix v1 → band-aid v1
Have you tried running this (debug build) with MOZ_GL_DEBUG=1 or MOZ_GL_DEBUG_ABORT_ON_ERROR=1? That could allow you to get better stacks.
(See bug 629265 comment 35 -- I think this bug and that bug are actually the same) (In reply to comment #12) > Have you tried running this (debug build) with MOZ_GL_DEBUG=1 or > MOZ_GL_DEBUG_ABORT_ON_ERROR=1? > > That could allow you to get better stacks. I just did - it didn't give me any extra information. The stacks here are fine - we know what's broken. It's just a question of what |mLayerProgram| should be set to in the early-return case from Comment 9.
FWIW, the band-aid patch here also seems to fix the crash in bug 629265. (See hidden bug 629265 comment 35 -- that bug looks like it's the same basic thing as this bug.)
Getting excited... bug 629265 is the top crasher on linux in b12pre.
OS: Linux → Windows CE
Whiteboard: [sg:critical?]
OS: Windows CE → Linux
Looks like |mLayerProgram| was added in bug 604101, and this has been a bug since then. (The early-return from comment 9 is older than that.) Matt: Do you know what should we do in that early-return case?
Blocks: 604101
Attachment #512600 - Flags: review?(roc)
We just need some attention from someone who knows something about the GL shader stuff :-)
Assignee: dholbert → jmuizelaar
We actually wanted to remove CreateForNativePixmapSurface() and rewrite the GLXPixmap code from scratch. Just deleting this code might be the easiest solution for now. The GLX implementation of this doesn't even appear to check if the surface is RGBA or RGB. I think we want the BGRX layer program given this (CairoImages are almost opaque right?).
(In reply to comment #18) > We actually wanted to remove CreateForNativePixmapSurface() and rewrite the > GLXPixmap code from scratch. Just deleting this code might be the easiest > solution for now. OK. I'd take a patch for that! :-) (In reply to comment #15) > Getting excited... bug 629265 is the top crasher on linux in b12pre. So our topcrasher is something that's disabled by default? That's good I guess! :-)
(In reply to comment #19) > So our topcrasher is something that's disabled by default? That's good I guess! > :-) Indeed. On the other hand, the linux/nightly user base is very technical (so more likely than average to have non-default prefs), not representative of even the beta user base, let alone of users of final releases.
blocking2.0: --- → final+
Whiteboard: [sg:critical?] → [sg:critical?][hardblocker]
I don't think this needs to be a hardblockers, GL is disabled on linux by default and isn't a supported configuration for 4.0. This just removes the CreateForNativePixmapSurface 'fast path' since it doesn't seem to work and we want to deprecate it. Work will be done post 4.0 to get linux GL support going and a new path will be added as part of that.
Assignee: jmuizelaar → matt.woodrow+bugzilla
Attachment #513263 - Flags: review?(roc)
Attachment #513263 - Flags: review?(roc) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [sg:critical?][hardblocker] → [sg:critical?][softblocker]
Blocks: 629265
Verified fixed in my local debug build. (Tried both the URL from this bug & from Bug 629265, before and after mattwoodrow's checkin. Got crashes & comment 2's assertion-failures before, vs. no crash & no assertions after. Thanks for fixing this, Matt!
Status: RESOLVED → VERIFIED
Blocks: 628401
Crash Signature: [@ @0x7fXXXXXXXXXX ]
Group: core-security → core-security-release
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: