abwiz0086 / webm

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

VP9MultiThreadedFrameParallel.InvalidFileTest crashes during nightly test #978

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Crash stack:

WRITE of size 4 at 0xf0585a80 thread T69
    #0 0x8a74962 in vp9_read_mode_info /home/jzern/external/libvpx/git/vp9/decoder/vp9_decodemv.c:608
    #1 0x8933522 in decode_block /home/jzern/external/libvpx/git/vp9/decoder/vp9_decodeframe.c:399
    #2 0x89323c9 in decode_partition /home/jzern/external/libvpx/git/vp9/decoder/vp9_decodeframe.c:482
    #3 0x89325d2 in decode_partition /home/jzern/external/libvpx/git/vp9/decoder/vp9_decodeframe.c:499
    #4 0x892d669 in decode_tiles /home/jzern/external/libvpx/git/vp9/decoder/vp9_decodeframe.c:993
    #5 0x893f055 in vp9_receive_compressed_data /home/jzern/external/libvpx/git/vp9/decoder/vp9_decoder.c:356
    #6 0x892213c in frame_worker_hook /home/jzern/external/libvpx/git/vp9/vp9_dx_iface.c:322
    #7 0x87459fe in execute /home/jzern/external/libvpx/git/vp9/common/vp9_thread.c:134
    #8 0x819235e in ThreadStart _asan_rtl_
    #9 0x816b2ed in asan_thread_start _asan_rtl_
    #10 0xf774ef6f in start_thread /build/buildd/eglibc-2.19/nptl/pthread_create.c:312 (discriminator 1)
    #11 0xf752abed in clone /build/buildd/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/i386/clone.S:129

0xf0585a80 is located 2176 bytes inside of 25355-byte region 
[0xf0585200,0xf058b50b)
freed by thread T0 here:
    #0 0x81870f1 in __interceptor_free _asan_rtl_ (discriminator 2)
    #1 0x86487f7 in vpx_free /home/jzern/external/libvpx/git/vpx_mem/vpx_mem.c:199
    #2 0x89cc32b in vp9_free_ref_frame_buffers /home/jzern/external/libvpx/git/vp9/common/vp9_alloccommon.c:96
    #3 0x891c546 in decoder_destroy /home/jzern/external/libvpx/git/vp9/vp9_dx_iface.c:118
    #4 0x8646ec5 in vpx_codec_destroy /home/jzern/external/libvpx/git/vpx/src/vpx_codec.c:91
    #5 0x85ca978 in ~Decoder /home/jzern/external/libvpx/git/test/decode_test_driver.h:55
    #6 0x8b33767 in _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3562 (discriminator 16)
    #7 0x8aae8c2 in _ZN7testing4Test3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3634
    #8 0x8ab3419 in _ZN7testing8TestInfo3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3810
    #9 0x8ab54eb in _ZN7testing8TestCase3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3928
    #10 0x8adb9b1 in _ZN7testing8internal12UnitTestImpl11RunAllTestsEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:5799
    #11 0x8b36e47 in _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3562 (discriminator 4)
    #12 0x8adab07 in _ZN7testing8UnitTest3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:5410
    #13 0x84e2c77 in _Z13RUN_ALL_TESTSv /home/jzern/external/libvpx/git/third_party/googletest/src/include/gtest/gtest.h:20058
    #14 0xf7458a82 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287

previously allocated by thread T65 here:
    #0 0x81873d1 in __interceptor_malloc _asan_rtl_ (discriminator 2)
    #1 0x864866a in vpx_memalign /home/jzern/external/libvpx/git/vpx_mem/vpx_mem.c:126
    #2 0x8936795 in resize_mv_buffer /home/jzern/external/libvpx/git/vp9/decoder/vp9_decodeframe.c:682
    #3 0x8926c23 in setup_frame_size_with_refs /home/jzern/external/libvpx/git/vp9/decoder/vp9_decodeframe.c:802
    #4 0x893f055 in vp9_receive_compressed_data /home/jzern/external/libvpx/git/vp9/decoder/vp9_decoder.c:356
    #5 0x892213c in frame_worker_hook /home/jzern/external/libvpx/git/vp9/vp9_dx_iface.c:322
    #6 0x87459fe in execute /home/jzern/external/libvpx/git/vp9/common/vp9_thread.c:134
    #7 0x819235e in ThreadStart _asan_rtl_

Thread T69 created by T0 here:
    #0 0x816b162 in __interceptor_pthread_create _asan_rtl_
    #1 0x8744f12 in reset /home/jzern/external/libvpx/git/vp9/common/vp9_thread.c:111
    #2 0x891d1a7 in init_decoder /home/jzern/external/libvpx/git/vp9/vp9_dx_iface.c:432
    #3 0x8644640 in vpx_codec_decode /home/jzern/external/libvpx/git/vpx/src/vpx_decoder.c:122
    #4 0x8341ade in _ZN11libvpx_test7Decoder11DecodeFrameEPKhjPv /home/jzern/external/libvpx/git/test/decode_test_driver.cc:35 (discriminator 1)
    #5 0x85c9ea3 in _ZN12_GLOBAL__N_117DecodeInvalidFileERKSsii /home/jzern/external/libvpx/git/test/vp9_frame_parallel_test.cc:147 (discriminator 2)
    #6 0x8b33767 in _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3562 (discriminator 16)
    #7 0x8aae8c2 in _ZN7testing4Test3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3634
    #8 0x8ab3419 in _ZN7testing8TestInfo3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3810
    #9 0x8ab54eb in _ZN7testing8TestCase3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3928
    #10 0x8adb9b1 in _ZN7testing8internal12UnitTestImpl11RunAllTestsEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:5799
    #11 0x8b36e47 in _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3562 (discriminator 4)
    #12 0x8adab07 in _ZN7testing8UnitTest3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:5410
    #13 0x84e2c77 in _Z13RUN_ALL_TESTSv /home/jzern/external/libvpx/git/third_party/googletest/src/include/gtest/gtest.h:20058
    #14 0xf7458a82 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287

Thread T65 created by T0 here:
    #0 0x816b162 in __interceptor_pthread_create _asan_rtl_
    #1 0x8744f12 in reset /home/jzern/external/libvpx/git/vp9/common/vp9_thread.c:111
    #2 0x891d1a7 in init_decoder /home/jzern/external/libvpx/git/vp9/vp9_dx_iface.c:432
    #3 0x8644640 in vpx_codec_decode /home/jzern/external/libvpx/git/vpx/src/vpx_decoder.c:122
    #4 0x8341ade in _ZN11libvpx_test7Decoder11DecodeFrameEPKhjPv /home/jzern/external/libvpx/git/test/decode_test_driver.cc:35 (discriminator 1)
    #5 0x85c9ea3 in _ZN12_GLOBAL__N_117DecodeInvalidFileERKSsii /home/jzern/external/libvpx/git/test/vp9_frame_parallel_test.cc:147 (discriminator 2)
    #6 0x8b33767 in _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3562 (discriminator 16)
    #7 0x8aae8c2 in _ZN7testing4Test3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3634
    #8 0x8ab3419 in _ZN7testing8TestInfo3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3810
    #9 0x8ab54eb in _ZN7testing8TestCase3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3928
    #10 0x8adb9b1 in _ZN7testing8internal12UnitTestImpl11RunAllTestsEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:5799
    #11 0x8b36e47 in _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:3562 (discriminator 4)
    #12 0x8adab07 in _ZN7testing8UnitTest3RunEv /home/jzern/external/libvpx/git/third_party/googletest/src/src/gtest-all.cc:5410
    #13 0x84e2c77 in _Z13RUN_ALL_TESTSv /home/jzern/external/libvpx/git/third_party/googletest/src/include/gtest/gtest.h:20058
    #14 0xf7458a82 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287

Original issue reported on code.google.com by hku...@google.com on 17 Mar 2015 at 10:34

GoogleCodeExporter commented 9 years ago
The reason is because a worker thread try to free all the frame buffers while 
another worker is still using it. The fix is to free all the frame buffers 
after all the workers finish the work. 

Fix is here: https://gerrit.chromium.org/gerrit/#/c/74096/

Original comment by hku...@google.com on 17 Mar 2015 at 10:37