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

Issue 732345 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit 16 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Multiple video tests failing on chromium.webrtc on Mac

Project Member Reported by olka@chromium.org, Jun 12 2017

Issue description

First failing build
https://uberchromegw.corp.google.com/i/chromium.webrtc/builders/Mac%20Tester/builds/68735

4 tests timed out:
    WebRtcInternalsPerfBrowserTest.MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 (../../chrome/browser/media/webrtc/webrtc_internals_perf_browsertest.cc:245)
    WebRtcStatsPerfBrowserTest.MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_H264 (../../chrome/browser/media/webrtc/webrtc_stats_perf_browsertest.cc:286)

Failed tests:
    WebRtcVideoQualityBrowserTests/WebRtcVideoQualityBrowserTest.MANUAL_TestVideoQualityH264/0 (../../chrome/browser/media/webrtc/webrtc_video_quality_browsertest.cc:344)
    WebRtcVideoQualityBrowserTests/WebRtcVideoQualityBrowserTest.MANUAL_TestVideoQualityH264/1 (../../chrome/browser/media/webrtc/webrtc_video_quality_browsertest.cc:344)


Example backtrace:

BrowserTestBase received signal: Terminated: 15. Backtrace:
0   browser_tests                       0x000000011026010c base::debug::StackTrace::StackTrace(unsigned long) + 28
1   browser_tests                       0x0000000110c76258 content::(anonymous namespace)::DumpStackTraceSignalHandler(int) + 200
2   libsystem_platform.dylib            0x00007fffa33b2b3a _sigtramp + 26
3   ???                                 0x0000000000000000 0x0 + 0
4   CoreFoundation                      0x00007fff8d5fd854 __CFRunLoopServiceMachPort + 212
5   CoreFoundation                      0x00007fff8d5fccd1 __CFRunLoopRun + 1361
6   CoreFoundation                      0x00007fff8d5fc524 CFRunLoopRunSpecific + 420
7   HIToolbox                           0x00007fff8cb5cebc RunCurrentEventLoopInMode + 240
8   HIToolbox                           0x00007fff8cb5ccf1 ReceiveNextEventCommon + 432
9   HIToolbox                           0x00007fff8cb5cb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
10  AppKit                              0x00007fff8b0f7e24 _DPSNextEvent + 1120
11  AppKit                              0x00007fff8b87385e -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
12  browser_tests                       0x0000000110425c00 __71-[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:]_block_invoke + 64
13  browser_tests                       0x000000011028796a base::mac::CallWithEHFrame(void () block_pointer) + 10
14  browser_tests                       0x0000000110425b44 -[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 164
15  AppKit                              0x00007fff8b0ec7ab -[NSApplication run] + 926
16  browser_tests                       0x00000001102a4abe base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) + 334
17  browser_tests                       0x00000001102a327c base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 92
18  browser_tests                       0x000000011029eb1b base::MessageLoop::Run() + 219
19  browser_tests                       0x00000001102da618 base::RunLoop::Run() + 168
20  browser_tests                       0x0000000110ccaae9 content::MessageLoopRunner::Run() + 153
21  browser_tests                       0x0000000110c7bf06 content::DOMMessageQueue::WaitForMessage(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) + 214
22  browser_tests                       0x0000000110c79dae content::(anonymous namespace)::ExecuteScriptHelper(content::RenderFrameHost*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, std::__1::unique_ptr<base::Value, std::__1::default_delete<base::Value> >*) + 414
23  browser_tests                       0x0000000110c79b72 content::ExecuteScriptAndExtractString(content::ToRenderFrameHost const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) + 130
24  browser_tests                       0x000000010d25cca7 test::SleepInJavascript(content::WebContents*, int) + 87
25  browser_tests                       0x000000010d25d0a7 test::PollingWaitUntil(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::WebContents*, int) + 871
26  browser_tests                       0x000000010d26fbc4 WebRtcVideoQualityBrowserTest::TestVideoQuality(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 2132
27  browser_tests                       0x000000010d27041a WebRtcVideoQualityBrowserTest_MANUAL_TestVideoQualityH264_Test::RunTestOnMainThread() + 106
28  browser_tests                       0x0000000110c75f63 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() + 403
29  browser_tests                       0x000000011042b324 ChromeBrowserMainParts::PreMainMessageLoopRunImpl() + 4820
30  browser_tests                       0x0000000110429f4e ChromeBrowserMainParts::PreMainMessageLoopRun() + 62
31  browser_tests                       0x000000010e853bb3 content::BrowserMainLoop::PreMainMessageLoopRun() + 67
32  browser_tests                       0x000000010ecf5517 content::StartupTaskRunner::RunAllTasksNow() + 39
33  browser_tests                       0x000000010e852042 content::BrowserMainLoop::CreateStartupTasks() + 658
34  browser_tests                       0x000000010e856dca content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) + 842
35  browser_tests                       0x000000010e84f8f4 content::BrowserMain(content::MainFunctionParams const&) + 100
36  browser_tests                       0x000000011018de75 content::ContentMainRunnerImpl::Run() + 1045
37  browser_tests                       0x0000000112b42dee service_manager::Main(service_manager::MainParams const&) + 2574
38  browser_tests                       0x000000011018d064 content::ContentMain(content::ContentMainParams const&) + 68
39  browser_tests                       0x0000000110c75bf9 content::BrowserTestBase::SetUp() + 2057
40  browser_tests                       0x000000011038c4fa InProcessBrowserTest::SetUp() + 522
41  browser_tests                       0x000000010dfa5f31 testing::Test::Run() + 97
42  browser_tests                       0x000000010dfa6ae0 testing::TestInfo::Run() + 288
43  browser_tests                       0x000000010dfa7107 testing::TestCase::Run() + 263
44  browser_tests                       0x000000010dfae4a7 testing::internal::UnitTestImpl::RunAllTests() + 871
45  browser_tests                       0x000000010dfae113 testing::UnitTest::Run() + 163
46  browser_tests                       0x00000001103ac383 base::TestSuite::Run() + 163
47  browser_tests                       0x0000000110242e1f ChromeTestSuiteRunner::RunTestSuite(int, char**) + 31
48  browser_tests                       0x0000000110cc550d content::LaunchTests(content::TestLauncherDelegate*, int, int, char**) + 397
49  browser_tests                       0x0000000110242d8a main + 90
50  libdyld.dylib                       0x00007fffa31a3235 start + 1
[68/68] WebRtcVideoQualityBrowserTests/WebRtcVideoQualityBrowserTest.MANUAL_TestVideoQualityH264/1 (TIMED OUT)

Suspected https://codereview.chromium.org/2925313002

 

Comment 1 by holmer@chromium.org, Jun 12 2017

Status: Assigned (was: Untriaged)

Comment 2 by magjed@chromium.org, Jun 12 2017

I think the stack trace that is listed in the description is just a secondary failure. The interesting stack trace is this:

[15996:27651:0610/103308.015146:FATAL:rtc_video_encoder.cc(667)] Check failed: std::find_if(pending_timestamps_.begin(), pending_timestamps_.end(), [&frame](const RTCTimestamps& entry) { return entry.media_timestamp_ == frame->timestamp(); }) == pending_timestamps_.end(). 
0   Chromium Framework                  0x0000000111e2cffc base::debug::StackTrace::StackTrace(unsigned long) + 28
1   Chromium Framework                  0x0000000111e53440 logging::LogMessage::~LogMessage() + 224
2   Chromium Framework                  0x00000001177cef39 content::RTCVideoEncoder::Impl::EncodeOneFrame() + 2473
3   Chromium Framework                  0x00000001177ce38b content::RTCVideoEncoder::Impl::Enqueue(webrtc::VideoFrame const*, bool, base::WaitableEvent*, int*) + 539
4   Chromium Framework                  0x0000000111e2d966 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 310
5   Chromium Framework                  0x0000000111e6cce9 base::MessageLoop::RunTask(base::PendingTask*) + 441
6   Chromium Framework                  0x0000000111e6d155 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 213
7   Chromium Framework                  0x0000000111e6d4b9 base::MessageLoop::DoWork() + 425
8   Chromium Framework                  0x0000000111e71eaa base::MessagePumpCFRunLoopBase::RunWork() + 42
9   Chromium Framework                  0x0000000111e555aa base::mac::CallWithEHFrame(void () block_pointer) + 10
10  Chromium Framework                  0x0000000111e717cf base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 63
11  CoreFoundation                      0x00007fff8d61c3b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
12  CoreFoundation                      0x00007fff8d5fd63c __CFRunLoopDoSources0 + 556
13  CoreFoundation                      0x00007fff8d5fcb26 __CFRunLoopRun + 934
14  CoreFoundation                      0x00007fff8d5fc524 CFRunLoopRunSpecific + 420
15  Chromium Framework                  0x0000000111e722ff base::MessagePumpCFRunLoop::DoRun(base::MessagePump::Delegate*) + 79
16  Chromium Framework                  0x0000000111e7101c base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 92
17  Chromium Framework                  0x0000000111e6c8bb base::MessageLoop::Run() + 219
18  Chromium Framework                  0x0000000111ea84e8 base::RunLoop::Run() + 168
19  Chromium Framework                  0x0000000111ef014e base::Thread::Run(base::RunLoop*) + 206
20  Chromium Framework                  0x0000000111ef070a base::Thread::ThreadMain() + 906
21  Chromium Framework                  0x0000000111ee64cf base::(anonymous namespace)::ThreadFunc(void*) + 95
22  libsystem_pthread.dylib             0x00007fffa33bc9af _pthread_body + 180
23  libsystem_pthread.dylib             0x00007fffa33bc8fb _pthread_body + 0
24  libsystem_pthread.dylib             0x00007fffa33bc101 thread_start + 13
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 12 2017

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

commit 25b7a7a6350e64c24953b43594ed2b73afe33246
Author: magjed <magjed@chromium.org>
Date: Mon Jun 12 15:18:55 2017

Fix timestamp issue in RTCVideoEncoder for native frames

Speculative fix for WebRTC test failures. See issue for more information.

BUG=732345
TBR=emircan

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

[modify] https://crrev.com/25b7a7a6350e64c24953b43594ed2b73afe33246/content/renderer/media/gpu/rtc_video_encoder.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 12 2017

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

commit 6f3959909052a12a0355a1114d4e802980cb27e8
Author: magjed <magjed@chromium.org>
Date: Mon Jun 12 18:12:34 2017

Revert of Fix timestamp issue in RTCVideoEncoder for native frames (patchset #1 id:20001 of https://codereview.chromium.org/2934793002/ )

Reason for revert:
The CL did not fix the problem.

Original issue's description:
> Fix timestamp issue in RTCVideoEncoder for native frames
>
> Speculative fix for WebRTC test failures. See issue for more information.
>
> BUG=732345
> TBR=emircan
>
> Review-Url: https://codereview.chromium.org/2934793002
> Cr-Commit-Position: refs/heads/master@{#478627}
> Committed: https://chromium.googlesource.com/chromium/src/+/25b7a7a6350e64c24953b43594ed2b73afe33246

TBR=emircan@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=732345

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

[modify] https://crrev.com/6f3959909052a12a0355a1114d4e802980cb27e8/content/renderer/media/gpu/rtc_video_encoder.cc

I can repro this by simply going to https://appr.tc/?debug=loopback&vsc=h264 on Mac. What I see is that frame->timestamp() information is somehow 0 when it reaches RTCVideoEncoder. I am looking further to see where this can be modified.
[15611:31747:0612/111443.597962:ERROR:webrtc_video_capturer_adapter.cc(167)] OnFrameCaptured2777078833
[15611:31747:0612/111443.608320:ERROR:webrtc_video_capturer_adapter.cc(167)] OnFrameCaptured2777112166
[15611:31747:0612/111443.629177:ERROR:webrtc_video_capturer_adapter.cc(167)] OnFrameCaptured2777145500
[15611:28931:0612/111443.632627:ERROR:rtc_video_encoder.cc(671)] EncodeOneFrame0
[15611:28931:0612/111443.634975:ERROR:rtc_video_encoder.cc(671)] EncodeOneFrame0
There are two issues:
- RTCVideoEncoder receives a kI420 frame. This no longer has a reference to the original media::VideoFrame. Therefore, RTCVideoEncoder needs to make a copy because Chrome needs ShmemHandle to share with GPU process.
- When RTCVideoEncoder is creating a copy, it uses ntp_time_ms() as the capture timestamp. This value is 0 for all incoming frames and hence hitting DCHECK.
Labels: Needs-Feedback
Is this still an issue or can we close it?

Sign in to add a comment