kleopatra999 / webm

Automatically exported from code.google.com/p/webm
0 stars 0 forks source link

WinDrMemory failure on EndToEndTest.SendsAndReceivesVP9 in webrtc. #872

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Picked up in WinDrMemory bot on webrtc waterfall, 
from test: EndToEndTest.SendsAndReceivesVP9:

See:
http://chromegw.corp.google.com/i/client.webrtc/builders/Win%20DrMemory%20Full/b
uilds/1156/steps/video_engine_tests/logs/stdio

This is using libvpx version from:
commit efe9712d52c2d216fb3d1ceb508b8148847a7e4b
Author: johannkoenig@chromium.org <johannkoenig@chromium.org>
Date:   Wed Sep 24 03:00:59 2014 +0000

Original issue reported on code.google.com by marpan@google.com on 13 Oct 2014 at 5:43

GoogleCodeExporter commented 9 years ago
vp9 had some valgrind issues recently that may all be fixed now. given the 
stack traces point to c-code it could be related to that.

there are some other dr. memory warnings though with an associated bug:

http://build.webmproject.org/jenkins/view/libvpx-nightly-tests/job/libvpx__unit_
tests-dr_memory/arch=x86-linux-gcc/179/HTML_Report/

Original comment by jz...@google.com on 13 Oct 2014 at 6:52

GoogleCodeExporter commented 9 years ago
Is it fixed?

Original comment by renganat...@google.com on 23 Oct 2014 at 10:17

GoogleCodeExporter commented 9 years ago
will check on monday when we get new libvpx roll in.

Original comment by marpan@google.com on 24 Oct 2014 at 10:14

GoogleCodeExporter commented 9 years ago
Ping. Marco, is this fixed?

Original comment by johannko...@google.com on 6 Nov 2014 at 12:53

GoogleCodeExporter commented 9 years ago
Still getting a failure with this latest version of libvpx in webrtc, picked up 
in the roll: https://codereview.chromium.org/668403002

The failure log for the test bot is here:
http://chromegw.corp.google.com/i/client.webrtc/builders/Win%20DrMemory%20Full/b
uilds/1291
for the test: SendsAndReceivesVP9

Original comment by marpan@google.com on 6 Nov 2014 at 5:33

GoogleCodeExporter commented 9 years ago
Wow, what a weird place to have an uninitialized read:
unsigned int vp9_avg_8x8_c(const uint8_t *s, int p) {                           

  int i, j;                                                                                                                                                                                          
  int sum = 0;                                                                                                                                                                                       
  for (i = 0; i < 8; ++i, s+=p)                                                                                                                                                                      
    for (j = 0; j < 8; sum += s[j], ++j) {}                                                                                                                                                          

  return (sum + 32) >> 6;                                                                                                                                                                            
}

http://chromegw.corp.google.com/i/client.webrtc/builders/Win%20DrMemory%20Full/b
uilds/1291/steps/video_engine_tests/logs/SendsAndReceivesVP9

~~1220~~ Error #1: UNINITIALIZED READ: reading 0x06fbd5b4-0x06fbd5b6 2 byte(s) 
within 0x06fbd5b4-0x06fbd5b8
~~1220~~ # 0 vp9_avg_8x8_c
~~1220~~ # 1 vp9_avg_8x8_c
~~1220~~ # 2 vp9_avg_8x8_c
~~1220~~ # 3 vp9_rd_pick_intra_mode_sb
~~1220~~ # 4 vp9_pack_bitstream
~~1220~~ # 5 vp9_pack_bitstream
~~1220~~ # 6 vp9_pack_bitstream
~~1220~~ # 7 vp9_pack_bitstream
~~1220~~ # 8 vp9_pack_bitstream
~~1220~~ # 9 vp9_pack_bitstream
~~1220~~ #10 vp9_pack_bitstream
~~1220~~ #11 vp9_pack_bitstream
~~1220~~ #12 vp9_encode_frame
~~1220~~ #13 adjust_frame_rate
~~1220~~ #14 adjust_frame_rate
~~1220~~ #15 vp9_update_zbin_extra
~~1220~~ #16 vp9_get_compressed_data
~~1220~~ #17 webrtc::QualityScaler::MovingAverage::Reset
~~1220~~ #18 vpx_codec_encode
~~1220~~ #19 webrtc::VP9EncoderImpl::Encode
~~1220~~ #20 webrtc::VCMGenericEncoder::Encode
~~1220~~ #21 webrtc::vcm::VideoSender::AddVideoFrame
~~1220~~ #22 webrtc::`anonymous namespace'::VideoCodingModuleImpl::AddVideoFrame
~~1220~~ #23 webrtc::ViEEncoder::DeliverFrame
~~1220~~ #24 webrtc::ViEFrameProviderBase::DeliverFrame
~~1220~~ #25 webrtc::ViECapturer::DeliverI420Frame
~~1220~~ #26 webrtc::ViECapturer::ViECaptureProcess
~~1220~~ #27 webrtc::ViECapturer::ViECaptureThreadFunction
~~1220~~ #28 webrtc::ThreadWindows::Run
~~1220~~ #29 webrtc::ThreadWindows::StartThread
~~1220~~ #30 MSVCR120D.dll!beginthreadex                                        
       +0x1a0    (0x6c893651 <MSVCR120D.dll+0x63651>)
~~1220~~ #31 MSVCR120D.dll!endthreadex                                          
       +0x180    (0x6c893861 <MSVCR120D.dll+0x63861>)
~~1220~~ #32 KERNEL32.dll!BaseThreadInitThunk                                   
       +0x11     (0x757e338a <KERNEL32.dll+0x1338a>)
~~1220~~ Note: @0:00:24.303 in thread 1220
~~1220~~ Note: instruction: cmp    0xfffffba4(%ebp) $0x00000000

Original comment by johannko...@google.com on 6 Nov 2014 at 5:44

GoogleCodeExporter commented 9 years ago
In fact I'm not sure how it's making it to the C function. There is an SSE2 
version:
unsigned int vp9_avg_8x8_sse2(const uint8_t *s, int p) {                        

  __m128i s0, s1, u0;                                                                                                                                                                                
  unsigned int avg = 0;                                                                                                                                                                              
  u0  = _mm_setzero_si128();                                                                                                                                                                         
  s0 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(s)), u0);                                                                                                                                 
  s1 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(s + p)), u0);                                                                                                                             
  s0 = _mm_adds_epu16(s0, s1);                                                                                                                                                                       
  s1 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(s + 2 * p)), u0);                                                                                                                         
  s0 = _mm_adds_epu16(s0, s1);                                                                                                                                                                       
  s1 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(s + 3 * p)), u0);                                                                                                                         
  s0 = _mm_adds_epu16(s0, s1);                                                                                                                                                                       
  s1 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(s + 4 * p)), u0);                                                                                                                         
  s0 = _mm_adds_epu16(s0, s1);                                                                                                                                                                       
  s1 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(s + 5 * p)), u0);                                                                                                                         
  s0 = _mm_adds_epu16(s0, s1);                                                                                                                                                                       
  s1 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(s + 6 * p)), u0);                                                                                                                         
  s0 = _mm_adds_epu16(s0, s1);                                                                                                                                                                       
  s1 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(s + 7 * p)), u0);                                                                                                                         
  s0 = _mm_adds_epu16(s0, s1);                                                                                                                                                                       

  s0 = _mm_adds_epu16(s0, _mm_srli_si128(s0, 8));                                                                                                                                                    
  s0 = _mm_adds_epu16(s0, _mm_srli_epi64(s0, 32));                                                                                                                                                   
  s0 = _mm_adds_epu16(s0, _mm_srli_epi64(s0, 16));                                                                                                                                                   
  avg = _mm_extract_epi16(s0, 0);                                                                                                                                                                    
  return (avg + 32) >> 6;                                                                                                                                                                            
}

Original comment by johannko...@google.com on 6 Nov 2014 at 5:45

GoogleCodeExporter commented 9 years ago
Not sure when this got fixed but that bot is green now.

Original comment by johannko...@google.com on 19 Dec 2014 at 4:54

GoogleCodeExporter commented 9 years ago

Original comment by johannko...@google.com on 19 Dec 2014 at 4:55