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

Issue 701170 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Some fast/mediacapturefromelement layout tests crash on MSAN bot

Project Member Reported by qyears...@chromium.org, Mar 13 2017

Issue description

The Blink Memory Sanitizer bot outputs a use-of-uninitialized-value warning on some tests that involve MediaRecorder:

Example results:
https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_Trusty_MSAN/832/layout-test-results/results.html

Log excerpt:
crash log for renderer (pid <unknown>):
STDOUT: <empty>
STDERR: Xlib:  extension "RANDR" missing on display ":9".
STDERR: ==1==WARNING: MemorySanitizer: use-of-uninitialized-value
STDERR:     #0 0x10d47b5e in content::(anonymous namespace)::VpxEncoder::EncodeOnEncodingTaskRunner(scoped_refptr<media::VideoFrame>, base::TimeTicks) content/renderer/media_recorder/video_track_recorder.cc:839:63
STDERR:     #1 0x10d4b2b3 in Invoke<const scoped_refptr<content::VideoTrackRecorder::Encoder> &, const scoped_refptr<media::VideoFrame> &, const base::TimeTicks &> base/bind_internal.h:214:12
STDERR:     #2 0x10d4b2b3 in MakeItSo<void (content::VideoTrackRecorder::Encoder::*const &)(scoped_refptr<media::VideoFrame>, base::TimeTicks), const scoped_refptr<content::VideoTrackRecorder::Encoder> &, const scoped_refptr<media::VideoFrame> &, const base::TimeTicks &> base/bind_internal.h:285:0

Looking at that line (https://cs.chromium.org/chromium/src/content/renderer/media_recorder/video_track_recorder.cc?type=cs&q=video_track_recorder.cc:839&sq=package:chromium&l=839), it looks like it was expected that alpha_codec_config_ may be uninitialized sometimes, but MSAN still gives a warning here about use of uninitialized value.

It looks like this started happening after this change: https://codereview.chromium.org/2691373005

emircan@, do you think there's some way that this should/could be changed?
 
Thanks for catching this. I think a better fix to set the checked value like here: https://cs.chromium.org/chromium/src/content/renderer/media_recorder/video_track_recorder.cc?rcl=97f425de047bcfa18633635370133d3eab7ee460&l=812 . I will quickly comment that on your CL.
I quickly made a patch to fix it without disabling the tests here: https://codereview.chromium.org/2750743002/ 
Cc: -emir...@chromium.org
Owner: emir...@chromium.org
Status: Assigned (was: Unconfirmed)
Same error on memory.full: https://build.chromium.org/p/chromium.memory.full/builders/Linux%20MSan%20Tests/builds/6319

  Uninitialized value was created by a heap allocation
    #0 0x5a6f32 in operator new(unsigned long) ??:0:0
    #1 0x12af645c in content::VideoTrackRecorder::InitializeEncoder(content::VideoTrackRecorder::CodecId, base::Callback\u003Cvoid (media::WebmMuxer::VideoParameters const&, std::__1::unique_ptr\u003Cstd::__1::basic_string\u003Cchar, std::__1::char_traits\u003Cchar>, std::__1::allocator\u003Cchar> >, std::__1::default_delete\u003Cstd::__1::basic_string\u003Cchar, std::__1::char_traits\u003Cchar>, std::__1::allocator\u003Cchar> > > >, std::__1::unique_ptr\u003Cstd::__1::basic_string\u003Cchar, std::__1::char_traits\u003Cchar>, std::__1::allocator\u003Cchar> >, std::__1::default_delete\u003Cstd::__1::basic_string\u003Cchar, std::__1::char_traits\u003Cchar>, std::__1::allocator\u003Cchar> > > >, base::TimeTicks, bool), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, int, scoped_refptr\u003Cmedia::VideoFrame> const&, base::TimeTicks) content/renderer/media_recorder/video_track_recorder.cc:1310:20
    #2 0x12b12f98 in Run base/callback.h:85:12
    ...
Status: Fixed (was: Assigned)
CL landed on https://codereview.chromium.org/2750743002/. Please re-open if the errors continue.
 Issue 700855  has been merged into this issue.

Sign in to add a comment