Closed Bug 1410766 Opened 2 years ago Closed 2 years ago

GPUProcessManager::SimulateDeviceReset() causes GetDXGIAdapter() nullptr

Categories

(Core :: Graphics, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file, 3 obsolete files)

I saw the following log when GPUProcessManager::SimulateDeviceReset() was called during GPU process was enabled on windows. It is because GetDXGIAdapter() returned nullptr.

 - [GFX1-]: Could not get a DXGI adapter
Assignee: nobody → sotaro.ikeda.g
Component: Graphics: Layers → Graphics
GPUProcessManager::SimulateDeviceReset() calls GPUProcessManager::OnRemoteProcessDeviceReset(), but SimulateDeviceReset() does not trigger updating devices in GPU process.

  https://dxr.mozilla.org/mozilla-central/source/gfx/ipc/GPUProcessManager.cpp#418
(In reply to Sotaro Ikeda [:sotaro] from comment #0)
> It is because GetDXGIAdapter() returned nullptr.
> 
>  - [GFX1-]: Could not get a DXGI adapter

DeviceManagerDx::GetDXGIAdapter() failed to create DXGIAdapter, since all fields of mDeviceStatus->adapter() were 0.
See Also: → 1408490
Attachment #8920928 - Flags: review?(dvander)
Priority: -- → P3
Whiteboard: [gfx-noted]
Comment on attachment 8920928 [details] [diff] [review]
patch - Re-acquireDevices in gpu process when SimulateDeviceReset() is called

Review of attachment 8920928 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/ipc/PGPU.ipdl
@@ +77,5 @@
>    async RemoveLayerTreeIdMapping(LayerTreeIdMapping mapping);
>  
>    // Request the current DeviceStatus from the GPU process. This blocks until
>    // one is available (i.e., Init has completed).
> +  sync GetDeviceStatus(bool reacquireDevices) returns (GPUDeviceData status);

The functionality seems fine, but please add it in a new message instead of using GetDeviceStatus.
Attachment #8920928 - Flags: review?(dvander)
Attachment #8922141 - Flags: review?(dvander)
Comment on attachment 8922141 [details] [diff] [review]
patch - Re-acquireDevices in gpu process when SimulateDeviceReset() is called

Review of attachment 8922141 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8922141 - Flags: review?(dvander) → review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6eac731d5c33
Re-acquireDevices in gpu process when SimulateDeviceReset() is called r=dvander
Pretty sure the backout was incorrect.

https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&filter-searchStr=osx%20reftest&group_state=expanded&fromchange=92767404525aaee96990e37309cb2791fa3d1911&tochange=4f573aaf7650829998fa393ccf788e9c04b4d3c2

The reftest failure happens on the previous push as well but because of coalescing the reftest didn't run on that push until I backfilled it. I triggered the reftest job on the backout push as well so let's see if it persists.
Flags: needinfo?(acraciun)
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/817727beee91
Re-acquireDevices in gpu process when SimulateDeviceReset() is called r=dvander
Sorry about that, relanded that push and backed out bug 1411860 and bug 1411886 from the previous push instead.
Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(acraciun)
Backed out for leak - only on Windows 10?

https://hg.mozilla.org/integration/mozilla-inbound/rev/d7d02c88c7ba1d210364d296162f3ac2740672c4

See e.g. https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=e863dc231d0095d0cc7bc1ddbf83a51c6958c343&filter-resultStatus=usercancel&filter-resultStatus=runnable&filter-resultStatus=retry&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=139970845&repo=mozilla-inbound

12:38:42     INFO - TEST-PASS | leakcheck | default process: no leaks detected!
12:38:42     INFO - 
12:38:42     INFO - == BloatView: ALL (cumulative) LEAK AND BLOAT STATISTICS, gpu process 5176
12:38:42     INFO - 
12:38:42     INFO -      |<----------------Class--------------->|<-----Bytes------>|<----Objects---->|
12:38:42     INFO -      |                                      | Per-Inst   Leaked|   Total      Rem|
12:38:42     INFO -    0 |TOTAL                                 |       22      512|  949963        8|
12:38:42     INFO -   25 |DeviceAttachmentsD3D11                |      336      336|       1        1|
12:38:42     INFO -  112 |SyncObjectHost                        |       16       16|       3        1|
12:38:42     INFO -  120 |TextureHost                           |       40       40|     189        1|
12:38:42     INFO -  123 |TextureSource                         |       32       64|     827        2|
12:38:42     INFO -  124 |TextureSourceProvider                 |       40       40|       6        1|
12:38:42     INFO -  162 |nsTArray_base                         |        8       16|  133223        2|
12:38:42     INFO - 
12:38:42     INFO - nsTraceRefcnt::DumpStatistics: 169 entries
12:38:42     INFO - TEST-INFO | leakcheck | gpu process: leaked 1 DeviceAttachmentsD3D11
12:38:42     INFO - TEST-INFO | leakcheck | gpu process: leaked 1 SyncObjectHost
12:38:42     INFO - TEST-INFO | leakcheck | gpu process: leaked 1 TextureHost
12:38:42     INFO - TEST-INFO | leakcheck | gpu process: leaked 2 TextureSource
12:38:42     INFO - TEST-INFO | leakcheck | gpu process: leaked 1 TextureSourceProvider
12:38:42     INFO - TEST-INFO | leakcheck | gpu process: leaked 2 nsTArray_base
12:38:42    ERROR - TEST-UNEXPECTED-FAIL | leakcheck | gpu process: 512 bytes leaked (DeviceAttachmentsD3D11, SyncObjectHost, TextureHost, TextureSource, TextureSourceProvider, ...)
12:38:42     INFO - 
12:38:42     INFO - == BloatView: ALL (cumulative) LEAK AND BLOAT STATISTICS, tab process 2804
12:38:42     INFO - 
12:38:42     INFO -      |<----------------Class--------------->|<-----Bytes------>|<----Objects---->|
12:38:42     INFO -      |                                      | Per-Inst   Leaked|   Total      Rem|
12:38:42     INFO -    0 |TOTAL                                 |       51       20|   42290        2|
12:38:42     INFO -  488 |nsStringBuffer                        |       12       12|   15663        1|
12:38:42     INFO -  524 |nsTArray_base                         |        8        8|    7978        1|
12:38:42     INFO - 
12:38:42     INFO - nsTraceRefcnt::DumpStatistics: 573 entries
12:38:42     INFO - TEST-INFO | leakcheck | tab process: leaked 1 nsStringBuffer
12:38:42     INFO - TEST-INFO | leakcheck | tab process: leaked 1 nsTArray_base
12:38:42  WARNING - leakcheck | tab process: 20 bytes leaked (nsStringBuffer, nsTArray_base)
Flags: needinfo?(sotaro.ikeda.g)
(In reply to Sebastian Hengst [:aryx][:archaeopteryx] (needinfo on intermittent or backout) from comment #15)
> Backed out for leak - only on Windows 10?

Thanks. I am going to look into the leak.
Flags: needinfo?(sotaro.ikeda.g)
Attachment #8924869 - Flags: review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a5a2ae162869
Re-acquireDevices in gpu process when SimulateDeviceReset() is called r=dvander
https://hg.mozilla.org/mozilla-central/rev/a5a2ae162869
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.