GPU Process memory leak when video rendered onto WebGL texture
Reported by
boxnumbe...@gmail.com,
Aug 3 2016
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 Example URL: http://threejs.org/examples/webgl_video_panorama_equirectangular.html Steps to reproduce the problem: 1. Open URL in Chrome 2. Open Chrome task manager 3. In Chrome task manager, observe Memory value for the GPU Process task What is the expected behavior? In Chrome task manager, the Memory value for the GPU Process task should not increase over time. What went wrong? In Chrome task manager, the Memory value for the GPU Process task increases about .75 MB every minute. (Observed over 24 hours.) Did this work before? N/A Is it a problem with Flash or HTML5? HTML5 Does this work in other browsers? Yes Chrome version: 51.0.2704.106 Channel: n/a OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Shockwave Flash 22.0 r0 No memory leak was observed in Firefox. With 2D canvas acceleration disabled in Chrome the leak still occurs. A second stripped-down code example which exhibits the leak can be found here: http://stackoverflow.com/questions/38621022/texture-from-video-tag-leaks-memory
,
Aug 3 2016
I think we're leaking texture mailbox mappings. ImageBuffer::copyToPlatformTexture is called every frame and creates a new mailbox, which causes MailboxManagerImpl::InsertTexture to add a map between mailbox and texture. However, we only ever delete these mappings when the texture is deleted, so the set of mappings keeps growing. I'm not sure the best way to fix this. Maybe ProduceTexture(Direct) with a texture ID of 0 should unbind the texture from the mailbox.
,
Aug 3 2016
,
Aug 5 2016
John's got a CL up for this so assigning.
,
Aug 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c5fb6dd04f15201c85d37695b647c0a08d8ee053 commit c5fb6dd04f15201c85d37695b647c0a08d8ee053 Author: jbauman <jbauman@chromium.org> Date: Fri Aug 05 23:02:41 2016 Unbind video texture from mailbox after copying to WebGL. Every time a video is copied to WebGL a new mailbox was associated with the texture. Since the texture is cached indefinitely the mapping between textures and mailboxes was growing forever. We can use glProduceTextureDirectCHROMIUM to unbind textures and mailboxes in this case. BUG= 634012 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2207253002 Cr-Commit-Position: refs/heads/master@{#410204} [modify] https://crrev.com/c5fb6dd04f15201c85d37695b647c0a08d8ee053/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_texture_mailbox.txt [modify] https://crrev.com/c5fb6dd04f15201c85d37695b647c0a08d8ee053/gpu/command_buffer/service/gles2_cmd_decoder.cc [modify] https://crrev.com/c5fb6dd04f15201c85d37695b647c0a08d8ee053/gpu/command_buffer/service/mailbox_manager_impl.cc [modify] https://crrev.com/c5fb6dd04f15201c85d37695b647c0a08d8ee053/gpu/command_buffer/service/mailbox_manager_sync.cc [modify] https://crrev.com/c5fb6dd04f15201c85d37695b647c0a08d8ee053/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
,
Sep 16 2016
Is there an ETA when the fix will get into a Chrome release? Thanks!
,
Sep 16 2016
Not sure how I accidentally assigned myself to this. John, does your CL above fix this? Thanks.
,
Sep 16 2016
Yeah, this should be fixed in M54.
,
Mar 30 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by dalecur...@chromium.org
, Aug 3 2016