Crash in [@ IOAccelContextAddResource]
Categories
(Core :: Graphics: Layers, defect, P3)
Tracking
()
People
(Reporter: dholbert, Unassigned, NeedInfo)
References
Details
(Keywords: crash, Whiteboard: [gfx-noted][tbird crash])
Crash Data
This bug is for crash report bp-cddef803-9036-4f5e-a556-9b67d0190306.
Top 10 frames of crashing thread:
0 IOAccelerator IOAccelContextAddResource
1 AppleIntelHD4000GraphicsGLDriver AppleIntelHD4000GraphicsGLDriver@0x65de
2 AppleIntelHD4000GraphicsGLDriver AppleIntelHD4000GraphicsGLDriver@0x4b5a87
3 AppleIntelHD4000GraphicsGLDriver AppleIntelHD4000GraphicsGLDriver@0x501c
4 GLEngine glClear_Exec
5 XUL mozilla::layers::CompositorOGL::BeginFrame gfx/gl/GLContext.h:933
6 XUL mozilla::layers::LayerManagerComposite::Render gfx/layers/composite/LayerManagerComposite.cpp:922
7 XUL mozilla::layers::LayerManagerComposite::UpdateAndRender gfx/layers/composite/LayerManagerComposite.cpp:538
8 XUL mozilla::layers::LayerManager::Log gfx/layers/Layers.cpp:76
9 XUL mozilla::layers::LayerManagerComposite::EndTransaction gfx/layers/composite/LayerManagerComposite.cpp:464
This was a crash report from the "Ambient 13" live display in the Mountain View office.
jgilbert, looks like this is in GLContext.h calling into GL Driver code -- do you have any thoughts about what might be going on here? (E.g. does this look like a GL driver bug, perhaps?)
| Reporter | ||
Updated•7 years ago
|
The crash came from:
Mac mini (Late 2012)
Processor: 2.3 GHz Intel Core i7
Memory: 16 GB 1600 MHz DDR3
Graphics: Intel HD Graphics 4000 1536 MB
| Reporter | ||
Comment 2•7 years ago
|
||
Also, the crash report ID in comment 0 was for Firefox 63.0.1 (a bit out of date), but we have a trickle of other crash reports
with the same signature and with more recent versions. e.g. here's one in Firefox 66 beta: bp-35175b3f-2eac-41e4-a0ce-102b50190228
Its backtrace is a bit different from the backtrace in comment 0, and it seems to be the more common backtrace that we get for this [IOAccelContextAddResource] signature:
Top 10 frames of crashing thread:
0 IOAccelerator IOAccelContextAddResource
1 AppleIntelHD5000GraphicsGLDriver AppleIntelHD5000GraphicsGLDriver@0x11310
2 AppleIntelHD5000GraphicsGLDriver AppleIntelHD5000GraphicsGLDriver@0x10599
3 GLEngine glDrawArrays_ACC_Exec
4 XUL mozilla::layers::CompositorOGL::BindAndDrawQuads gfx/gl/GLContext.h:1067
5 XUL void mozilla::layers::CompositorOGL::DrawGeometry<mozilla::gfx::RectTyped<mozilla::gfx::UnknownUnits, float> > gfx/layers/opengl/CompositorOGL.cpp:1654
6 XUL mozilla::layers::CompositorOGL::DrawQuad gfx/layers/opengl/CompositorOGL.cpp:1087
7 XUL mozilla::layers::TiledContentHost::RenderLayerBuffer gfx/layers/composite/TiledContentHost.cpp:513
8 XUL mozilla::layers::TiledContentHost::Composite gfx/layers/composite/TiledContentHost.cpp:461
9 XUL mozilla::layers::PaintedLayerComposite::RenderLayer gfx/layers/composite/PaintedLayerComposite.cpp:106
The common pattern (different from comment 0 but common among most reports for this signature that I've looked at) seems to have: CompositorOGL::BindAndDrawQuads, calling into glDrawArrays_ACC_Exec, calling into AppleIntelHD4000GraphicsGLDriver, calling into IOAccelContextAddResource
Updated•7 years ago
|
Updated•7 years ago
|
| Reporter | ||
Comment 4•7 years ago
|
||
FWIW, the same machine (Mountain View "Ambient 13", specs in comment 1) hit this same crash again today:
bp-c96a10af-0581-4602-9d8e-91b640190307
It's got a slightly different backtrace from yesterday's crash (comment 0) -- this one matches the more common "glDrawArrays_ACC_Exec" pattern noted in comment 2.
Updated•7 years ago
|
Updated•6 years ago
|
Comment 5•6 years ago
|
||
Change the status for beta to have the same as nightly and release.
For more information, please visit auto_nag documentation.
Comment 6•6 years ago
|
||
This bug might benefit from an analysis using a HookCase hook library (https://github.com/steven-michaud/HookCase).
Comment 7•6 years ago
|
||
I've started using HookCase to look into this bug. By examining the lifecycle of the objects involved in this bug's crashes, I've discovered one way to emulate them (bp-afe1d54b-b0c8-4f77-ba8c-ab7020200430). But it's not the only way, and I'm not sure it's the "right" way. The distinguishing characteristic of this particular way to crash is that it happens as you open a new window (though not a new tab). But I don't have permission to look at the comments on this bug's crashes at https://crash-stats.mozilla.org/. Someone who does, please look through them for things like "crashes when opening a window". I'd also like to hear about any other specific and possibly useful comments.
Daniel, I'm NI-ing you because you reported this bug. Please pass my request along to someone else if you'd prefer.
| Reporter | ||
Comment 8•6 years ago
|
||
Good to hear from you, Steven! Thanks for taking a look.
I'm bouncing your request to mccr8 (Andrew) because I don't seem to have privileges to see crash-report comments, either (I used to, but perhaps they're considered extra-private like minidumps now). The crash report "comments" page for this bug's signature says "Forbidden" for me (and I am logged in with my MoCo LDAP credentials). I'm pretty sure Andrew has access, though.
Andrew, would you mind seeing if there are any trends in the comments for this bug's crash reports? (particularly if there are mentions of opening a new window, per comment 7)
Comment 9•6 years ago
|
||
The vaguely useful comments I see are:
"playing an ad that kicked from youtube"
"Twice today, Mozilla has crashed all of a sudden, without warning. The only prior indication that something was not right that I am aware of is that as of yesterday, when switching between tabs, the display glitched a few times, leaving black and white sections over the webpages."
"Since the last version was installed, constant crashes are occurring."
"I was listening to Andrew Cuomo on a segment of The Daily Show & then !poof! gone. I was on FB at the time"
"I was browsing in Twitter"
"Crashed on its own."
So, nothing very useful.
No particular pattern to the URLs that I can see. Twitter, YouTube, random other pages.
Comment 10•6 years ago
|
||
Thanks for the info. Looks like I'll just have to follow my nose :-)
This is probably an Apple bug. With luck I'll be able to find it, and then find a way for Firefox to work around it. With HookCase and a good disassembler (Hopper Disassembler) I can dig deep into macOS system code.
Comment 11•5 years ago
|
||
By the way, I made some progress on this in the first couple of weeks, but now I'm stuck. I've identified a change Apple could make to its (user-mode) driver code, which would almost certainly fix these crashes. But I don't know why they're happening, so I probably wouldn't be able to make the case to Apple to change its code.
For now, I'm spending a lot of time trying to reverse engineer what Apple does with the "sideband buffer" and "command buffers" (what gets "submitted" by gpusSubmitDataBuffers()) -- on both the user side and the kernel side. But the code is fiercely complex, and my progress has been slow. I've been working on a kernel extension dedicated to this task, with the same functionality as HookCase. I also recently added watchpoint support to both HookCase and this new kernel extension. But I have no idea how long it will be before my work begins to bear fruit.
Comment 12•5 years ago
|
||
Not sure whether this helps or not but I've been seeing a lot of crashes in Firefox lately (started with the release prior to 80.0.0). I'm now running 80.0.1 and continue to see these crashes. Examining my crash submissions led me to this bug but I don't know whether it's actually the same issue or not since I didn't have crashes until recently. For me the crash is always triggered when scrolling. Whatever is going on something has changed relatively recently to make this much more frequent than it ever was in the past.
Comment 13•5 years ago
|
||
(In reply to comment #12)
Please post links to a few of your crash reports.
Comment 14•5 years ago
|
||
Links to crash reports:
- https://crash-stats.mozilla.org/report/index/9b89b1c1-1865-4c96-9b5e-5ecf80200904 (from Firefox 79.0)
- https://crash-stats.mozilla.org/report/index/e621dc33-9434-4e73-85c5-b41e10200904 (from Firefox 80.0.0)
- https://crash-stats.mozilla.org/report/index/d1847ecf-dd47-481e-ac7a-f92710200904 (from Firefox 80.0.1)
Comment 15•5 years ago
|
||
Thanks.
Yup, they look a lot like the other crashes for this bug. So yes, you're seeing the same bug.
Tell me what you can about your Mac: The model, how much free hard disk space, how much RAM, how much VRAM, whether you have any external monitors (and how many), and anything else you can think of that might be relevant.
Also, do you have even semi-reliable steps you can take to reproduce this bug? If so, please describe them very precisely. (By semi-reliable I mean steps that "work" (cause crashes) at least 50% of the time.)
Comment 16•5 years ago
|
||
This is an older MacBook Pro (13-inch, Mid 2012) model, 16 GB RAM with Intel HD Graphics 4000 1536 MB VRAM running Mac OS High Sierra (10.13.6). There's one external 32" WQHD monitor connected. Firefox is always positioned on the external monitor. Since I've been working from home the last while the external monitor has been pretty much permanently connected so I'm not sure whether the issue manifests without the external monitor.
I don't have semi-reliable steps to reproduce at this point. The only thing I can say is I use the two-finger scrolling on the trackpad and it generally seems I've just lifted my fingers off the trackpad when the crash occurs so seemingly towards the end of the scroll as the scroll momentum is decreasing.
Comment 17•5 years ago
|
||
Thanks again.
And since you say your crash frequency has increased recently: What changes have you made recently to your setup? For example, did you just add your external monitor, or change the one you were using?
Comment 18•5 years ago
|
||
I've made no changes that I'm aware of. I had been running with this same external monitor setup for about 6 months and hadn't been seeing crashes until the last month. I checked /Library/Receipts/InstallHistory.plist and it doesn't look like I've installed any system updates over the last couple months either.
Comment 19•5 years ago
|
||
Actually I checked the next oldest crash report and it appears identical to the others:
- https://crash-stats.mozilla.org/report/index/332cedb9-9619-4174-8dab-0f8250200626 (from Firefox 77.0.1) back in June.
So I guess the same issue has existed for some time but didn't occur nearly as frequently.
Comment 20•5 years ago
|
||
One more question, which I forgot to ask earlier:
Do you keep your Mac running for a long time between reboots? (Not counting shutting its cover and reopening it -- this only puts your Mac to sleep.) If so, do the crashes tend to happen more often the longer your Mac has been "up" (since the last reboot)?
Comment 21•5 years ago
|
||
Yes, reboots are infrequent. The current uptime is 33 days. I'll have to experiment with rebooting to see whether that seems to "resolve" the crashes for a period of time.
Comment 22•5 years ago
•
|
||
I'll have to experiment with rebooting to see whether that seems to "resolve" the crashes for a period of time.
Do try that. There's another bug (another Apple graphics driver bug) where it made a difference -- bug 1576767.
Lately I haven't had much time to spend on this bug. But even with lots of time I'd very likely still be in the situation I described in comment #11 -- I'd probably still be stuck.
If rebooting more often doesn't help, and if you're feeling adventurous, take a look at the documentation for my HookCase debugging tool. If you're willing to try it out, I'd probably be able to write a HookCase hook library that would "fix" the Apple bug I refer to in comment #11. Start with the Readme and skim through everything. Look particularly at the "Building", "Installing" and "Using" sections. I don't blame you if all this looks too scary and/or complicated. But let me know if you'd be willing to try a HookCase hook library. If it works (if it gets rid of this bug's crashes), my next step would be to try to figure out how to patch Firefox to work around Apple's bug. I'd also (of course) ask you to try test builds with these patches.
Note that, at the very least, you'd need sufficient free hard disk space to install Apple's XCode, if you don't already have it. I'd recommend XCode 9.4.1, which is the last version targeted at your version of OS X (10.13). It takes up about 10GB.
Comment 23•5 years ago
|
||
I'm still encountering this bug on macOS Big Sur (actually 11.2.3, but the version doesn't matter), running on Mac Mini 2014.
I don't think it's related to reboot frequency, as I shut down the computer once a day. I've noticed, instead, that Firefox crashes especially when I'm using Google Meet and YouTube, but it sporadically crashes also in other circumstances.
Here are some link to recent crash reports:
- https://crash-stats.mozilla.org/report/index/de5839e6-1980-40bf-bf4d-8593a0210311
- https://crash-stats.mozilla.org/report/index/f762f6c6-8d50-4f14-b63f-244570210303
- https://crash-stats.mozilla.org/report/index/f762f6c6-8d50-4f14-b63f-244570210303
I hope it will be fixed soon, as It prevents me from using Firefox to carry out my daily job.
Thank you
| Reporter | ||
Comment 24•5 years ago
|
||
For what it's worth, I found a similar bug report (a crash in IOAccelContextAddResource) for Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=707445
Some useful details from that bug report:
- It's hardware-specific (it depended on specific GPU)
- The code that was crashing is in the MacOS Intel driver code, and it was judged to be a bug in that code.
This seems to be the case here, too -- the backtrace from comment 32 (e.g. bp-f762f6c6-8d50-4f14-b63f-244570210303) shows AppleIntelHD5000GraphicsGLDriver in the backtrace as the thing calling into the code that crashes. So this likely seems to be an apple bug (maybe not the exact same bug discussed in that Chrome report, but a similar one).
So unfortunately I suspect there's not a lot we can do here, I think, aside from potentially deny-listing the particular driver or driver-version, perhaps.
Lorenzo: one workaround you could try is disabling webrender. (Your backtrace shows that we're using WebRender -- our GPU-accelerated rendering mode -- on your machine, which is part of why we end up triggering this graphics driver code that happens to be crashy.) You can make Firefox less-aggressively use your graphics driver by visiting about:config, searching for gfx.webrender.force-disabled, and clicking the button at the right side of that row so that the value shows true.
Comment 25•5 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #24)
For what it's worth, I found a similar bug report (a crash in
IOAccelContextAddResource) for Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=707445Some useful details from that bug report:
- It's hardware-specific (it depended on specific GPU)
- The code that was crashing is in the MacOS Intel driver code, and it was judged to be a bug in that code.
This seems to be the case here, too -- the backtrace from comment 32 (e.g. bp-f762f6c6-8d50-4f14-b63f-244570210303) shows
AppleIntelHD5000GraphicsGLDriverin the backtrace as the thing calling into the code that crashes. So this likely seems to be an apple bug (maybe not the exact same bug discussed in that Chrome report, but a similar one).So unfortunately I suspect there's not a lot we can do here, I think, aside from potentially deny-listing the particular driver or driver-version, perhaps.
Lorenzo: one workaround you could try is disabling webrender. (Your backtrace shows that we're using WebRender -- our GPU-accelerated rendering mode -- on your machine, which is part of why we end up triggering this graphics driver code that happens to be crashy.) You can make Firefox less-aggressively use your graphics driver by visiting
about:config, searching forgfx.webrender.force-disabled, and clicking the button at the right side of that row so that the value showstrue.
Thanks for your prompt reply.
I've enabled this workaround and I'm gonna use the browser normally for the next days. I'll write an update here with a new crash link if it still crashes, even with WebRender disabled.
| Reporter | ||
Comment 26•5 years ago
|
||
Thanks! If that helps, we may want to automatically change our rendering behavior for users with your particular GPU and/or driver. I don't know how to do that, but I know that's something that we sometimes do. :)
jnicol, do you know what we should do to get this driver-version deny-listed or worked around (or whatever's appropriate) for WebRender? (See crash reports in comment 23, which seem potentially like webrender calling into a buggy graphics driver.)
Comment 27•5 years ago
|
||
I'm going to pass the needinfo along to Jeff or Markus as they'll know better about Mac. I believe our plan was to ship webrender to 100% there, but yeah if we cannot workaround this bug the driver may need to be blocklisted.
Updated•4 years ago
|
Comment 28•3 years ago
|
||
I no longer think I'm going to be able to work around this Apple bug.
Updated•3 years ago
|
Comment 29•3 years ago
|
||
I'm not sure what to do here either. A GPU process would help with stability, maybe.
| Reporter | ||
Comment 30•3 years ago
|
||
(Dropping "on Mountain View office ambient display" since that's no longer relevant; we're just tracking the crash-signature in the wild at this point.)
Description
•