Closed Bug 1082660 Opened 10 years ago Closed 10 years ago

Firefox UI freezes with OMTC

Categories

(Core :: Graphics, defect)

33 Branch
x86_64
All
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 1064864

People

(Reporter: janne, Unassigned)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 Build ID: 20141011015303 Steps to reproduce: 1. Install Firefox (I tested release version 33 and nightly 36) 1. Open https://www.mozilla.org/en-US/firefox/desktop/ 2. Scroll down to "Faster at what you do most" section until gray bars are visible Extra info: freeze doesn't happen on my slower machines or if I disable hardware accelerated rendering. Or if I turn off layers.offmainthreadcomposition.enabled. Actual results: Firefox UI freezes and stops updating. Expected results: Firefox should continue to work normally.
>freeze doesn't happen on my slower machines or if I disable hardware accelerated rendering. What video card and driver version is this?
Flags: needinfo?(cse)
Asus GTX Titan and Nvidia drivers 344.11.
Flags: needinfo?(cse)
Component: Untriaged → Graphics
Product: Firefox → Core
Could you type about:support and paste the section "graphics", please/
Reproducible on my machine with Windows 7 too. Open that page in a tab, and scroll down quickly = total Firefox hang. Adapter Description NVIDIA GeForce GTX 670 Adapter Drivers nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um Adapter RAM 2048 Device ID 0x1189 Direct2D Enabled true DirectWrite Enabled true (6.2.9200.16571) Driver Date 9-13-2014 Driver Version 9.18.13.4411 GPU #2 Active false GPU Accelerated Windows 1/1 Direct3D 11 (OMTC) Subsys ID 00000000 Vendor ID 0x10de WebGL Renderer Google Inc. -- ANGLE (NVIDIA GeForce GTX 670 Direct3D9Ex vs_3_0 ps_3_0) windowLayerManagerRemote true AzureCanvasBackend direct2d AzureContentBackend direct2d 1.1 AzureFallbackCanvasBackend cairo AzureSkiaAccelerated 0
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 8.1 → All
Adapter Description NVIDIA GeForce GTX TITAN Adapter Drivers nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um Adapter RAM 4095 Device ID 0x1005 Direct2D Enabled true DirectWrite Enabled true (6.3.9600.17111) Driver Date 9-13-2014 Driver Version 9.18.13.4411 GPU #2 Active false GPU Accelerated Windows 1/1 Direct3D 11 (OMTC) Vendor ID 0x10de WebGL Renderer Google Inc. -- ANGLE (NVIDIA GeForce GTX TITAN Direct3D9Ex vs_3_0 ps_3_0) windowLayerManagerRemote true AzureCanvasBackend direct2d AzureContentBackend direct2d AzureFallbackCanvasBackend cairo AzureSkiaAccelerated 0
Breaking into a hanging debug build didn't reveal much useful. We actually do still close if you click the Windows close button, so it's not really a total hang. Just the UI becoming totally unresponsive. The logs, however, are more revealing: [4860] WARNING: Could not copy render target - source rect out of bounds: file c:/mozilla/mozilla-central/gfx/layers/d3d11/CompositorD3D11.cpp, line 478 [4860] WARNING: Could not copy render target - source rect out of bounds: file c:/mozilla/mozilla-central/gfx/layers/d3d11/CompositorD3D11.cpp, line 478 [4860] WARNING: Failed to open shared texture: file c:\mozilla\mozilla-central\gfx\layers\d3d11/TextureD3D11.cpp, line 435 [4860] WARNING: Failed to open shared texture: file c:\mozilla\mozilla-central\gfx\layers\d3d11/TextureD3D11.cpp, line 435 [4860] WARNING: Failed to open shared texture: file c:\mozilla\mozilla-central\gfx\layers\d3d11/TextureD3D11.cpp, line 435 [4860] WARNING: Failed to open shared texture: file c:\mozilla\mozilla-central\gfx\layers\d3d11/TextureD3D11.cpp, line 435 [4860] WARNING: Failed to open shared texture: file c:\mozilla\mozilla-central\gfx\layers\d3d11/TextureD3D11.cpp, line 435 [4860] WARNING: Failed to open shared texture: file c:\mozilla\mozilla-central\gfx\layers\d3d11/TextureD3D11.cpp, line 435 [4860] WARNING: Failed to open shared texture: file c:\mozilla\mozilla-central\gfx\layers\d3d11/TextureD3D11.cpp, line 435 [4860] WARNING: Failed to open shared texture: file c:\mozilla\mozilla-central\gfx\layers\d3d11/TextureD3D11.cpp, line 435 [4860] WARNING: Failed to open shared texture: file c:\mozilla\mozilla-central\gfx\layers\d3d11/TextureD3D11.cpp, line 435 [4860] WARNING: Failed to open shared texture: file c:\mozilla\mozilla-central\gfx\layers\d3d11/TextureD3D11.cpp, line 435 [4860] ###!!! ASSERTION: Could not create texture: 'texture', file c:/mozilla/mozilla-central/gfx/layers/d3d11/CompositorD3D11.cpp, line 451 This goes on for thousands of lines.
A small nitpick on srcBox.back at CompositorD3D11.cpp:34, pixel ranges in D3D_BOX are half-open, so if front is 0, back shall be 1 unless you want a 0-pixel thick slice. http://msdn.microsoft.com/en-us/library/windows/desktop/ff476089%28v=vs.85%29.aspx
Blocks: 899785
(In reply to Lars Viklund from comment #7) > A small nitpick on srcBox.back at CompositorD3D11.cpp:34, pixel ranges in > D3D_BOX are half-open, so if front is 0, back shall be 1 unless you want a > 0-pixel thick slice. Fixed in bug 1057716. You're looking at an outdated source tree.
It looks like the "Could not copy render target - source rect out of bounds" warning is unrelated, I don't always get that if I hang. Here's the backtrace for the failing CreateTexture: D3D11_TEXTURE2D_DESC = {Width=260 Height=52 MipLevels=1 ...} > xul.dll!mozilla::layers::CompositorD3D11::CreateRenderTargetFromSource(const mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> & aRect, const mozilla::layers::CompositingRenderTarget * aSource, const mozilla::gfx::IntPointTyped<mozilla::gfx::UnknownUnits> & aSourcePoint) Line 453 C++ xul.dll!mozilla::layers::CreateTemporaryTargetAndCopyFromBackground<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite * aContainer, mozilla::layers::LayerManagerComposite * aManager) Line 397 + 0x16 bytes C++ xul.dll!mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite * aContainer, mozilla::layers::LayerManagerComposite * aManager, const nsIntRect & aClipRect) Line 430 + 0xd bytes C++ xul.dll!mozilla::layers::ContainerLayerComposite::RenderLayer(const nsIntRect & aClipRect) Line 545 + 0x15 bytes C++ xul.dll!mozilla::layers::RenderLayers<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite * aContainer, mozilla::layers::LayerManagerComposite * aManager, const mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> & aClipRect) Line 325 + 0x32 bytes C++ xul.dll!mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite * aContainer, mozilla::layers::LayerManagerComposite * aManager, const nsIntRect & aClipRect) Line 471 + 0x22 bytes C++ xul.dll!mozilla::layers::ContainerLayerComposite::RenderLayer(const nsIntRect & aClipRect) Line 545 + 0x15 bytes C++ xul.dll!mozilla::layers::RenderLayers<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite * aContainer, mozilla::layers::LayerManagerComposite * aManager, const mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> & aClipRect) Line 325 + 0x32 bytes C++ xul.dll!mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite * aContainer, mozilla::layers::LayerManagerComposite * aManager, const nsIntRect & aClipRect) Line 471 + 0x22 bytes C++ xul.dll!mozilla::layers::ContainerLayerComposite::RenderLayer(const nsIntRect & aClipRect) Line 545 + 0x15 bytes C++ xul.dll!mozilla::layers::RenderLayers<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite * aContainer, mozilla::layers::LayerManagerComposite * aManager, const mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> & aClipRect) Line 325 + 0x32 bytes C++ xul.dll!mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite * aContainer, mozilla::layers::LayerManagerComposite * aManager, const nsIntRect & aClipRect) Line 471 + 0x22 bytes C++ xul.dll!mozilla::layers::ContainerLayerComposite::RenderLayer(const nsIntRect & aClipRect) Line 545 + 0x15 bytes C++ xul.dll!mozilla::layers::RenderLayers<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite * aContainer, mozilla::layers::LayerManagerComposite * aManager, const mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> & aClipRect) Line 325 + 0x32 bytes C++ xul.dll!mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite * aContainer, mozilla::layers::LayerManagerComposite * aManager, const nsIntRect & aClipRect) Line 471 + 0x22 bytes C++ xul.dll!mozilla::layers::ContainerLayerComposite::RenderLayer(const nsIntRect & aClipRect) Line 545 + 0x15 bytes C++ xul.dll!mozilla::layers::LayerManagerComposite::Render() Line 676 C++ xul.dll!mozilla::layers::LayerManagerComposite::EndTransaction(void (mozilla::layers::PaintedLayer *, gfxContext *, const nsIntRegion &, mozilla::layers::DrawRegionClip, const nsIntRegion &, void *)* aCallback, void * aCallbackData, mozilla::layers::LayerManager::EndTransactionFlags aFlags) Line 261 C++ xul.dll!mozilla::layers::LayerManagerComposite::EndEmptyTransaction(mozilla::layers::LayerManager::EndTransactionFlags aFlags) Line 211 C++ xul.dll!mozilla::layers::CompositorParent::CompositeToTarget(mozilla::gfx::DrawTarget * aTarget, const nsIntRect * aRect) Line 711 C++ xul.dll!mozilla::layers::CompositorParent::CompositeCallback() Line 646 C++ xul.dll!MessageLoop::RunTask(Task * task) Line 359 C++ xul.dll!MessageLoop::DeferOrRunPendingTask(const MessageLoop::PendingTask & pending_task) Line 369 C++ xul.dll!MessageLoop::DoWork() Line 444 + 0x5 bytes C++ xul.dll!base::MessagePumpForUI::DoRunLoop() Line 216 + 0xa bytes C++ xul.dll!base::MessagePumpWin::RunWithDispatcher(base::MessagePump::Delegate * delegate, base::MessagePumpWin::Dispatcher * dispatcher) Line 56 C++ xul.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) Line 78 + 0xd bytes C++ xul.dll!MessageLoop::RunInternal() Line 230 + 0xf bytes C++ xul.dll!MessageLoop::RunHandler() Line 224 C++ xul.dll!MessageLoop::Run() Line 198 C++ xul.dll!base::Thread::ThreadMain() Line 173 C++ xul.dll!`anonymous namespace'::ThreadFunc(void * closure) Line 27 C++ kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
Well I'll be damned. The fix pointed out in comment 7 is actually the *cause* of this bug! $ hg bisect -b The first bad revision is: changeset: 201728:b5ccef6b01ec user: Jeff Muizelaar <jmuizelaar@mozilla.com> date: Tue Aug 26 14:33:03 2014 -0400 summary: Bug 1057716. d3d11: Properly copy the background. r=bas
Blocks: 1057716
Jeff, Bas, let's sort this out quickly and uplift if necessary?
Flags: needinfo?(jmuizelaar)
Flags: needinfo?(bas)
Keywords: regression
I would not say cause, but a trigger revealing underlying bogus code. An empty box is documented to be a no-op for functions like CopySubresourceRegion, so before that commit, the operations did nothing. MSDN on ID3D11DeviceContext::CopySubresourceRegion: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476394%28v=vs.85%29.aspx > An empty box results in a no-op. A box is empty if the top value is > greater than or equal to the bottom value, or the left value is > greater than or equal to the right value, or the front value is > greater than or equal to the back value. When the box is empty, > CopySubresourceRegion doesn't perform a copy operation. > Notice, that for a 2D texture, front and back are set to 0 and 1 > respectively.
bug 1064864 and bug 1067317 have similar STRs. Dupes?
(In reply to Elbart from comment #13) > bug 1064864 and bug 1067317 have similar STRs. > > Dupes? Possible, though they seem to end up with a white window instead of frozen content. Checking whether a Nightly immediately before and after the commit identified in comment 10 triggers them would be useful.
(In reply to Gian-Carlo Pascutto [:gcp] from comment #14) > (In reply to Elbart from comment #13) > > bug 1064864 and bug 1067317 have similar STRs. > > > > Dupes? > > Possible, though they seem to end up with a white window instead of frozen content. Looks like a dupe of bug #1064864 - Window with few tabs is LOCKED, FROZEN and ALL WHITE in some odd cases. If you think otherwise please reopen.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(bas)
Is it possible for you to make a reduced test case of the page that causes the hang?
Flags: needinfo?(gpascutto)
That page is far beyond my HTML/CSS skills. Maybe you can find whoever made it at Moz and see if they have a graphics card that can reproduce it, though.
Flags: needinfo?(gpascutto)
You need to log in before you can comment on or make changes to this bug.