New issue
Advanced search Search tips

Issue 806635 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

viz_content_browsertests: Cannot run certain tests due to shmem OOM on 32-bit Linux Debug

Project Member Reported by m...@chromium.org, Jan 29 2018

Issue description

New tests in content_browsertests, WebContentsVideoCaptureDeviceBrowserTest.* fail to run on the Linux bots in the waterfall. The root cause seems to be that when these tests are run in a particular way(*), the shared memory pool being managed by viz::InterprocessFramePool encounters OS failures around an unlink() call in shared_memory_helper.cc:

https://cs.chromium.org/chromium/src/base/memory/shared_memory_helper.cc?rcl=1c6d493beeda1b183a95c41598160f6ff51fbaf3&l=22

(*) The particular way being that:

1. Tests are being run in-parallel, rather than single-process mode.

2. The extra --enable-features=VizDisplayCompositor command line flag is being used, which means the shmem pool exists in the GPU process instead of the browser process.

Note that the regular content_browsertests run does not have any issues (the shmem pool exists in the browser process instad).

Example failure logs (from https://ci.chromium.org/buildbot/chromium.linux/Linux%20Tests%20%28dbg%29%281%29%2832%29/47651):

[17267:17294:0126/232827.150906:WARNING:shared_memory_helper.cc(23)] unlink: Operation not permitted (1)
[17267:17294:0126/232827.151470:ERROR:video_capture_buffer_pool_impl.cc(231)] Error initializing VideoCaptureBufferTracker

 

Comment 1 by m...@chromium.org, Jan 29 2018

Also, it's worth noting that ONLY the Linux dbg bots failed to run the tests. The Linux release bots ran fine, as did all other desktop platforms (including CrOS).
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d26dcac0a6390fb039dee8eaec0906411164c7a9

commit d26dcac0a6390fb039dee8eaec0906411164c7a9
Author: Yuri Wiitala <miu@chromium.org>
Date: Mon Jan 29 04:37:30 2018

Re-land "FrameSinkVideoCapturer: Fix refresh logic for damaged sources."

This reverts commit 52c31b740b1d124a4a9fa521e65ee0c0dc20b724, to re-land
the original CL (https://chromium-review.googlesource.com/884996). The
viz_content_browsertests were failing because of a bug in the posix
shmem impl (in base/memory/shared_memory_helper.cc) when the pool is
being run in the VIZ process. For now, the tests have been added to the
viz_content_browsertests filter file; and once the root-cause issue has
been resolved, they can be re-enabled.

TBR=xjz@chromium.org,kylechar@chromium.org

Bug:  806635 ,  785072 ,  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I0f419ce2aee170a0fbd966ff8e10bb99c3b7067f
Reviewed-on: https://chromium-review.googlesource.com/889934
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532322}
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/video_capture/capturable_frame_sink.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/android/screen_capture_machine_android.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/screen_capture_device_core.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/screen_capture_device_core.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/video_capture_oracle.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/video_capture_oracle.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/video_capture_oracle_unittest.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/testing/buildbot/filters/viz.content_browsertests.filter

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad

commit 13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad
Author: vitaliii <vitaliii@chromium.org>
Date: Mon Jan 29 11:37:48 2018

Revert "Re-land "FrameSinkVideoCapturer: Fix refresh logic for damaged sources.""

This reverts commit d26dcac0a6390fb039dee8eaec0906411164c7a9.

Reason for revert: Seems to cause an exception (time out) on Linux ChromiumOS MSan Tests (see  crbug.com/806715 ). The original CL (the one relanded) caused this exception too.

Original change's description:
> Re-land "FrameSinkVideoCapturer: Fix refresh logic for damaged sources."
> 
> This reverts commit 52c31b740b1d124a4a9fa521e65ee0c0dc20b724, to re-land
> the original CL (https://chromium-review.googlesource.com/884996). The
> viz_content_browsertests were failing because of a bug in the posix
> shmem impl (in base/memory/shared_memory_helper.cc) when the pool is
> being run in the VIZ process. For now, the tests have been added to the
> viz_content_browsertests filter file; and once the root-cause issue has
> been resolved, they can be re-enabled.
> 
> TBR=xjz@chromium.org,kylechar@chromium.org
> 
> Bug:  806635 ,  785072 ,  754872 
> Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
> Change-Id: I0f419ce2aee170a0fbd966ff8e10bb99c3b7067f
> Reviewed-on: https://chromium-review.googlesource.com/889934
> Commit-Queue: Yuri Wiitala <miu@chromium.org>
> Reviewed-by: Yuri Wiitala <miu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#532322}

TBR=miu@chromium.org,kylechar@chromium.org,xjz@chromium.org

Change-Id: Ia3715ed63494598badbe85e2f418b792c952dadb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  806635 ,  785072 ,  754872 ,  806715 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/890445
Reviewed-by: vitaliii <vitaliii@chromium.org>
Commit-Queue: vitaliii <vitaliii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532395}
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/video_capture/capturable_frame_sink.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/android/screen_capture_machine_android.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/screen_capture_device_core.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/screen_capture_device_core.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/video_capture_oracle.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/video_capture_oracle.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/video_capture_oracle_unittest.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/testing/buildbot/filters/viz.content_browsertests.filter

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/910087dc8404fb0df27a9fc27e236777a86954c1

commit 910087dc8404fb0df27a9fc27e236777a86954c1
Author: Yuri Wiitala <miu@chromium.org>
Date: Mon Jan 29 21:39:07 2018

Re-Re-land "FrameSinkVideoCapturer: Fix refresh logic for damaged sources."

This reverts commit 13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad, to re-land
the original patch (https://chromium-review.googlesource.com/884996)
again. This patch contains fixes needed to restore tab capture
functionality and clear up failing perf waterfall bots.

This time, I'm landing with the "sensitive to random bots not in the CQ"
content_browsertests disabled. I will re-enable them in a separate
change so that people stop reverting this very important fix, the act of
which keeps making things worse elsewhere.

TBR=xjz@chromium.org,kylechar@chromium.org

Bug:  806635 ,  785072 ,  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I15ac4faaa168eb57f1775b70148382c3933de82f
Reviewed-on: https://chromium-review.googlesource.com/891541
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532598}
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/video_capture/capturable_frame_sink.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/android/screen_capture_machine_android.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/screen_capture_device_core.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/screen_capture_device_core.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/video_capture_oracle.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/video_capture_oracle.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/video_capture_oracle_unittest.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/testing/buildbot/filters/viz.content_browsertests.filter

Comment 5 by m...@chromium.org, Jan 30 2018

Summary: viz_content_browsertests: Cannot run certain tests due to shmem OOM on 32-bit Linux Debug (was: viz_content_browsertests: Cannot run certain tests due to shmem unlink() call errors on Linux)
It seems this is being caused by running out of address space when running the 32-bit debug build. This will require special handling in the implementation.

Comment 6 by m...@chromium.org, Feb 7 2018

Components: Internals>Media>ScreenCapture

Comment 7 by m...@chromium.org, Feb 7 2018

Components: -Internals>Media>Capture

Comment 8 by m...@chromium.org, Feb 8 2018

Status: Started (was: Assigned)
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa3b9baaee9e212ae25390143d51a46920a2e380

commit aa3b9baaee9e212ae25390143d51a46920a2e380
Author: Yuri Wiitala <miu@chromium.org>
Date: Tue Feb 13 22:22:04 2018

InterprocessFramePool rewritten to also work with ChromeOS sandbox.

The existing viz::InterprocessFramePool implementation used
media::VideoCaptureBufferPoolImpl, which allocates shared memory using
base::SharedMemory directly. However, on ChromeOS with VIZ enabled, the
VIZ process's sandbox broker prevents this from working. The solution
was to rewrite InterprocessFramePool to allocate shared memory using
mojo public APIs instead, which is a solution that works for all
platforms.

Since the pool had to be mostly rewritten, its interface was simplified
slightly, to better match the specific needs of the client code.

This change also fixes test timeouts we see in debug builds by removing
the use of the kUseGpuInTests switch in WebContentsVideoCaptureDevice
browser tests. It turns out that this was causing a huge pause in the
tests (12+ seconds) just to spin-up the GPU and render processes in
content_browsertests, which was enough to get them to time out on the
bots.

Bug:  806635 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Id18b3e90bfbdcd876b2418c9ef86757dba84a849
Reviewed-on: https://chromium-review.googlesource.com/908095
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536510}
[modify] https://crrev.com/aa3b9baaee9e212ae25390143d51a46920a2e380/components/viz/service/BUILD.gn
[modify] https://crrev.com/aa3b9baaee9e212ae25390143d51a46920a2e380/components/viz/service/frame_sinks/DEPS
[modify] https://crrev.com/aa3b9baaee9e212ae25390143d51a46920a2e380/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/aa3b9baaee9e212ae25390143d51a46920a2e380/components/viz/service/frame_sinks/video_capture/interprocess_frame_pool.cc
[modify] https://crrev.com/aa3b9baaee9e212ae25390143d51a46920a2e380/components/viz/service/frame_sinks/video_capture/interprocess_frame_pool.h
[modify] https://crrev.com/aa3b9baaee9e212ae25390143d51a46920a2e380/components/viz/service/frame_sinks/video_capture/interprocess_frame_pool_unittest.cc
[modify] https://crrev.com/aa3b9baaee9e212ae25390143d51a46920a2e380/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc
[modify] https://crrev.com/aa3b9baaee9e212ae25390143d51a46920a2e380/testing/buildbot/filters/viz.content_browsertests.filter

Comment 10 by m...@chromium.org, Feb 14 2018

Status: Fixed (was: Started)

Sign in to add a comment