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)
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)
|
7.22 KB,
text/plain
|
Details | |
|
2.72 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.57 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
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.
| Reporter | ||
Comment 1•15 years ago
|
||
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
| Reporter | ||
Comment 2•15 years ago
|
||
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.
| Reporter | ||
Comment 3•15 years ago
|
||
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.
| Reporter | ||
Updated•15 years ago
|
Attachment #512563 -
Attachment is patch: false
| Reporter | ||
Comment 4•15 years ago
|
||
| Reporter | ||
Comment 5•15 years ago
|
||
| Reporter | ||
Comment 6•15 years ago
|
||
| Reporter | ||
Updated•15 years ago
|
Attachment #512576 -
Attachment is obsolete: true
| Reporter | ||
Updated•15 years ago
|
Attachment #512578 -
Attachment is obsolete: true
| Reporter | ||
Comment 7•15 years ago
|
||
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
| Reporter | ||
Comment 8•15 years ago
|
||
(In reply to comment #7)
> https://people.mozilla.com/~dholbert/secure/marek_crash/test.html
For that testcase -- username is mozilla, password is montinv3w
| Reporter | ||
Comment 9•15 years ago
|
||
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.)
| Reporter | ||
Comment 10•15 years ago
|
||
patch as described at end of previous comment.
Attachment #512600 -
Flags: review?(roc)
| Reporter | ||
Updated•15 years ago
|
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
| Reporter | ||
Updated•15 years ago
|
Assignee: dholbert → nobody
Component: Layout → Graphics
QA Contact: layout → thebes
| Reporter | ||
Updated•15 years ago
|
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!
| Reporter | ||
Updated•15 years ago
|
Attachment #512600 -
Attachment description: fix v1 → band-aid v1
Comment 12•15 years ago
|
||
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.
| Reporter | ||
Comment 13•15 years ago
|
||
(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.
| Reporter | ||
Comment 14•15 years ago
|
||
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.)
Comment 15•15 years ago
|
||
Getting excited... bug 629265 is the top crasher on linux in b12pre.
Updated•15 years ago
|
OS: Linux → Windows CE
Whiteboard: [sg:critical?]
Updated•15 years ago
|
OS: Windows CE → Linux
| Reporter | ||
Comment 16•15 years ago
|
||
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
| Reporter | ||
Updated•15 years ago
|
Attachment #512600 -
Flags: review?(roc)
We just need some attention from someone who knows something about the GL shader stuff :-)
Assignee: dholbert → jmuizelaar
| Assignee | ||
Comment 18•15 years ago
|
||
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! :-)
Comment 20•15 years ago
|
||
(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.
Updated•15 years ago
|
blocking2.0: --- → final+
Whiteboard: [sg:critical?] → [sg:critical?][hardblocker]
| Assignee | ||
Comment 21•15 years ago
|
||
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)
Updated•15 years ago
|
Attachment #513263 -
Flags: review?(roc) → review+
| Assignee | ||
Comment 22•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [sg:critical?][hardblocker] → [sg:critical?][softblocker]
| Reporter | ||
Comment 23•15 years ago
|
||
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
Updated•15 years ago
|
Crash Signature: [@ @0x7fXXXXXXXXXX ]
Updated•11 years ago
|
Group: core-security → core-security-release
Updated•11 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•