iniwf / webm

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

Segmentation fault while VP8 encoding in ARM Neon #875

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes libvpx(1.3.0) with WebRTC(r6225) crashes on linux(3.4.61), 
ARMv7(Cortex A7) using neon vfpv4, hardfp. At that time, backtrace is like 
below(summary).

  0x6f7a1e in vp8_find_near_mvs
  0xxxxxxx in vp8_find_near_mvs_bias
  0xxxxxxx in vp8_pick_inter_mode
  0xxxxxxx in vp8cx_encode_inter_macroblock
  0xxxxxxx in encode_mb_row
  0xxxxxxx in vp8_encode_frame
  0xxxxxxx ...

Here is disassembly near address 0x6f7a1e.

  6f6a00:   681a        ldr r2, [r3, #0]
  6f6a02:   6cfb        ldr r3, [r7, #76]   ; 0x4c
  6f6a04:   681b        ldr r3, [r3, #0]
  6f6a06:   429a        cmp r2, r3
  6f6a08:   db01        blt.n   6f6a0e <vp8_find_near_mvs+0x21a>
  6f6a0a:   6b7b        ldr r3, [r7, #52]   ; 0x34
  6f6a0c:   633b        str r3, [r7, #48]   ; 0x30
  6f6a0e:   6b3a        ldr r2, [r7, #48]   ; 0x30
  6f6a10:   6cbb        ldr r3, [r7, #72]   ; 0x48
  6f6a12:   601a        str r2, [r3, #0]
  6f6a14:   6b7a        ldr r2, [r7, #52]   ; 0x34
  6f6a16:   687b        ldr r3, [r7, #4]
  6f6a18:   601a        str r2, [r3, #0]
  6f6a1a:   6bba        ldr r2, [r7, #56]   ; 0x38
  6f6a1c:   683b        ldr r3, [r7, #0]
  6f6a1e:   601a        str r2, [r3, #0]
  6f6a20:   3740        adds    r7, #64 ; 0x40
  6f6a22:   46bd        mov sp, r7
  6f6a24:   bd80        pop {r7, pc}
  6f6a26:   bf00        nop

Used CFLAGS is like below.

  -fstack-protector --param=ssp-buffer-size=4 -pthread $
  -fno-exceptions -fno-strict-aliasing -Wno-unused-parameter $
  -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC $
  -Wno-unused-local-typedefs $
  -Wa,-I,/home/betty/work/webrtc/trunk/third_party/libvpx/source/config/linux/arm-neon $
  -Wa,-I,/home/betty/work/webrtc/trunk/third_party/libvpx/source/config $
  -Wa,-I,gen/third_party/libvpx -Wa,-mcpu=cortex-a7 -Wno-format $
  -Wno-unused-result -march=armv7-a -mfpu=neon -mfloat-abi=hard -mthumb $
  --sysroot=/home/betty/opt/usr/arm-linux-gnueabihf/sysroot $
  -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables

Original issue reported on code.google.com by yic...@gmail.com on 31 Oct 2014 at 5:26

GoogleCodeExporter commented 9 years ago

Original comment by fgalli...@google.com on 31 Oct 2014 at 3:33

GoogleCodeExporter commented 9 years ago
Does this occur with current git or only 1.3.0? WebRTC directly includes a much 
newer version.

Original comment by johannko...@google.com on 31 Oct 2014 at 5:44

GoogleCodeExporter commented 9 years ago
I'm using revision 267596(May 1, 2014). Not yet tried latest version because I 
think newer revisions after 267596 are not related with this issue. I'll try 
again with newer revision, and put a comment. 

Original comment by yic...@gmail.com on 1 Nov 2014 at 6:18

GoogleCodeExporter commented 9 years ago
Both 
1.3.0(https://code.google.com/p/webm/downloads/detail?name=libvpx-v1.3.0.tar.bz2
&can=2&q=) and the latest version crash at the same place.

Original comment by yic...@gmail.com on 4 Nov 2014 at 10:32

GoogleCodeExporter commented 9 years ago
WebRTC with vp8 on arm is in fairly wide use - can you please share your 
specific configuration/use case/steps to reproduce? I'm not able to repro.

Original comment by johannko...@google.com on 4 Nov 2014 at 6:08

GoogleCodeExporter commented 9 years ago
The base system is Cubieboard2 which is a single-board 
computer(http://docs.cubieboard.org/products/start#a20-cubieboard) containing 2 
ARM Cortex-A7 MPCore CPU. We connect general usb webcam(VGA) and try to run 
WebRTC. The linux kernel is 3.4.61(https://github.com/linux-sunxi/linux-sunxi).

The crash happens irregularly, but it happens surely within a few 
hours(30minutes ~ 2hours). At first we doubted the system, but the system and 
camera are normal after happened.

Original comment by yic...@gmail.com on 5 Nov 2014 at 2:06

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago

Original comment by renganat...@google.com on 20 Nov 2014 at 11:18

GoogleCodeExporter commented 9 years ago

Original comment by fgalli...@google.com on 30 Jan 2015 at 8:40