Project: webrtc Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 898 ProcessRecordedData passes uninitialized data to Media Process
Starred by 11 users Project Member Reported by phoglund@webrtc.org, Sep 27 2012 Back to list
Status: Assigned
Owner:
Cc:
Components:
OS: ----
Pri: 3
Type: Bug
Mic



Sign in to add a comment
What steps will reproduce the problem?
1. Run voice engine tests under valgrind: tools/valgrind-webrtc/webrtc_tests.sh -t out/Debug/voe_auto_test ++automated ++gtest_filter="-MixingTest.*"

What is the expected output? What do you see instead?
You will get a valgrind warning where the code must be mismanaging some buffer or length variable. 

Please use labels and text to provide additional information.
20:46:20 memcheck_analyze.py [ERROR] Command:   
UninitValue
Use of uninitialised value of size 8
  __dubsin (/build/buildd/eglibc-2.15/math/../sysdeps/ieee754/dbl-64/dosincos.c:80)
  __sin_sse2 (/build/buildd/eglibc-2.15/math/../sysdeps/ieee754/dbl-64/s_sin.c:744)
  FakeMediaProcess::Process(int, webrtc::ProcessingTypes, short*, int, int, bool) (/out/Debug/../../src/voice_engine/test/auto_test/fakes/fake_media_process.h:26)
  webrtc::voe::Channel::PrepareEncodeAndSend(int) (/out/Debug/../../src/voice_engine/channel.cc:5856)
  webrtc::voe::TransmitMixer::DemuxAndMix() (/out/Debug/../../src/voice_engine/transmit_mixer.cc:451)
  webrtc::VoEBaseImpl::RecordedDataIsAvailable(void const*, unsigned int, unsigned char, unsigned char, unsigned int, unsigned int, int, unsigned int, unsigned int&) (/out/Debug/../../src/voice_engine/voe_base_impl.cc:203)
  webrtc::AudioDeviceBuffer::DeliverRecordedData() (/out/Debug/../../src/modules/audio_device/audio_device_buffer.cc:512)
  webrtc::AudioDeviceLinuxPulse::ProcessRecordedData(signed char*, unsigned int, unsigned int) (/out/Debug/../../src/modules/audio_device/linux/audio_device_pulse_linux.cc:2731)
  webrtc::AudioDeviceLinuxPulse::ReadRecordedData(void const*, unsigned long) (/out/Debug/../../src/modules/audio_device/linux/audio_device_pulse_linux.cc:2658)
  webrtc::AudioDeviceLinuxPulse::RecThreadProcess() (/out/Debug/../../src/modules/audio_device/linux/audio_device_pulse_linux.cc:3148)
  webrtc::AudioDeviceLinuxPulse::RecThreadFunc(void*) (/out/Debug/../../src/modules/audio_device/linux/audio_device_pulse_linux.cc:2772)
  webrtc::ThreadPosix::Run() (/out/Debug/../../src/system_wrappers/source/thread_posix.cc:359)
  StartThread (/out/Debug/../../src/system_wrappers/source/thread_posix.cc:72)
Suppression (error hash=#9B6FC089AA881538#):
  For more info on using suppressions see http://dev.chromium.org/developers/tree-sheriffs/sheriff-details-chromium/memory-sheriff#TOC-Suppressing-memory-reports

 
Project Member Comment 1 by phoglund@webrtc.org, Sep 27 2012
I forgot to mention that you will need to comment out all bug_898_* suppressions in /trunk/tools/valgrind-webrtc/memcheck/suppressions.txt to properly "reproduce" these warnings, at least after my voice engine valgrind patch goes in (which will be probably next week).

There are actually a whole bunch of errors that involve FakeMediaProcess. Could it so easy that FakeMediaProcess mishandles memory? Or is the voice engine actually passing uninitialized data? I've suppressed all the errors I could find.
Project Member Comment 2 by tnakamura@webrtc.org, Oct 17 2012
Status: Available
Project Member Comment 3 by bugdroid1@chromium.org, Nov 8 2012
The following revision refers to this bug:
    http://code.google.com/p/webrtc/source/detail?r=2898

------------------------------------------------------------------------
r2898 | phoglund@webrtc.org | 2012-10-10T15:41:03.292675Z

Changed paths:
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/tools/valgrind-webrtc/memcheck/suppressions.txt&spec=svn2898&r_previous=2897&r=2898&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/src/voice_engine/test/auto_test/automated_mode.cc&spec=svn2898&r_previous=2897&r=2898&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/src/voice_engine/test/auto_test/standard/network_test.cc&spec=svn2898&r_previous=2897&r=2898&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/src/voice_engine/test/auto_test/voe_standard_test.cc&spec=svn2898&r_previous=2897&r=2898&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/src/voice_engine/test/voice_engine_tests.gypi&spec=svn2898&r_previous=2897&r=2898&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/src/voice_engine/test/auto_test/automated_mode.h&spec=svn2898&r_previous=2897&r=2898&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/src/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h&spec=svn2898&r_previous=2897&r=2898&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/src/voice_engine/test/auto_test/voe_standard_test.h&spec=svn2898&r_previous=2897&r=2898&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/src/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc&spec=svn2898&r_previous=2897&r=2898&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/src/voice_engine/test/auto_test/standard/voe_base_misc_test.cc&spec=svn2898&r_previous=2897&r=2898&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/src/voice_engine/test/auto_test/standard/file_test.cc&spec=svn2898&r_previous=2897&r=2898&format=side

Suppressed all voe_auto_test standard suite bugs and introduced a flag for excluding timing-dependent tests.

Also Suppressed FakeMediaProcess errors (bug 898) and took out a test and suppressed general errors ( bug 332 ). Lastly, fixed memory leak in misc test.

BUG=898,  332 
TEST=Ran voe_auto_test with repeat=10 through the whole standard suite, under valgrind. Ran without valgrind. Tested that the extended and standard tests still start and are reachable from the menu.

Review URL: https://webrtc-codereview.appspot.com/855009
------------------------------------------------------------------------
Comment 4 by vrk@webrtc.org, Oct 15 2014
Labels: Area-Mic
Project Member Comment 5 by juberti@webrtc.org, Jan 7 2015
Labels: -Area-Mic Area-GetUserMedia-Mic
Project Member Comment 6 by juberti@webrtc.org, Jan 7 2015
Labels: -Area-GetUserMedia-Mic Mic
Project Member Comment 7 by tina.legrand@webrtc.org, Apr 20 2015
Cc: kwiberg@webrtc.org jmarusic@webrtc.org
Project Member Comment 8 by kjellander@webrtc.org, Dec 1
Cc: -xians@webrtc.org
Project Member Comment 9 by kjellander@webrtc.org, Dec 1
Cc: -jmarusic@webrtc.org
Project Member Comment 10 by anatolid@webrtc.org, Dec 11
Components: Audio
Project Member Comment 11 by tina.legrand@webrtc.org, Jan 3
Owner: solenberg@webrtc.org
Status: Assigned
Fredrik, we don't plan to run voe_auto_test anymore, right? Do you think this still is a valid issue?
Project Member Comment 12 by tina.legrand@webrtc.org, Jan 23
Labels: -Pri-2 Pri-3
Project Member Comment 13 by solenberg@webrtc.org, Jan 30
This test still runs on some bots. Leave assigned to me.
Sign in to add a comment