New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 848035 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 27
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 860533

Blocking:
issue 873321



Sign in to add a comment

Replace OSMesa by SwiftShader for cc_unittests and viz_unittests

Project Member Reported by sugoi@chromium.org, May 30 2018

Issue description

SwiftShader is a high performance implementation of the OpenGL
and Direct3D graphics APIs which runs purely on the CPU.

The SwiftShader library has recently been properly integrated
into Chromium and is used for running chromium Layout Tests.
The next step is to also use it not for all other tests on
bots, instead of OSMesa, which currently has a number of issues.

This issue will be used to track the overall progress of this
task.
 

Comment 1 by danakj@chromium.org, May 30 2018

Cc: weiliangc@chromium.org vmp...@chromium.org piman@chromium.org enne@chromium.org ericrk@chromium.org

Comment 2 by danakj@chromium.org, May 30 2018

Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, May 30 2018

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

commit af825d04a36390bbe8373bded7078fc617ed3e35
Author: Alexis Hetu <sugoi@google.com>
Date: Wed May 30 23:24:33 2018

Viz unittest YUV fix

When an OpenGL implementation exposes the GL_OES_texture_half_float_linear
extension, the YUV format can be set to L16F. Since OSMesa doesn't
expose this extension, the test currently doesn't fail in this case, but
it fails when ran with SwiftShader. This fixes the issue.

Bug:  chromium:848035 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I076ee00ba187f6d89cc51de41f15f0872d4d728c
Reviewed-on: https://chromium-review.googlesource.com/1080030
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Fredrik Hubinette <hubbe@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563060}
[modify] https://crrev.com/af825d04a36390bbe8373bded7078fc617ed3e35/components/viz/service/display/renderer_pixeltest.cc

Comment 4 by xing...@intel.com, Jun 7 2018

Cc: xing...@intel.com
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 7 2018

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

commit e1471a50e949db6cd04da2ec3565a841c5e36d00
Author: Alexis Hetu <sugoi@google.com>
Date: Thu Jun 07 17:19:13 2018

Expose GL_CHROMIUM_texture_filtering_hint

When running chromium unit tests using SwiftShader, we need a way to enable
high precision filtering. In order to do that, the GL command decoder must
allow the GL_TEXTURE_FILTERING_HINT_CHROMIUM hint to be used. This cl allows
access to this hint inside unit tests.

Bug:  chromium:848035 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I0a2f90b1cff4767f82175cd20f87c83e900f3e20
Reviewed-on: https://chromium-review.googlesource.com/1080020
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565313}
[modify] https://crrev.com/e1471a50e949db6cd04da2ec3565a841c5e36d00/gpu/command_buffer/build_cmd_buffer_lib.py
[modify] https://crrev.com/e1471a50e949db6cd04da2ec3565a841c5e36d00/gpu/command_buffer/build_gles2_cmd_buffer.py
[modify] https://crrev.com/e1471a50e949db6cd04da2ec3565a841c5e36d00/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
[modify] https://crrev.com/e1471a50e949db6cd04da2ec3565a841c5e36d00/gpu/command_buffer/service/context_state_autogen.h
[modify] https://crrev.com/e1471a50e949db6cd04da2ec3565a841c5e36d00/gpu/command_buffer/service/context_state_impl_autogen.h
[modify] https://crrev.com/e1471a50e949db6cd04da2ec3565a841c5e36d00/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/e1471a50e949db6cd04da2ec3565a841c5e36d00/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
[modify] https://crrev.com/e1471a50e949db6cd04da2ec3565a841c5e36d00/gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h
[modify] https://crrev.com/e1471a50e949db6cd04da2ec3565a841c5e36d00/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h

Project Member

Comment 6 by bugdroid1@chromium.org, Jun 22 2018

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

commit a5f0e9496a469453a337c636c430748e460ed888
Author: Alexis Hetu <sugoi@google.com>
Date: Fri Jun 22 17:27:41 2018

Added missing entries for SwiftShader on ChromeOS

On ChromeOS, for both gbm and wayland platforms, SwiftShader had been
added to the list of allowed GL implementations without being added to
their corresponding GetGLOzone functions. This adds the missing entries.

Also, on gbm, the GetGLOzone function had a thread checker, which no
other platform has. Since it was making the SwiftShader implementation
fail, I removed it. It may have been a mistake in the conversion
process and had been added here:
https://codereview.chromium.org/2327813002/diff/20001/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc

Bug:  chromium:848035 
Change-Id: I8c88dcd84974668b935c96e669a4b2c642a3ba21
Reviewed-on: https://chromium-review.googlesource.com/1111332
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569679}
[modify] https://crrev.com/a5f0e9496a469453a337c636c430748e460ed888/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
[modify] https://crrev.com/a5f0e9496a469453a337c636c430748e460ed888/ui/ozone/platform/wayland/wayland_surface_factory.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 27 2018

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

commit 713aa9f97258451574be43b5d0138348508c4fa1
Author: Alexis Hetu <sugoi@google.com>
Date: Wed Jun 27 02:45:09 2018

Allow SwiftShader on Ozone

EGL was assumed to be EGLGLES2 on Ozone, but it can also be
SwiftShader if SwiftShader is enabled.

Bug:  chromium:848035 
Change-Id: Iaec05de39e2077b36d5b46928eac0134799989bb
Reviewed-on: https://chromium-review.googlesource.com/1115566
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570643}
[modify] https://crrev.com/713aa9f97258451574be43b5d0138348508c4fa1/ui/ozone/common/gl_ozone_egl.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 4

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

commit 9f1eb0bad804bf4ebfe8202fe91413450f9cf062
Author: Alexis Hetu <sugoi@google.com>
Date: Wed Jul 04 01:47:25 2018

Switching all ui/gl dependent tests to SwiftShader

This cl's switches cc_unittests and viz_unittests from OSMesa
to SwiftShader and fixes other issues related to that change.

 Bug chromium:848035 

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ib1b58e02d4df4a687ef7be57284c06097bdeca94
Reviewed-on: https://chromium-review.googlesource.com/1070490
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572442}
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/cc/paint/transfer_cache_unittest.cc
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/cc/test/layer_tree_test.cc
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/cc/trees/layer_tree_host_pixeltest_masks.cc
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/service/display/renderer_pixeltest.cc
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/anti_aliasing.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/anti_aliasing_perspective.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/axis_aligned.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/background_filter_blur.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/background_filter_blur_off_axis.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/background_filter_blur_outsets.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/background_filter_on_scaled_layer_gl.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/background_filter_rotated_gl.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/blue_yellow_alpha.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/blue_yellow_alpha_translate.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/blue_yellow_filter_chain.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/blue_yellow_flipped_dither.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/blue_yellow_partial_flipped_dither.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/blur_filter_with_clip_gl.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/intersecting_blue_green_squares_video.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/intersecting_light_dark_squares_video.png
[add] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/mask_as_blending_rotated_circle_gl.png
[add] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/mask_as_blending_rotated_circle_underflow_gl.png
[add] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/mask_of_background_filter_gpu.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/rotated_drop_shadow_filter_gl.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/rotated_filter_gl.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/scaled_render_surface_layer_gl.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/spiral_64_scale.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/components/viz/test/data/translated_blue_green_alpha_gl.png
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/ui/gl/BUILD.gn
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/ui/gl/gl_implementation.cc
[modify] https://crrev.com/9f1eb0bad804bf4ebfe8202fe91413450f9cf062/ui/gl/test/gl_surface_test_support.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 4

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

commit 7894bc2d9a514165e2a24deedde5c397575832a8
Author: Makoto Shimazu <shimazu@chromium.org>
Date: Wed Jul 04 05:21:29 2018

Revert "Switching all ui/gl dependent tests to SwiftShader"

This reverts commit 9f1eb0bad804bf4ebfe8202fe91413450f9cf062.

Reason for revert: speculative revert due to cc_unittests failures
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20Tests%20%28dbg%29%281%29%2832%29/51119

Original change's description:
> Switching all ui/gl dependent tests to SwiftShader
> 
> This cl's switches cc_unittests and viz_unittests from OSMesa
> to SwiftShader and fixes other issues related to that change.
> 
>  Bug chromium:848035 
> 
> Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: Ib1b58e02d4df4a687ef7be57284c06097bdeca94
> Reviewed-on: https://chromium-review.googlesource.com/1070490
> Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Reviewed-by: Eric Karl <ericrk@chromium.org>
> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#572442}

TBR=danakj@chromium.org,sugoi@chromium.org,dcastagna@chromium.org,piman@chromium.org,ericrk@chromium.org

Change-Id: I5957fd458b172fd58d4d1fe866e4b07be600c6cb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1125599
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572485}
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/cc/paint/transfer_cache_unittest.cc
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/cc/test/layer_tree_test.cc
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/cc/trees/layer_tree_host_pixeltest_masks.cc
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/service/display/renderer_pixeltest.cc
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/anti_aliasing.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/anti_aliasing_perspective.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/axis_aligned.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/background_filter_blur.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/background_filter_blur_off_axis.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/background_filter_blur_outsets.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/background_filter_on_scaled_layer_gl.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/background_filter_rotated_gl.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/blue_yellow_alpha.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/blue_yellow_alpha_translate.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/blue_yellow_filter_chain.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/blue_yellow_flipped_dither.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/blue_yellow_partial_flipped_dither.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/blur_filter_with_clip_gl.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/intersecting_blue_green_squares_video.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/intersecting_light_dark_squares_video.png
[delete] https://crrev.com/38bb04f3a0acf277297d8d0f4b894c4dd4582b2e/components/viz/test/data/mask_as_blending_rotated_circle_gl.png
[delete] https://crrev.com/38bb04f3a0acf277297d8d0f4b894c4dd4582b2e/components/viz/test/data/mask_as_blending_rotated_circle_underflow_gl.png
[delete] https://crrev.com/38bb04f3a0acf277297d8d0f4b894c4dd4582b2e/components/viz/test/data/mask_of_background_filter_gpu.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/rotated_drop_shadow_filter_gl.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/rotated_filter_gl.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/scaled_render_surface_layer_gl.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/spiral_64_scale.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/components/viz/test/data/translated_blue_green_alpha_gl.png
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/ui/gl/BUILD.gn
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/ui/gl/gl_implementation.cc
[modify] https://crrev.com/7894bc2d9a514165e2a24deedde5c397575832a8/ui/gl/test/gl_surface_test_support.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 4

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

commit 047ba2f8a02d6323b1a175f23f6b7f3495e46613
Author: Alexis Hetu <sugoi@google.com>
Date: Wed Jul 04 18:22:02 2018

Reland "Switching all ui/gl dependent tests to SwiftShader"

This is a reland of 9f1eb0bad804bf4ebfe8202fe91413450f9cf062

The only change from the original cl is in cc/test/layer_tree_test.cc,
so TBRing reviewers who approved other parts of this cl.
TBR=dcastagna@chromium.org,piman@chromium.org,ericrk@chromium.org

Original change's description:
> Switching all ui/gl dependent tests to SwiftShader
>
> This cl's switches cc_unittests and viz_unittests from OSMesa
> to SwiftShader and fixes other issues related to that change.
>
>  Bug chromium:848035 
>
> Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: Ib1b58e02d4df4a687ef7be57284c06097bdeca94
> Reviewed-on: https://chromium-review.googlesource.com/1070490
> Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Reviewed-by: Eric Karl <ericrk@chromium.org>
> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#572442}

Change-Id: I85f723ed8a8f7d981a9652cd7979c54d0f1248ae
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1125899
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572623}
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/cc/paint/transfer_cache_unittest.cc
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/cc/test/layer_tree_test.cc
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/cc/trees/layer_tree_host_pixeltest_masks.cc
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/service/display/renderer_pixeltest.cc
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/anti_aliasing.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/anti_aliasing_perspective.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/axis_aligned.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/background_filter_blur.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/background_filter_blur_off_axis.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/background_filter_blur_outsets.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/background_filter_on_scaled_layer_gl.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/background_filter_rotated_gl.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/blue_yellow_alpha.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/blue_yellow_alpha_translate.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/blue_yellow_filter_chain.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/blue_yellow_flipped_dither.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/blue_yellow_partial_flipped_dither.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/blur_filter_with_clip_gl.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/intersecting_blue_green_squares_video.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/intersecting_light_dark_squares_video.png
[add] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/mask_as_blending_rotated_circle_gl.png
[add] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/mask_as_blending_rotated_circle_underflow_gl.png
[add] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/mask_of_background_filter_gpu.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/rotated_drop_shadow_filter_gl.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/rotated_filter_gl.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/scaled_render_surface_layer_gl.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/spiral_64_scale.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/components/viz/test/data/translated_blue_green_alpha_gl.png
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/ui/gl/BUILD.gn
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/ui/gl/gl_implementation.cc
[modify] https://crrev.com/047ba2f8a02d6323b1a175f23f6b7f3495e46613/ui/gl/test/gl_surface_test_support.cc

Cc: chrome-trooper-bugs@chromium.org
 Issue 860160  has been merged into this issue.
Cc: -chrome-trooper-bugs@chromium.org
Oops, chrome-trooper-bugs doesn't need to be in cc.

I assume that 047ba2f8a02d6323b1a175f23f6b7f3495e46613 might introduce memory leak in the unit tests. 
Let me revert it again as a speculative fix.

https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20MSan%20Tests/10705
Project Member

Comment 13 by bugdroid1@chromium.org, Jul 5

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

commit a33e155dc36b917a3ed1742d06c66d9ebf50a1d2
Author: Makoto Shimazu <shimazu@chromium.org>
Date: Thu Jul 05 01:00:05 2018

Revert "Reland "Switching all ui/gl dependent tests to SwiftShader""

This reverts commit 047ba2f8a02d6323b1a175f23f6b7f3495e46613.

Reason for revert: MSan bot failures
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20MSan%20Tests/10705

Original change's description:
> Reland "Switching all ui/gl dependent tests to SwiftShader"
> 
> This is a reland of 9f1eb0bad804bf4ebfe8202fe91413450f9cf062
> 
> The only change from the original cl is in cc/test/layer_tree_test.cc,
> so TBRing reviewers who approved other parts of this cl.
> TBR=dcastagna@chromium.org,piman@chromium.org,ericrk@chromium.org
> 
> Original change's description:
> > Switching all ui/gl dependent tests to SwiftShader
> >
> > This cl's switches cc_unittests and viz_unittests from OSMesa
> > to SwiftShader and fixes other issues related to that change.
> >
> >  Bug chromium:848035 
> >
> > Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
> > Change-Id: Ib1b58e02d4df4a687ef7be57284c06097bdeca94
> > Reviewed-on: https://chromium-review.googlesource.com/1070490
> > Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
> > Reviewed-by: danakj <danakj@chromium.org>
> > Reviewed-by: Antoine Labour <piman@chromium.org>
> > Reviewed-by: Eric Karl <ericrk@chromium.org>
> > Commit-Queue: Alexis Hétu <sugoi@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#572442}
> 
> Change-Id: I85f723ed8a8f7d981a9652cd7979c54d0f1248ae
> Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
> Reviewed-on: https://chromium-review.googlesource.com/1125899
> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
> Reviewed-by: Alexis Hétu <sugoi@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#572623}

TBR=danakj@chromium.org,sugoi@chromium.org,dcastagna@chromium.org,piman@chromium.org,ericrk@chromium.org

Change-Id: I569bbdacf9b7a333a063e8e484b70cb34fe2aa35
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1126639
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572685}
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/cc/paint/transfer_cache_unittest.cc
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/cc/test/layer_tree_test.cc
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/cc/trees/layer_tree_host_pixeltest_masks.cc
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/service/display/renderer_pixeltest.cc
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/anti_aliasing.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/anti_aliasing_perspective.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/axis_aligned.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/background_filter_blur.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/background_filter_blur_off_axis.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/background_filter_blur_outsets.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/background_filter_on_scaled_layer_gl.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/background_filter_rotated_gl.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/blue_yellow_alpha.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/blue_yellow_alpha_translate.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/blue_yellow_filter_chain.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/blue_yellow_flipped_dither.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/blue_yellow_partial_flipped_dither.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/blur_filter_with_clip_gl.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/intersecting_blue_green_squares_video.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/intersecting_light_dark_squares_video.png
[delete] https://crrev.com/c82a29cd12796c080cd631c2114d0c5f207636fc/components/viz/test/data/mask_as_blending_rotated_circle_gl.png
[delete] https://crrev.com/c82a29cd12796c080cd631c2114d0c5f207636fc/components/viz/test/data/mask_as_blending_rotated_circle_underflow_gl.png
[delete] https://crrev.com/c82a29cd12796c080cd631c2114d0c5f207636fc/components/viz/test/data/mask_of_background_filter_gpu.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/rotated_drop_shadow_filter_gl.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/rotated_filter_gl.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/scaled_render_surface_layer_gl.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/spiral_64_scale.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/components/viz/test/data/translated_blue_green_alpha_gl.png
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/ui/gl/BUILD.gn
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/ui/gl/gl_implementation.cc
[modify] https://crrev.com/a33e155dc36b917a3ed1742d06c66d9ebf50a1d2/ui/gl/test/gl_surface_test_support.cc

The MSAN test failures look like one of two failure modes: either a test timeout (perhaps the tests need to be marked slow when running under MSAN:
https://logs.chromium.org/v/?s=chromium%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8941898486357078736%2F%2B%2Fsteps%2Fcc_unittests%2F0%2Flogs%2FLayerTreeHostBlendingPixelTest.BlendingWithRenderPassColorMatrix_GL%2F0

Or the following use-of-uninitialized-value. For example, for:
P/OopClearPixelTest.ClearingOpaqueCorner/0

https://logs.chromium.org/v/?s=chromium%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8941898486357078736%2F%2B%2Fsteps%2Fcc_unittests%2F0%2Flogs%2FP__x2f_OopClearPixelTest.ClearingOpaqueCorner__x2f_0%2F0

[ RUN      ] P/OopClearPixelTest.ClearingOpaqueCorner/0
==4369==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x37d9280 in SkPremultiplyARGBInline ./../../third_party/skia/include/core/SkColorPriv.h:111:9
    #1 0x37d9280 in SkPreMultiplyARGB(unsigned int, unsigned int, unsigned int, unsigned int) ./../../third_party/skia/src/core/SkColor.cpp:13:0
    #2 0x153ea3b in cc::(anonymous namespace)::OopPixelTest::Raster(scoped_refptr<cc::DisplayItemList>, cc::(anonymous namespace)::OopPixelTest::RasterOptions const&) ./../../cc/paint/oop_pixeltest.cc:200:26
    #3 0x1565073 in cc::(anonymous namespace)::OopClearPixelTest_ClearingOpaqueCorner_Test::TestBody() ./../../cc/paint/oop_pixeltest.cc:813:21
    #4 0x4563d52 in testing::Test::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:0:0
    #5 0x456762b in testing::TestInfo::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #6 0x45690b9 in testing::TestCase::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #7 0x45a0194 in testing::internal::UnitTestImpl::RunAllTests() ./../../third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #8 0x459ea67 in testing::UnitTest::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:0:0
    #9 0x4d4eaf0 in RUN_ALL_TESTS ./../../third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #10 0x4d4eaf0 in base::TestSuite::Run() ./../../base/test/test_suite.cc:275:0
    #11 0x4d5cfc0 in Run ./../../base/callback.h:99:12
    #12 0x4d5cfc0 in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) ./../../base/test/launcher/unit_test_launcher.cc:225:0
    #13 0x4d5c737 in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) ./../../base/test/launcher/unit_test_launcher.cc:576:10
    #14 0x36a92a1 in main ./../../cc/test/run_all_unittests.cc:15:10
    #15 0x7f5a4f506f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287:0
    #16 0x71c029 in _start ??:0:0
  Uninitialized value was stored to memory at
    #0 0x73c9cb in __msan_memcpy /b/swarming/w/ir/kitchen-workdir/src/third_party/llvm/compiler-rt/lib/msan/msan_interceptors.cc:1485:3
    #1 0x5289700 in gpu::gles2::GLES2Implementation::ReadPixels(int, int, int, int, unsigned int, unsigned int, void*) ./../../gpu/command_buffer/client/gles2_implementation.cc:4008:7
    #2 0x153e63d in cc::(anonymous namespace)::OopPixelTest::Raster(scoped_refptr<cc::DisplayItemList>, cc::(anonymous namespace)::OopPixelTest::RasterOptions const&) ./../../cc/paint/oop_pixeltest.cc:186:9
    #3 0x1565073 in cc::(anonymous namespace)::OopClearPixelTest_ClearingOpaqueCorner_Test::TestBody() ./../../cc/paint/oop_pixeltest.cc:813:21
    #4 0x4563d52 in testing::Test::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:0:0
    #5 0x456762b in testing::TestInfo::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #6 0x45690b9 in testing::TestCase::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #7 0x45a0194 in testing::internal::UnitTestImpl::RunAllTests() ./../../third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #8 0x459ea67 in testing::UnitTest::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:0:0
    #9 0x4d4eaf0 in RUN_ALL_TESTS ./../../third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #10 0x4d4eaf0 in base::TestSuite::Run() ./../../base/test/test_suite.cc:275:0
    #11 0x4d5cfc0 in Run ./../../base/callback.h:99:12
    #12 0x4d5cfc0 in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) ./../../base/test/launcher/unit_test_launcher.cc:225:0
    #13 0x4d5c737 in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) ./../../base/test/launcher/unit_test_launcher.cc:576:10
    #14 0x36a92a1 in main ./../../cc/test/run_all_unittests.cc:15:10
    #15 0x7f5a4f506f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287:0
  Uninitialized value was created by a heap allocation
    #0 0x78f979 in operator new[](unsigned long) /b/swarming/w/ir/kitchen-workdir/src/third_party/llvm/compiler-rt/lib/msan/msan_new_delete.cc:48:37
    #1 0x68a49fa in MemoryBufferBacking ./../../gpu/command_buffer/service/command_buffer_service.cc:28:17
    #2 0x68a49fa in make_unique<gpu::(anonymous namespace)::MemoryBufferBacking, unsigned long &> ./../../buildtools/third_party/libc++/trunk/include/memory:3114:0
    #3 0x68a49fa in gpu::CommandBufferService::CreateTransferBufferWithId(unsigned long, int) ./../../gpu/command_buffer/service/command_buffer_service.cc:197:0
    #4 0x68a4746 in gpu::CommandBufferService::CreateTransferBuffer(unsigned long, int*) ./../../gpu/command_buffer/service/command_buffer_service.cc:172:17
    #5 0x53a7d13 in gpu::InProcessCommandBuffer::CreateTransferBuffer(unsigned long, int*) ./../../gpu/ipc/in_process_command_buffer.cc:795:27
    #6 0x43e4cfb in gpu::TransferBuffer::AllocateRingBuffer(unsigned int) ./../../gpu/command_buffer/client/transfer_buffer.cc:120:36
    #7 0x43e385e in ReallocateRingBuffer ./../../gpu/command_buffer/client/transfer_buffer.cc:155:5
    #8 0x43e385e in gpu::TransferBuffer::Initialize(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) ./../../gpu/command_buffer/client/transfer_buffer.cc:61:0
    #9 0x53443ee in gpu::ImplementationBase::Initialize(gpu::SharedMemoryLimits const&) ./../../gpu/command_buffer/client/implementation_base.cc:156:26
    #10 0x52396ba in gpu::gles2::GLES2Implementation::Initialize(gpu::SharedMemoryLimits const&) ./../../gpu/command_buffer/client/gles2_implementation.cc:243:37
    #11 0x53969ec in gpu::GLInProcessContext::Initialize(scoped_refptr<gpu::CommandBufferTaskExecutor>, scoped_refptr<gl::GLSurface>, bool, unsigned long, gpu::ContextCreationAttribs const&, gpu::SharedMemoryLimits const&, gpu::GpuMemoryBufferManager*, gpu::ImageFactory*, gpu::GpuChannelManagerDelegate*, scoped_refptr<base::SingleThreadTaskRunner>) ./../../gpu/ipc/gl_in_process_context.cc:128:35
    #12 0x4ce0d8a in cc::(anonymous namespace)::CreateGLInProcessContext(viz::TestGpuMemoryBufferManager*, cc::TestImageFactory*, scoped_refptr<base::SingleThreadTaskRunner>, bool) ./../../cc/test/test_in_process_context_provider.cc:51:26
    #13 0x4ce1667 in cc::TestInProcessContextProvider::TestInProcessContextProvider(bool, bool) ./../../cc/test/test_in_process_context_provider.cc:91:22
    #14 0x153765b in MakeRefCounted<cc::TestInProcessContextProvider, bool, bool> ./../../base/memory/scoped_refptr.h:91:16
    #15 0x153765b in cc::(anonymous namespace)::OopPixelTest::SetUp() ./../../cc/paint/oop_pixeltest.cc:68:0
    #16 0x4563a75 in testing::Test::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:0:0
    #17 0x456762b in testing::TestInfo::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #18 0x45690b9 in testing::TestCase::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #19 0x45a0194 in testing::internal::UnitTestImpl::RunAllTests() ./../../third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #20 0x459ea67 in testing::UnitTest::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:0:0
    #21 0x4d4eaf0 in RUN_ALL_TESTS ./../../third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #22 0x4d4eaf0 in base::TestSuite::Run() ./../../base/test/test_suite.cc:275:0
    #23 0x4d5cfc0 in Run ./../../base/callback.h:99:12
    #24 0x4d5cfc0 in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) ./../../base/test/launcher/unit_test_launcher.cc:225:0
    #25 0x4d5c737 in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) ./../../base/test/launcher/unit_test_launcher.cc:576:10


Not sure why transfer buffer allocation and initialization would behave differently under OSMesa vs. SwiftShader. Alexis, let me know if you need help tracking down the cause here.

This use-of-uninitialized-value is within Skia. SwiftShader acts as if it was a full GPU driver, so all code paths taken during this test will be the hardware/GPU code paths, from the test's point of view, as opposed to OSMesa generally triggering software code paths only. This Skia issue was probably hidden since OSMesa was not exercising that path.

The timeouts simply require a trivial adjustment in cc/test/layer_tree_test.cc.
Actually, from what I can see, 'data' is detected as uninitialized here:
https://cs.chromium.org/chromium/src/cc/paint/oop_pixeltest.cc?l=200

Which means the ReadPixels call here didn't write into 'data' here:
https://cs.chromium.org/chromium/src/cc/paint/oop_pixeltest.cc?l=186

I'll investigate this tomorrow morning.
 Issue 860393  has been merged into this issue.
 Issue 860390  has been merged into this issue.
 Issue 860389  has been merged into this issue.
 Issue 860388  has been merged into this issue.
 Issue 860387  has been merged into this issue.
 Issue 860384  has been merged into this issue.
 Issue 860383  has been merged into this issue.
 Issue 860382  has been merged into this issue.
 Issue 860381  has been merged into this issue.
The MSAN issue appears to be with MSAN itself.
SwiftShader uses its JIT compiler to compile a tiny executable that's used to blit pixels from one format to another format (there's an BGRA -> RGBA conversion that happens during one of the read pixels in that test).
Every pixel gets written into, but MSAN complains that they are uninitialized. If I add a memset() to clear the pixels (to any value, I tried multiple ones, same result) before the blitter runs, then the MSAN error disappears and the test passes.
The MSAN doc mentions explicitly that it doesn't work with "JITs and non-LLVM compilers" :/
SwiftShader creates small executables using the Subzero JIT...
It's not possible to do the shader compilation at the time we build the test target is it? That'd fix the speed regressions too..
The shader states are dynamically generated by the test, so we can't know in advance what the states will be unless we run it, unfortunately. We'd need to write a shader exporter/importer, run all tests in a mode that records the shaders and states used specifically in each test and then use these pre-compiled shaders to run the tests faster. I don't have a good solution for this at the moment.
That'd be an acceptable end state if it helps, as long as running the test after modifying it, without generating the shaders, would fail obviously and tell you what to do.
MSAN's APIs are designed to support this use case. If the span of the memory region that SwiftShader's JITted code initializes is known, then:

__msan_unpoison(ptr, size);

can be called to tell MSAN about its initialization.

https://github.com/google/sanitizers/wiki/MemorySanitizer

It's true that this won't catch bugs in SwiftShader's JITted code but it will allow all of the other code paths to be used in MSAN's tests, which is a positive step forward compared to using OSMesa.

Project Member

Comment 32 by bugdroid1@chromium.org, Jul 6

The following revision refers to this bug:
  https://swiftshader.googlesource.com/SwiftShader.git/+/551478a9b8be146edaf4bcc7639ed77752d1650f

commit 551478a9b8be146edaf4bcc7639ed77752d1650f
Author: Alexis Hetu <sugoi@google.com>
Date: Fri Jul 06 11:53:55 2018

Fix for MSAN issues

Chromium's memory sanitizer doesn't work with JIT compiled code, so
we have to skip blitReactor when using MSAN, otherwise most uses of
glReadPixels() will cause MSAN to detect a false use-of-uninitialized-value,
since it doesn't instrument the inside of JIT compiled code.

 Bug chromium:848035   chromium:860533 

Change-Id: Idfa194ce0fcd41eb7acf7868cbcebfc04d598f5b
Reviewed-on: https://swiftshader-review.googlesource.com/19808
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>

[modify] https://crrev.com/551478a9b8be146edaf4bcc7639ed77752d1650f/src/Renderer/Blitter.cpp

Project Member

Comment 33 by bugdroid1@chromium.org, Jul 6

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

commit 871c1b8610aabbb722b0bca64b5d6c8f68ef4f26
Author: Alexis Hetu <sugoi@google.com>
Date: Fri Jul 06 15:04:53 2018

Roll SwiftShader e1fa9ea..551478a

https://swiftshader.googlesource.com/SwiftShader.git/+log/e1fa9ea..551478a

BUG= chromium:848035   chromium:860533 

TBR=kbr@chromium.org

TEST=bots

CQ_INCLUDE_TRYBOTS=luci.chromium.try:win_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_chromium_cfi_rel_ng;luci.chromium.try:android_optional_gpu_tests_rel

Change-Id: I0eadf45001e70a37f14e4b2c4a4bbabfedcbfb2a
Reviewed-on: https://chromium-review.googlesource.com/1127843
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572974}
[modify] https://crrev.com/871c1b8610aabbb722b0bca64b5d6c8f68ef4f26/DEPS

Blockedon: 860533
Project Member

Comment 35 by bugdroid1@chromium.org, Aug 1

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

commit b07b69524bd7b47c023c6f5f8930fd70272a337e
Author: Alexis Hetu <sugoi@google.com>
Date: Wed Aug 01 21:30:54 2018

Reland "Reland "Switching all ui/gl dependent tests to SwiftShader""

This is a reland of 047ba2f8a02d6323b1a175f23f6b7f3495e46613

TBR=dcastagna@chromium.org,piman@chromium.org,ericrk@chromium.org,danakj@chromium.org

Original change's description:
> Reland "Switching all ui/gl dependent tests to SwiftShader"
>
> This is a reland of 9f1eb0bad804bf4ebfe8202fe91413450f9cf062
>
> The only change from the original cl is in cc/test/layer_tree_test.cc,
> so TBRing reviewers who approved other parts of this cl.
> TBR=dcastagna@chromium.org,piman@chromium.org,ericrk@chromium.org
>
> Original change's description:
> > Switching all ui/gl dependent tests to SwiftShader
> >
> > This cl's switches cc_unittests and viz_unittests from OSMesa
> > to SwiftShader and fixes other issues related to that change.
> >
> >  Bug chromium:848035 
> >
> > Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
> > Change-Id: Ib1b58e02d4df4a687ef7be57284c06097bdeca94
> > Reviewed-on: https://chromium-review.googlesource.com/1070490
> > Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
> > Reviewed-by: danakj <danakj@chromium.org>
> > Reviewed-by: Antoine Labour <piman@chromium.org>
> > Reviewed-by: Eric Karl <ericrk@chromium.org>
> > Commit-Queue: Alexis Hétu <sugoi@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#572442}
>
> Change-Id: I85f723ed8a8f7d981a9652cd7979c54d0f1248ae
> Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
> Reviewed-on: https://chromium-review.googlesource.com/1125899
> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
> Reviewed-by: Alexis Hétu <sugoi@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#572623}

Change-Id: I8e0a113f356ea997ee9dff45e3cd0d465f349006
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1127419
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579950}
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/cc/paint/transfer_cache_unittest.cc
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/cc/test/layer_tree_test.cc
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/cc/trees/layer_tree_host_pixeltest_masks.cc
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/chrome/browser/media/webrtc/webrtc_browsertest_common.cc
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/service/display/renderer_pixeltest.cc
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/anti_aliasing.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/anti_aliasing_perspective.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/axis_aligned.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/background_filter_blur.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/background_filter_blur_off_axis.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/background_filter_blur_outsets.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/background_filter_on_scaled_layer_gl.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/background_filter_rotated_gl.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/blue_yellow_alpha.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/blue_yellow_alpha_translate.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/blue_yellow_filter_chain.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/blue_yellow_flipped_dither.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/blue_yellow_partial_flipped_dither.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/blur_filter_with_clip_gl.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/intersecting_blue_green_squares_video.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/intersecting_light_dark_squares_video.png
[add] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/mask_as_blending_rotated_circle_gl.png
[add] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/mask_as_blending_rotated_circle_underflow_gl.png
[add] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/mask_of_background_filter_gpu.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/rotated_drop_shadow_filter_gl.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/rotated_filter_gl.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/scaled_render_surface_layer_gl.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/spiral_64_scale.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/components/viz/test/data/translated_blue_green_alpha_gl.png
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/ui/gl/BUILD.gn
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/ui/gl/gl_implementation.cc
[modify] https://crrev.com/b07b69524bd7b47c023c6f5f8930fd70272a337e/ui/gl/test/gl_surface_test_support.cc

Blocking: 873321
Status: Fixed (was: Assigned)
This has been working for almost a month and it's fairly stable now, so closing this issue.

Note: GLRendererPixelTest.TrilinearFiltering will be re-enabled in this cl (https://chromium-review.googlesource.com/c/chromium/src/+/1175450), but all tests that were working with OSMesa already work with SwiftShader.
Hey folks, the Cast roll is a couple weeks behind Chromium, and we have just merged crrev.com/c/1127419, which causes cc_unittests to fail, with output like that which is pasted below. You can see the full logs and details at b/113324890.

Any idea why this would be failing on Cast builds?

[ RUN      ] BlurFilterWithClip.GL
[3683:3683:0827/191354.640577:6357736628:ERROR:pixel_comparator.cc(47)] Number of pixel with an error: 1104
[3683:3683:0827/191354.640674:6357736717:ERROR:pixel_comparator.cc(48)] Error Bounding Box : 25,20 150x160
[3683:3683:0827/191354.657522:6357753568:ERROR:pixel_test_utils.cc(79)] Pixels do not match!
[3683:3683:0827/191354.657574:6357753615:ERROR:pixel_test_utils.cc(80)] Actual: data:image/png;base64, <snipped>
[3683:3683:0827/191354.657651:6357753693:ERROR:pixel_test_utils.cc(81)] Expected: data:image/png;base64, <snipped>
../../cc/test/layer_tree_pixel_test.cc:129: Failure
Value of: MatchesPNGFile(*result_bitmap_, ref_file_path, *pixel_comparator_)
  Actual: false
Expected: true
Stack trace:
#0 0x00000307f5c0 StackTraceGetter::CurrentStackTrace()
#1 0x0000030a28a7 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop()
#2 0x0000030a1d0d testing::internal::AssertHelper::operator=()
#3 0x00000383e923 cc::LayerTreePixelTest::AfterTest()
#4 0x000003845e96 cc::LayerTreeTest::RunTest()
#5 0x00000383ef1d cc::LayerTreePixelTest::RunPixelTest()
#6 0x000001a3eb71 cc::(anonymous namespace)::BlurFilterWithClip::RunPixelTestType()
#7 0x000001a3e687 cc::(anonymous namespace)::BlurFilterWithClip_GL_Test::TestBody()
#8 0x0000030d9f0e testing::internal::HandleSehExceptionsInMethodIfSupported<>()

[  FAILED  ] BlurFilterWithClip.GL (1048 ms)
Does Cast build SwiftShader? Please file a new bug and block this one on it.

Note: I tried reproducing this issue earlier today and I built cc_unittests using the gn args from the cast_shell_linux bot and all tests passed.

According to the BUILD.gn files, cc_unittests depens on ui/gl:
https://cs.chromium.org/chromium/src/cc/BUILD.gn?l=752

Which itself depends on SwiftShader here:
https://cs.chromium.org/chromium/src/ui/gl/BUILD.gn?l=164

Which should be enabled on any linux platform here:
https://cs.chromium.org/chromium/src/ui/gl/BUILD.gn?l=14

After talking to slan@ today, he told me that these failures were from a linux emulation of a chromecast, similar to the cast_shell_linux bot, so I have no idea why he's getting these failures.

Sign in to add a comment