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

Issue 612496 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocked on:
issue 801794

Blocking:
issue 612473



Sign in to add a comment

cast_unittests cannot run on official builds because of FAKE codecs

Project Member Reported by krasin@chromium.org, May 17 2016

Issue description

Version: tip
OS: Linux

What steps will reproduce the problem?
(1) Build cast_unittests in the official mode:

$ gn gen out/gn-off '--args=is_chrome_branded=true is_official_build=true is_debug=false' --check
$ ninja -C out/gn-off cast_unittests

(2) Run cast_unittests:

$ ./out/gn-off/cast_unittests

This will fail in multiple test cases:

In particular, it fails on End2EndTest.BasicFakeSoftwareVideo. I've taken a closer look by running it under gdb:

$ gdb --args ./out/gn-off/cast_unittests --gtest_filter=End2EndTest.BasicFakeSoftwareVideo 
...
(gdb) b end2end_unittest.cc:99
Breakpoint 1 at 0x4d8cbb: end2end_unittest.cc:99. (2 locations)
...
(gdb) b video_sender.cc:128
Breakpoint 2 at 0x506a9c: file ../../media/cast/sender/video_sender.cc, line 128.
...
Breakpoint 2, media::cast::VideoSender::VideoSender(scoped_refptr<media::cast::CastEnvironment>, media::cast::VideoSenderConfig const&, base::Callback<void (media::cast::OperationalStatus), (base::internal::Cop
yMode)1> const&, base::Callback<void (base::Callback<void (scoped_refptr<base::SingleThreadTaskRunner>, std::unique_ptr<media::VideoEncodeAccelerator, std::default_delete<media::VideoEncodeAccelerator> >), (bas
e::internal::CopyMode)1> const&), (base::internal::CopyMode)1> const&, base::Callback<void (unsigned long, base::Callback<void (std::unique_ptr<base::SharedMemory, std::default_delete<base::SharedMemory> >), (b
ase::internal::CopyMode)1> const&), (base::internal::CopyMode)1> const&, media::cast::CastTransport*, base::Callback<void (base::TimeDelta), (base::internal::CopyMode)1> const&) (this=0x146c0714f200, cast_envir
onment=..., video_config=..., status_change_cb=..., create_vea_cb=..., create_video_encode_mem_cb=..., transport_sender=<optimized out>, playout_delay_change_cb=...) at ../../media/cast/sender/video_sender.cc:1
29
129         cast_environment_->PostTask(
(gdb) p video_encoder_
$3 = std::unique_ptr<media::cast::VideoEncoder> containing 0x0
(gdb) p video_config.codec
$4 = media::cast::CODEC_VIDEO_FAKE

The culprit seems to be in  VideoEncoderImpl::IsSupported: https://code.google.com/p/chromium/codesearch#chromium/src/media/cast/sender/video_encoder_impl.cc&l=54&cl=GROK&gsn=Create&rcl=1463483832

bool VideoEncoderImpl::IsSupported(const VideoSenderConfig& video_config) {
#ifndef OFFICIAL_BUILD
  if (video_config.codec == CODEC_VIDEO_FAKE)
    return true;
#endif
  return video_config.codec == CODEC_VIDEO_VP8;
}

Please, take a look. It seems reasonable to have cast_unittests green in the official mode.
 

Comment 1 by krasin@chromium.org, May 17 2016

Blocking: 612473
Project Member

Comment 2 by bugdroid1@chromium.org, May 17 2016

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

commit f7e3c42cc1d32437f3a9e7d0c9f5adecf92b43a5
Author: krasin <krasin@google.com>
Date: Tue May 17 20:06:59 2016

Disable broken tests on 'LTO Linux' buildbot.

These breakages are not related to LTO, and only happen in the official mode.
All of them are reported, and the tests will be reenabled after they are fixed.

BUG= 612473 ,612496, 612503 , 612507 

Review-Url: https://codereview.chromium.org/1985123002
Cr-Commit-Position: refs/heads/master@{#394201}

[modify] https://crrev.com/f7e3c42cc1d32437f3a9e7d0c9f5adecf92b43a5/testing/buildbot/chromium.fyi.json

Labels: -Pri-2 Pri-1
This is to confirm that the issue still happening:

media::cast::LocalVideoFrameInput::InsertRawVideoFrame (this=0x0, video_frame=..., capture_time=...) at ../../media/cast/cast_sender_impl.cc:32
32          cast_environment_->PostTask(CastEnvironment::MAIN,
(gdb) bt
#0  media::cast::LocalVideoFrameInput::InsertRawVideoFrame (this=0x0, video_frame=..., capture_time=...) at ../../media/cast/cast_sender_impl.cc:32
#1  0x00000000004ba48c in media::cast::End2EndTest::SendVideoFrame (this=0x1342ffe62680, frame_number=0, reference_time=...) at ../../media/cast/test/end2end_unittest.cc:591
#2  0x00000000004b7c1e in media::cast::End2EndTest::RunAudioVideoLoop (this=<optimized out>, duration=...) at ../../media/cast/test/end2end_unittest.cc:625
#3  0x00000000004b744c in media::cast::End2EndTest_LoopWithLosslessEncoding_Test::TestBody (this=0x1342ffe62680) at ../../media/cast/test/end2end_unittest.cc:969
#4  0x00000000005c2034 in HandleExceptionsInMethodIfSupported<testing::Test, void> (object=0x1342ffe62680, method=<error reading variable: DWARF-2 expression error: `DW_OP_stack_value' operations must be used either alone or in conjunction with DW_OP_piece or DW_OP_bit_piece.>, location=<optimized out>) at ../../testing/gtest/src/gtest.cc:2458
#5  testing::Test::Run (this=0x1342ffe62680) at ../../testing/gtest/src/gtest.cc:2474
#6  0x00000000005c3238 in testing::TestInfo::Run (this=0x1342ffe640c0) at ../../testing/gtest/src/gtest.cc:2656
#7  0x00000000005c3553 in testing::TestCase::Run (this=<optimized out>) at ../../testing/gtest/src/gtest.cc:2774
#8  0x00000000005c8009 in testing::internal::UnitTestImpl::RunAllTests (this=<optimized out>) at ../../testing/gtest/src/gtest.cc:4647
#9  0x00000000005c7cba in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (method=<error reading variable: access outside bounds of object referenced via synthetic pointer>, object=<optimized out>, location=<optimized out>) at ../../testing/gtest/src/gtest.cc:2458
#10 testing::UnitTest::Run (this=<optimized out>) at ../../testing/gtest/src/gtest.cc:4255
#11 0x000000000059dd27 in RUN_ALL_TESTS () at ../../testing/gtest/include/gtest/gtest.h:2237
#12 base::TestSuite::Run (this=0x7fffffffd4c8) at ../../base/test/test_suite.cc:230
#13 0x00000000005a93bf in Run (this=0x7fffffffd4b8) at ../../base/callback.h:397
#14 base::(anonymous namespace)::LaunchUnitTestsInternal(base::Callback<int (), (base::internal::CopyMode)1> const&, int, int, bool, base::Callback<void (), (base::internal::CopyMode)1> const&) (run_test_suite=..., default_jobs=48, default_batch_limit=10, use_job_objects=true, gtest_init=...) at ../../base/test/launcher/unit_test_launcher.cc:206
#15 0x00000000005a926b in base::LaunchUnitTests(int, char**, base::Callback<int (), (base::internal::CopyMode)1> const&) (argc=<optimized out>, argv=<optimized out>, run_test_suite=...) at ../../base/test/launcher/unit_test_launcher.cc:445
#16 0x00000000004e6d8f in main (argc=1, argv=0x7fffffffd5f8) at ../../base/test/run_all_unittests.cc:21

12 tests crashed:
    End2EndTest.BasicFakeSoftwareVideo (../../media/cast/test/end2end_unittest.cc:1079)
    End2EndTest.EvilNetwork (../../media/cast/test/end2end_unittest.cc:1165)
    End2EndTest.LoopWithLosslessEncoding (../../media/cast/test/end2end_unittest.cc:965)
    End2EndTest.OldPacketNetwork (../../media/cast/test/end2end_unittest.cc:1208)
    End2EndTest.ReceiverClockFast (../../media/cast/test/end2end_unittest.cc:1114)
    End2EndTest.ReceiverClockSlow (../../media/cast/test/end2end_unittest.cc:1129)
    End2EndTest.ShoveHighFrameRateDownYerThroat (../../media/cast/test/end2end_unittest.cc:1187)
    End2EndTest.SmoothPlayoutWithFivePercentClockRateSkew (../../media/cast/test/end2end_unittest.cc:1144)
    End2EndTest.TestSetPlayoutDelay (../../media/cast/test/end2end_unittest.cc:1241)
    VideoEncoderTest.CanBeDestroyedBeforeVEAIsCreated/0 (../../media/cast/sender/video_encoder_unittest.cc:282)
    VideoEncoderTest.EncodesVariedFrameSizes/0 (../../media/cast/sender/video_encoder_unittest.cc:282)
    VideoEncoderTest.GeneratesKeyFrameThenOnlyDeltaFrames/0 (../../media/cast/sender/video_encoder_unittest.cc:282)

Please, fix or find a better owner for the bug.

Comment 4 by m...@chromium.org, Jun 7 2016

Components: Internals>Cast>Streaming
Labels: -Pri-1 M-54 Pri-2
Status: Available (was: Untriaged)
(Re-prioritized based on need.)

We had never anticipated the unit test binary would be built in an OFFICIAL_BUILD flavor. We'll have to re-visit our strategy here, as we really don't want to compile in the "FAKE" codec in official chrome builds: It would just be code bloat.
Okay, that's a valid answer. I've tried to look up other bots, it seems that none are broken due to this issue, which means they don't run it So, while it would be good to fix, it's not P1 as I have guessed.
Project Member

Comment 6 by sheriffbot@chromium.org, Jun 8 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by thakis@chromium.org, Jun 12 2017

miu, if this is expected could we just make cast_unittests's main() early-out in official builds or something?

Comment 8 by m...@chromium.org, Jun 19 2017

Status: Assigned (was: Untriaged)
Sorry for the delay. I'll take a look this week.

Comment 9 by kbr@chromium.org, Jan 13 2018

Blockedon: 801794

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

Cc: -hclam@chromium.org m...@chromium.org
Labels: -Pri-2 Pri-3
Owner: ----
Status: Available (was: Assigned)
Still an issue...
Cc: inglorion@chromium.org
 Issue 846826  has been merged into this issue.

Comment 12 by h...@chromium.org, May 28 2018

Let's get these tests disabled: https://chromium-review.googlesource.com/#/c/chromium/src/+/1075027
Project Member

Comment 13 by bugdroid1@chromium.org, May 29 2018

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

commit 2cdcbfbbd931520d0e3eb74737276662c9379a6d
Author: inglorion <inglorion@chromium.org>
Date: Tue May 29 21:34:31 2018

Disable cast_unittests cases that fail with official_build = true

Some test cases in cast_unittests fail with official_build = true,
causing bots with that configuration to be red. This change disables
these cases.

Bug: 612496
Change-Id: I2993729b3e6d3b268d2291b2046e8f189ba92681
Reviewed-on: https://chromium-review.googlesource.com/1074383
Reviewed-by: Reid Kleckner <rnk@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Commit-Queue: Bob Haarman <inglorion@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562597}
[modify] https://crrev.com/2cdcbfbbd931520d0e3eb74737276662c9379a6d/media/cast/sender/video_encoder_unittest.cc
[modify] https://crrev.com/2cdcbfbbd931520d0e3eb74737276662c9379a6d/media/cast/test/end2end_unittest.cc

Comment 14 by h...@chromium.org, May 30 2018

Owner: m...@chromium.org
Status: Assigned (was: Available)
The bots are green now. Back to miu to decide if you want to fix this properly or close it. As I said on my patch, not running this code in the official build config seems potentially unfortunate.

Comment 15 by m...@chromium.org, May 31 2018

Owner: ----
Status: Available (was: Assigned)

Comment 16 by m...@chromium.org, May 31 2018

Summary: cast_unittests cannot run on official builds because of FAKE codecs (was: cast_unittests are broken on official builds)

Sign in to add a comment