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

Issue 614641 link

Starred by 1 user

Issue metadata

Status: Duplicate
Owner:
Last visit > 30 days ago
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

peach-pit: apprtc loopback crashed at start

Project Member Reported by wuchengli@chromium.org, May 25 2016

Issue description

Version: peach pit CrOS 8369.0.0

What steps will reproduce the problem?
(1) Go to https://apprtc.appspot.com/?debug=loopback&VSC=VP8

What is the expected output?
Loopback starts.

What do you see instead?
Chrome crashed. If chrome doesn't crash, close the tab and try again.


Repro rate: 1/5
 
Chrome showed "Aw, Snap! Something went wrong with displaying this webpage.".

#0  webrtc::SimulcastEncoderAdapter::Encoded(unsigned int, webrtc::EncodedImage const&, webrtc::CodecSpecificInfo const*, webrtc::RTPFragmentationHeader const*) ()
    at ../../../../../../../home/chrome-bot/chrome_root/src/third_party/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc:405
#1  0xb6347a84 in (anonymous namespace)::AdapterEncodedImageCallback::Encoded(webrtc::EncodedImage const&, webrtc::CodecSpecificInfo const*, webrtc::RTPFragmentationHeader const*) ()
    at ../../../../../../../home/chrome-bot/chrome_root/src/third_party/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc:128
#2  0xb4dc3eea in content::RTCVideoEncoder::Impl::ReturnEncodedImage(webrtc::EncodedImage const&, int, unsigned short) ()
    at ../../../../../../../home/chrome-bot/chrome_root/src/content/renderer/media/rtc_video_encoder.cc:706
#3  0xb4dc41dc in content::RTCVideoEncoder::Impl::BitstreamBufferReady(int, unsigned int, bool) ()
    at ../../../../../../../home/chrome-bot/chrome_root/src/content/renderer/media/rtc_video_encoder.cc:494
#4  0xb5e52220 in media::GpuVideoEncodeAcceleratorHost::OnMessageReceived(IPC::Message const&) () at ../../../../../../../home/chrome-bot/chrome_root/src/base/tuple.h:166
#5  0xb3820bd8 in base::internal::Invoker<base::IndexSequence<0u, 1u>, base::internal::BindState<base::internal::RunnableAdapter<void (content::ResourceSchedulingFilter::*)(IPC::Message const&)>, void (content::ResourceSchedulingFilter*, IPC::Message const&), base::WeakPtr<content::ResourceSchedulingFilter>, IPC::Message const&>, base::internal::InvokeHelper<true, void, base::internal::RunnableAdapter<void (content::ResourceSchedulingFilter::*)(IPC::Message const&)> >, void ()>::Run(base::internal::BindStateBase*) ()
    at ../../../../../../../home/chrome-bot/chrome_root/src/base/bind_internal.h:186
#6  0xb2a198f0 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask const&) () at ../../../../../../../home/chrome-bot/chrome_root/src/base/callback.h:397
#7  0xb2a0e822 in base::MessageLoop::DoWork() () at ../../../../../../../home/chrome-bot/chrome_root/src/base/message_loop/message_loop.cc:478
#8  0xb2a0f366 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) () at ../../../../../../../home/chrome-bot/chrome_root/src/base/message_loop/message_pump_default.cc:33
#9  0xb304b16a in base::RunLoop::Run() () at ../../../../../../../home/chrome-bot/chrome_root/src/base/run_loop.cc:35
#10 0xb303a260 in base::MessageLoop::Run() () at ../../../../../../../home/chrome-bot/chrome_root/src/base/message_loop/message_loop.cc:294
#11 0xb305b0cc in base::Thread::ThreadMain() () at ../../../../../../../home/chrome-bot/chrome_root/src/base/threading/thread.cc:254
#12 0xb3059736 in base::(anonymous namespace)::ThreadFunc(void*) () at ../../../../../../../home/chrome-bot/chrome_root/src/base/threading/platform_thread_posix.cc:70
#13 0xb1e6e6ba in start_thread (arg=0xa6701e60) at pthread_create.c:311
chrome
53.6 KB View Download
ui.LATEST
71.4 KB Download
messages
25.7 MB Download

Comment 2 Deleted

Cc: emir...@chromium.org pbos@chromium.org
I can't reproduce this on oak 8369.0.0.
Labels: VideoShortList
goma is extremely slow now. I'm still building chrome for peach pit.

Comment 7 by pbos@chromium.org, May 25 2016

Cc: mnilsson@chromium.org sprang@chromium.org mflodman@chromium.org
Is there any chance that this BitstreamBufferReady is from a previous session or something (like VDA being reused or so)? RegisterEncodeCompleteCallback() should be called before any frame to be encoded reaches RTCVideoEncoder.

If so I think this patch increases the likelihood of failures (if due to the callback being nullptr):

diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc b/webrtc/modules/video_codi
ng/codecs/vp8/simulcast_encoder_adapter.cc
index be55133..a0e2401 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc
@@ -328,6 +328,7 @@ int SimulcastEncoderAdapter::Encode(
 
 int SimulcastEncoderAdapter::RegisterEncodeCompleteCallback(
     EncodedImageCallback* callback) {
+  sleep(5);
   encoded_complete_callback_ = callback;
   return WEBRTC_VIDEO_CODEC_OK;
 }


Comment 8 by pbos@chromium.org, May 25 2016

Process recap:

SimulcastEncoderAdapter contains multiple (hardware/software) encoders and combine them to do simulcast.

Callbacks are registered on sub-encoders in SimulcastEncoderAdapter from InitEncode(), these point to SimulcastEncoderAdapter itself.

All of these are proxy objects (AdapterEncodedImageCallback) that also store which simulcast layer the encoder objects belong to. In the AppRTC case this should be one layer.

The "real" callback is registered on SimulcastEncoderAdapter after InitEncode succeeds, but before any calls to encode VideoFrames happen

(*bold* so no callbacks should be happen here... right? unless there's encoded frames stuck in a reused VDA object? *bold*).

The callback objects are then deleted after deleting the video encoder objects.
I haven't had time to look at this. I'll look at this tomorrow.
Labels: M-53
I still didn't get to this today. I'll debug tomorrow.
I added some logs and deployed chrome. I couldn't reproduce any more. My local chrome was synced on May 25.
8369.0.0 is released on 5/24 18:06.
Status: WontFix (was: Assigned)
I cannot repro on 8369.0.0 anymore, either. I tried around 30 times.

I checked the crash server. I don't see M52 or M53 has crashes in SimulcastEncoderAdapter. I'm closing this issue.
https://crash.corp.google.com/browse?q=CrashedStackTrace.StackFrame.FunctionName%20LIKE%20%27%25SimulcastEncoderAdapter%25%27%20AND%20product.name%3D%27Chrome_ChromeOS%27&ignore_case=false&enable_rewrite=true&omit_field_name=&omit_field_value=&omit_field_opt=%3D
Mergedinto: 616588
Status: Duplicate (was: WontFix)

Sign in to add a comment