Closed Bug 1165554 Opened 11 years ago Closed 11 years ago

Crash on linux gfxXlibSurface::~gfxXlibSurface() when forcing acceleration on

Categories

(Core :: Graphics: Layers, defect)

40 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: anakin.cs, Unassigned)

Details

(Whiteboard: gfx-noted)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 Build ID: 20150516000105 Steps to reproduce: I am using a firefox GTK3 build on Aurora (v40) with this patch applied https://bugzilla.mozilla.org/show_bug.cgi?id=1127752 There might be a new GTK3/OMTC crash since I'm getting this quite often. Actual results: #0 0x00007f6d4e58e609 in raise () from /usr/lib/libpthread.so.0 #1 0x00007f6d40e42668 in nsProfileLock::FatalSignalHandler(int, siginfo_t*, void*) () from /usr/lib/firefox-developer-edition/libxul.so #2 0x00007f6d411fab60 in AsmJSFaultHandler(int, siginfo_t*, void*) () from /usr/lib/firefox-developer-edition/libxul.so #3 <signal handler called> #4 0x00000000004114c0 in jemalloc_crash () #5 0x000000000041339a in free () #6 0x00007f6d28a2d94a in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so #7 0x00007f6d28a2b80b in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so #8 0x00007f6d2875b321 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so #9 0x00007f6d28736ae0 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so #10 0x00007f6d28736b1e in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so #11 0x00007f6d28736bb9 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so #12 0x00007f6d28a332ea in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so #13 0x00007f6d2891c1de in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so #14 0x00007f6d46e62620 in ?? () from /usr/lib/libGL.so.1 #15 0x00007f6d46e3c479 in ?? () from /usr/lib/libGL.so.1 #16 0x00007f6d3fc5d4d5 in gfxXlibSurface::~gfxXlibSurface() () from /usr/lib/firefox-developer-edition/libxul.so #17 0x00007f6d3fc5d517 in gfxXlibSurface::~gfxXlibSurface() () from /usr/lib/firefox-developer-edition/libxul.so #18 0x00007f6d4b6b7ae1 in ?? () from /usr/lib/libcairo.so.2 #19 0x00007f6d4b715cf5 in cairo_surface_destroy () from /usr/lib/libcairo.so.2 #20 0x00007f6d3fc4d094 in gfxASurface::Release() () from /usr/lib/firefox-developer-edition/libxul.so #21 0x00007f6d3fbdb411 in mozilla::layers::X11TextureSourceOGL::~X11TextureSourceOGL() () from /usr/lib/firefox-developer-edition/libxul.so #22 0x00007f6d3fbdb433 in mozilla::layers::X11TextureSourceOGL::~X11TextureSourceOGL() () from /usr/lib/firefox-developer-edition/libxul.so #23 0x00007f6d3fbdaec0 in mozilla::RefPtr<mozilla::layers::TextureSource>::operator=(mozilla::layers::TextureSource*) () from /usr/lib/firefox-developer-edition/libxul.so #24 0x00007f6d3fbdaeef in mozilla::layers::X11TextureHost::BindTextureSource(mozilla::layers::CompositableTextureRef<mozilla::layers::TextureSource>&) () from /usr/lib/firefox-developer-edition/libxul.so #25 0x00007f6d3fc24fd4 in mozilla::layers::ImageHost::Composite(mozilla::layers::EffectChain&, float, mozilla::gfx::Matrix4x4 const&, mozilla::gfx::Filter const&, mozilla::gfx::RectTyped<mozilla::gfx::UnknownUnits> const&, nsIntRegion const*) () from /usr/lib/firefox-developer-edition/libxul.so #26 0x00007f6d3fc2578c in mozilla::layers::ImageLayerComposite::RenderLayer(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) () from /usr/lib/firefox-developer-edition/libxul.so #27 0x00007f6d3fc1aa4c in void mozilla::layers::RenderLayers<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> const&) () from /usr/lib/firefox-developer-edition/libxul.so #28 0x00007f6d3fc1ea4c in void mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) () from /usr/lib/firefox-developer-edition/libxul.so #29 0x00007f6d3fc1aa4c in void mozilla::layers::RenderLayers<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> const&) () from /usr/lib/firefox-developer-edition/libxul.so #30 0x00007f6d3fc1ea4c in void mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) () from /usr/lib/firefox-developer-edition/libxul.so #31 0x00007f6d3fc2a590 in mozilla::layers::LayerManagerComposite::Render() () from /usr/lib/firefox-developer-edition/libxul.so #32 0x00007f6d3fc2aa36 in mozilla::layers::LayerManagerComposite::EndTransaction(void (*)(mozilla::layers::PaintedLayer*, gfxContext*, nsIntRegion const&, mozilla::layers::DrawRegionClip, nsIntRegion const&, void*), void*, mozilla::layers::LayerManager::EndTransactionFlags) () from /usr/lib/firefox-developer-edition/libxul.so #33 0x00007f6d3fc2aa8c in mozilla::layers::LayerManagerComposite::EndEmptyTransaction(mozilla::layers::LayerManager::EndTransactionFlags) () from /usr/lib/firefox-developer-edition/libxul.so #34 0x00007f6d3fc2f30a in mozilla::layers::CompositorParent::CompositeToTarget(mozilla::gfx::DrawTarget*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const*) () from /usr/lib/firefox-developer-edition/libxul.so #35 0x00007f6d3fc2f466 in mozilla::layers::CompositorVsyncScheduler::Composite(mozilla::TimeStamp) () from /usr/lib/firefox-developer-edition/libxul.so #36 0x00007f6d416ec768 in MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) () from /usr/lib/firefox-developer-edition/libxul.so #37 0x00007f6d416ec1da in MessageLoop::DoWork() () from /usr/lib/firefox-developer-edition/libxul.so #38 0x00007f6d3f7709bd in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) () from /usr/lib/firefox-developer-edition/libxul.so #39 0x00007f6d416ec042 in MessageLoop::Run() () from /usr/lib/firefox-developer-edition/libxul.so #40 0x00007f6d416edfc2 in base::Thread::ThreadMain() () from /usr/lib/firefox-developer-edition/libxul.so #41 0x00007f6d416edf07 in ThreadFunc(void*) () from /usr/lib/firefox-developer-edition/libxul.so #42 0x00007f6d4e585374 in start_thread () from /usr/lib/libpthread.so.0 #43 0x00007f6d4daab27d in clone () from /usr/lib/libc.so.6
I meant: I am using a GTK3 Aurora build (v40) on Archlinux. Sorry for the double post. https://bbs.archlinux.org/viewtopic.php?id=117157 And I do have layers.acceleration.force-enabled set to true, I will set it back to false to see if that changes anything.
OS: Unspecified → Linux
Whiteboard: gfx-noted
Can you manage to boil down a procedure for at least somewhat reliably reproducing this crash? Or at least explain more what you were doing or what sites you were viewing at the time this occurred?
Flags: needinfo?(anakin.cs)
OS: Linux → Unspecified
Whiteboard: gfx-noted
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Looks like I no longer get it with layers.acceleration.force-enabled set to false, but I am getting all kind of crashes, and the backtrace is different every time. The same thing used to happen when I had OMTC enabled a few versions ago. I can try to set layers.acceleration.force-enabled back to enabled to see if I get the same backtrace. Here's an example of another backtrace I am getting: #0 0x00007fa1b81fb609 in raise () from /usr/lib/libpthread.so.0 #1 0x00007fa1aaa9d688 in nsProfileLock::FatalSignalHandler(int, siginfo_t*, void*) () from /usr/lib/firefox-developer-edition/libxul.so #2 0x00007fa1aae55b68 in AsmJSFaultHandler(int, siginfo_t*, void*) () from /usr/lib/firefox-developer-edition/libxul.so #3 <signal handler called> #4 0x00007fa1ab3692c0 in sandbox_finalize(js::FreeOp*, JSObject*) () from /usr/lib/firefox-developer-edition/libxul.so #5 0x00007fa1ab2599ef in FinalizeArenas(js::FreeOp*, js::gc::ArenaHeader**, js::gc::SortedArenaList&, js::gc::AllocKind, js::SliceBudget&, js::gc::ArenaLists::KeepArenasEnum) () from /usr/lib/firefox-developer-edition/libxul.so #6 0x00007fa1ab26d18f in js::gc::ArenaLists::forceFinalizeNow(js::FreeOp*, js::gc::AllocKind, js::gc::ArenaLists::KeepArenasEnum, js::gc::ArenaHeader**) () from /usr/lib/firefox-developer-edition/libxul.so #7 0x00007fa1ab4d2014 in js::gc::ArenaLists::queueForegroundObjectsForSweep(js::FreeOp*) () from /usr/lib/firefox-developer-edition/libxul.so #8 0x00007fa1ab257e21 in js::gc::GCRuntime::beginSweepingZoneGroup() () from /usr/lib/firefox-developer-edition/libxul.so #9 0x00007fa1ab032416 in js::gc::GCRuntime::sweepPhase(js::SliceBudget&) [clone .cold.1282] () from /usr/lib/firefox-developer-edition/libxul.so #10 0x00007fa1ab4d0b27 in js::gc::GCRuntime::incrementalCollectSlice(js::SliceBudget&, JS::gcreason::Reason) () from /usr/lib/firefox-developer-edition/libxul.so #11 0x00007fa1ab4d070e in js::gc::GCRuntime::gcCycle(bool, js::SliceBudget&, JS::gcreason::Reason) () from /usr/lib/firefox-developer-edition/libxul.so #12 0x00007fa1ab2540d5 in js::gc::GCRuntime::collect(bool, js::SliceBudget, JS::gcreason::Reason) () from /usr/lib/firefox-developer-edition/libxul.so #13 0x00007fa1ab027200 in js::gc::GCRuntime::gcSlice(JS::gcreason::Reason, long) () from /usr/lib/firefox-developer-edition/libxul.so #14 0x00007fa1a9a1556e in nsJSContext::GarbageCollectNow(JS::gcreason::Reason, nsJSContext::IsIncremental, nsJSContext::IsShr---Type <return> to continue, or q <return> to quit--- inking, long) () from /usr/lib/firefox-developer-edition/libxul.so #15 0x00007fa1a92462e5 in nsTimerImpl::Fire() () from /usr/lib/firefox-developer-edition/libxul.so #16 0x00007fa1a9246527 in nsTimerEvent::Run() () from /usr/lib/firefox-developer-edition/libxul.so #17 0x00007fa1ab0bda59 in nsThread::ProcessNextEvent(bool, bool*) () from /usr/lib/firefox-developer-edition/libxul.so #18 0x00007fa1ab0c6b3c in NS_ProcessNextEvent(nsIThread*, bool) () from /usr/lib/firefox-developer-edition/libxul.so #19 0x00007fa1a93e9569 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) () from /usr/lib/firefox-developer-edition/libxul.so #20 0x00007fa1ab3472f2 in MessageLoop::Run() () from /usr/lib/firefox-developer-edition/libxul.so #21 0x00007fa1aa4a786a in nsBaseAppShell::Run() () from /usr/lib/firefox-developer-edition/libxul.so #22 0x00007fa1aaa6e973 in nsAppStartup::Run() () from /usr/lib/firefox-developer-edition/libxul.so #23 0x00007fa1aaaa1a6c in XREMain::XRE_mainRun() () from /usr/lib/firefox-developer-edition/libxul.so #24 0x00007fa1aaa9f3ce in XREMain::XRE_main(int, char**, nsXREAppData const*) [clone .cold.34] () from /usr/lib/firefox-developer-edition/libxul.so #25 0x00007fa1ab405668 in XRE_main () from /usr/lib/firefox-developer-edition/libxul.so #26 0x000000000040e04a in do_main(int, char**, nsIFile*) () #27 0x000000000040d54f in main () Or even, a few minutes before: #0 0x00007f2530ba0609 in raise () from /usr/lib/libpthread.so.0 #1 0x00007f2523442688 in nsProfileLock::FatalSignalHandler(int, siginfo_t*, void*) () from /usr/lib/firefox-developer-edition/libxul.s #2 0x00007f25237fab68 in AsmJSFaultHandler(int, siginfo_t*, void*) () from /usr/lib/firefox-developer-edition/libxul.so #3 <signal handler called> #4 0x00007f2521d29ee0 in mozilla::net::nsHttpResponseHead::Flatten(nsACString_internal&, bool) () from /usr/lib/firefox-developer-edition/libxul.so #5 0x00007f2521d1070c in mozilla::net::DoAddCacheEntryHeaders(mozilla::net::nsHttpChannel*, nsICacheEntry*, mozilla::net::nsHttpReques*, mozilla::net::nsHttpResponseHead*, nsISupports*) () from /usr/lib/firefox-developer-edition/libxul.so #6 0x00007f2521d109df in mozilla::net::nsHttpChannel::InitCacheEntry() () from /usr/lib/firefox-developer-edition/libxul.so #7 0x00007f2521d2154f in mozilla::net::nsHttpChannel::ContinueProcessNormal(nsresult) () from /usr/lib/firefox-developer-edition/libxu #8 0x00007f2521d21768 in mozilla::net::nsHttpChannel::ProcessNormal() () from /usr/lib/firefox-developer-edition/libxul.so #9 0x00007f2521d21e54 in mozilla::net::nsHttpChannel::ProcessResponse() () from /usr/lib/firefox-developer-edition/libxul.so #10 0x00007f2521d22146 in mozilla::net::nsHttpChannel::OnStartRequest(nsIRequest*, nsISupports*) () from /usr/lib/firefox-developer-edition/libxul.so #11 0x00007f2521c38045 in nsInputStreamPump::OnStateStart() () from /usr/lib/firefox-developer-edition/libxul.so #12 0x00007f2521c3c8eb in nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*) () from /usr/lib/firefox-developer-edition/libxul #13 0x00007f2521be1d7e in nsInputStreamReadyEvent::Run() () from /usr/lib/firefox-developer-edition/libxul.so #14 0x00007f2523a62a59 in nsThread::ProcessNextEvent(bool, bool*) () from /usr/lib/firefox-developer-edition/libxul.so #15 0x00007f2523a6bb3c in NS_ProcessNextEvent(nsIThread*, bool) () from /usr/lib/firefox-developer-edition/libxul.so #16 0x00007f2521d8e569 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) () from /usr/lib/firefox-developer-edition/libxu #17 0x00007f2523cec2f2 in MessageLoop::Run() () from /usr/lib/firefox-developer-edition/libxul.so #18 0x00007f2522e4c86a in nsBaseAppShell::Run() () from /usr/lib/firefox-developer-edition/libxul.so #19 0x00007f2523413973 in nsAppStartup::Run() () from /usr/lib/firefox-developer-edition/libxul.so #20 0x00007f2523446a6c in XREMain::XRE_mainRun() () from /usr/lib/firefox-developer-edition/libxul.so #21 0x00007f25234443ce in XREMain::XRE_main(int, char**, nsXREAppData const*) [clone .cold.34] () from /usr/lib/firefox-developer-edition/libxul.so #22 0x00007f2523daa668 in XRE_main () from /usr/lib/firefox-developer-edition/libxul.so #23 0x000000000040e04a in do_main(int, char**, nsIFile*) () #24 0x000000000040d54f in main ()
Flags: needinfo?(anakin.cs)
Summary: Crash on linux gfxXlibSurface::~gfxXlibSurface() → Crash on linux gfxXlibSurface::~gfxXlibSurface() when forcing acceleration on
(In reply to Lee Salzman [:eihrul] from comment #2) > Can you manage to boil down a procedure for at least somewhat reliably > reproducing this crash? Or at least explain more what you were doing or what > sites you were viewing at the time this occurred? It's hard to reproduce, I am hitting the other backtraces most of the time. I had this one once again yesterday after turning acceleration back on, I think it was when watching a flash video.
If you're doing custom builds, I'd need to see your mozconfig is, and any prefs you changed as well beyond the layers acceleration. I am unable to reproduce your crash at least in my own testing when forcing acceleration.
Flags: needinfo?(anakin.cs)
I'm using heftig's archlinux build. You can see the thread here: https://bbs.archlinux.org/viewtopic.php?id=117157 And the different configs are here: http://pkgbuild.com/~heftig/packages/firefox-developer-edition/
Flags: needinfo?(anakin.cs)
I've just had the issue again, it happened while I had two tabs loading, one is private so I can't share it here, and another is: http://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/801441-will-ubuntu-linux-hit-200-million-users-this-year I've reloaded both tabs at the same time and it crashed again.
(In reply to AnAkkk from comment #6) > I'm using heftig's archlinux build. You can see the thread here: > https://bbs.archlinux.org/viewtopic.php?id=117157 > And the different configs are here: > http://pkgbuild.com/~heftig/packages/firefox-developer-edition/ The only thing I found that is fishy in the mozconfig was the --enable-system-cairo option, which should no longer be necessary at all - and should even improve behavior of the resulting build when it is disabled (at least as far as our unit tests show). But even when I tried to enable it, I was still not able to reproduce your crashes on a nightly. Though it might be worth for you to try disabling system cairo in the builds. Also, using custom patches should no longer be required for this as this is all in central now.
This is a firefox aurora build, I could try and see if I get the same crash on nightly though.
I'm currently running this build with the following settings: browser.tabs.remote.autostart=true layers.acceleration.force-enabled=true layers.use-image-offscreen-surfaces=true And no crashes. I'll disable system-cairo for the next build.
(In reply to Jan Steffens from comment #10) > I'm currently running this build with the following settings: > > browser.tabs.remote.autostart=true > layers.acceleration.force-enabled=true > layers.use-image-offscreen-surfaces=true > > And no crashes. > > I'll disable system-cairo for the next build. You will most likely need these patches: https://bugzilla.mozilla.org/show_bug.cgi?id=1159273
Yeah, no. Way too much. I'll keep system-cairo enabled until 41.
I haven't had any crashes so far by using a nightly build with layers.acceleration.force-enabled set to true. It is a normal GTK2 build though. Apparently there is a nightly GTK3 build hosted on mozilla FTP: https://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/elm-linux64/latest/firefox-41.0a1.en-US.linux-x86_64.tar.bz2 Is that correct and should I try on this one? Or are there others differences than just GTK3?
(In reply to Jan Steffens from comment #10) > I'm currently running this build with the following settings: > > browser.tabs.remote.autostart=true > layers.acceleration.force-enabled=true > layers.use-image-offscreen-surfaces=true > > And no crashes. > > I'll disable system-cairo for the next build. Maybe it doesn't crash when using layers.use-image-offscreen-surfaces=true. Could you check if you can reproduce this crash when it's set to false? (and shouldn't this actually default to true in GTK3 builds?)
Whiteboard: gfx-noted
After updating aurora to v41 layers.use-image-offscreen-surfaces now default to true apparently. So you might want to close this bug, anyway I haven't had it again (probably because I've forced it to true when I was on v40).
Oh, this doesn't actually default to true, but Jan Steffens forced it in the builds. Nevermind then.
Can't reproduce anymore, even with layers.use-image-offscreen-surfaces set to false. Closing.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.