ericmckean / webm

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

VP9 crash at speed 6 when LAST_REF Is not used #825

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Added a test case where we don't use LAST_REF as predictor periodicially.
The test crashes at speed 6, real-time mode:
./test_libvpx 
gtest_filter=VP9/ErrorResilienceTestLarge.TestFlagsPeriodicNoRefLast/0

crashes at: vp9/encoder/vp9_pickmode.c:651 (see trace below). 
VP8 case passes fine.

This crash semes to be the same as reported in: 
https://code.google.com/p/webm/issues/detail?id=824.
In that case, the temporal pattern used has instance of not setting using 
LAST_REF (i.e., VP8_EFLAG_NO_REF_LAST).

Crash stack:

gdb ./test_libvpx
GNU gdb (GDB) 7.7-gg7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux".
Type "show configuration" for configuration details.

<http://go/gdb-home  FAQ: http://go/gdb-faq  Email: gdb-team  IRC: gdb>
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Reading symbols from ./test_libvpx...done.
(gdb) run 
--gtest_filter=VP9/ErrorResilienceTestLarge.TestFlagsPeriodicNoRefLast/0
Starting program: 
/usr/local/google/home/marpan/work/libvpx_new_crash/libvpx/test_libvpx 
--gtest_filter=VP9/ErrorResilienceTestLarge.TestFlagsPeriodicNoRefLast/0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/grte/v3/lib64/libthread_db.so.1".
Note: Google Test filter = 
VP9/ErrorResilienceTestLarge.TestFlagsPeriodicNoRefLast/0-:AVX2/*
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from VP9/ErrorResilienceTestLarge
[ RUN      ] VP9/ErrorResilienceTestLarge.TestFlagsPeriodicNoRefLast/0

Program received signal SIGSEGV, Segmentation fault.
0x00000000006df634 in vp9_pick_inter_mode (cpi=0x7ffff6e25020, 
x=0x7ffff6e31020, tile=<optimized out>, mi_row=0, mi_col=0, 
returnrate=0x7fffffffc8a8, returndistortion=0x7fffffffc8a0, bsize=BLOCK_16X16) 
at vp9/encoder/vp9_pickmode.c:651
651   if (cpi->sf.reuse_inter_pred_sby && best_pred->data != orig_dst.buf) {
(gdb) bt
#0  0x00000000006df634 in vp9_pick_inter_mode (cpi=0x7ffff6e25020, 
x=0x7ffff6e31020, tile=<optimized out>, mi_row=0, mi_col=0, 
returnrate=0x7fffffffc8a8, returndistortion=0x7fffffffc8a0, bsize=BLOCK_16X16) 
at vp9/encoder/vp9_pickmode.c:651
#1  0x00000000006b9ff9 in nonrd_pick_sb_modes (cpi=0x7ffff6e25020, 
tile=0x7fffffffc880, mi_row=0, mi_col=0, rate=0x7fffffffc8a8, 
dist=0x7fffffffc8a0, bsize=BLOCK_16X16) at vp9/encoder/vp9_encodeframe.c:2414
#2  0x00000000006c03d2 in nonrd_use_partition (cpi=0x7ffff6e25020, 
tile=0x7fffffffc880, mi=0xb0e748, tp=<optimized out>, mi_row=0, mi_col=0, 
bsize=BLOCK_16X16, totrate=0x7fffffffc8a8, totdist=0x7fffffffc8a0, 
pc_tree=0x7ffff691d620, 
    output_enabled=1) at vp9/encoder/vp9_encodeframe.c:2755
#3  0x00000000006c064a in nonrd_use_partition (cpi=0x7ffff6e25020, 
tile=0x7fffffffc880, mi=0xb0e748, tp=<optimized out>, mi_row=0, mi_col=0, 
bsize=BLOCK_32X32, totrate=0x7fffffffc8a8, totdist=0x7fffffffc8a0, 
pc_tree=0x7ffff692dfa0, 
    output_enabled=1) at vp9/encoder/vp9_encodeframe.c:2798
#4  0x00000000006c064a in nonrd_use_partition (cpi=0x7ffff6e25020, 
tile=0x7fffffffc880, mi=0xb0e748, tp=<optimized out>, mi_row=0, mi_col=0, 
bsize=BLOCK_64X64, totrate=0x7fffffffc8a8, totdist=0x7fffffffc8a0, 
pc_tree=0x7ffff6932200, 
    output_enabled=1) at vp9/encoder/vp9_encodeframe.c:2798
#5  0x00000000006c68ca in encode_nonrd_sb_row (tp=0x7fffffffc890, mi_row=0, 
tile=0x7fffffffc880, cpi=0x7ffff6e25020) at vp9/encoder/vp9_encodeframe.c:2897
#6  encode_tiles (cpi=0x7ffff6e25020) at vp9/encoder/vp9_encodeframe.c:3027
#7  encode_frame_internal (cpi=0x7ffff6e25020) at 
vp9/encoder/vp9_encodeframe.c:3104
#8  0x00000000005f1f19 in encode_without_recode_loop (q=<optimized out>, 
cpi=0x7ffff6e25020) at vp9/encoder/vp9_encoder.c:1769
#9  encode_frame_to_data_rate (cpi=0x7ffff6e25020, size=0x7fffffffccd0, 
dest=0x7ffff7e83010 "\207\001\002K*\034\022\016\f\271", 
frame_flags=0x7fffffffcce0) at vp9/encoder/vp9_encoder.c:2226
#10 0x00000000005f4acd in Pass0Encode (frame_flags=<optimized out>, 
dest=<optimized out>, size=<optimized out>, cpi=<optimized out>) at 
vp9/encoder/vp9_encoder.c:2352
#11 vp9_get_compressed_data (cpi=0x7ffff6e25020, frame_flags=0x7fffffffcce0, 
size=0x7fffffffccd0, dest=0x7ffff7e83010 "\207\001\002K*\034\022\016\f\271", 
time_stamp=0x7fffffffccb0, time_end=<optimized out>, flush=0)
    at vp9/encoder/vp9_encoder.c:2736
#12 0x00000000005d6b85 in encoder_encode (ctx=0xb09c60, img=0xb05bb0, 
pts=<optimized out>, duration=<optimized out>, flags=<optimized out>, 
deadline=<optimized out>) at vp9/vp9_cx_iface.c:859
#13 0x0000000000560ff5 in vpx_codec_encode (ctx=0xb098a8, img=<optimized out>, 
pts=4, duration=1, flags=65536, deadline=1) at vpx/src/vpx_encoder.c:227
#14 0x000000000048f15e in libvpx_test::Encoder::EncodeFrameInternal 
(this=0xb098a0, video=..., frame_flags=65536) at test/encode_test_driver.cc:62
#15 0x0000000000490dec in EncodeFrame (frame_flags=65536, video=0x7fffffffd840, 
this=0xb098a0) at test/encode_test_driver.cc:22
#16 libvpx_test::EncoderTest::RunLoop (this=0xb095e0, video=0x7fffffffd840) at 
test/encode_test_driver.cc:165
#17 0x00000000004964fc in (anonymous 
namespace)::ErrorResilienceTestLarge_TestFlagsPeriodicNoRefLast_Test::TestBody 
(this=0xb095e0) at test/error_resilience_test.cc:178
#18 0x00000000007102cd in HandleSehExceptionsInMethodIfSupported<testing::Test, 
void> (method=<optimized out>, object=<optimized out>, location=<optimized 
out>) at third_party/googletest/src/src/gtest-all.cc:3562
#19 testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> 
(object=0xb09740, method=&virtual testing::Test::TestBody(), location=0x765c4a 
"the test body") at third_party/googletest/src/src/gtest-all.cc:3598
#20 0x0000000000707e20 in testing::Test::Run (this=0xb09740) at 
third_party/googletest/src/src/gtest-all.cc:3635
#21 0x00000000007080e8 in testing::TestInfo::Run (this=0xa619f0) at 
third_party/googletest/src/src/gtest-all.cc:3810
#22 0x00000000007082a1 in testing::TestCase::Run (this=0xa624a0) at 
third_party/googletest/src/src/gtest-all.cc:3928
#23 0x000000000070886e in RunAllTests (this=0xa0d030) at 
third_party/googletest/src/src/gtest-all.cc:5799
#24 testing::internal::UnitTestImpl::RunAllTests (this=0xa0d030) at 
third_party/googletest/src/src/gtest-all.cc:5706
#25 0x0000000000708ce5 in 
HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (
    method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x7083f0 <testing::internal::UnitTestImpl::RunAllTests()>, object=<optimized out>, location=<optimized out>)
    at third_party/googletest/src/src/gtest-all.cc:3562
#26 HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> 
(method=(bool 
(testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 
0x7083f0 <testing::internal::UnitTestImpl::RunAllTests()>, 
    object=0xa0d030, location=<optimized out>) at third_party/googletest/src/src/gtest-all.cc:3598
#27 testing::UnitTest::Run (this=<optimized out>) at 
third_party/googletest/src/src/gtest-all.cc:5413
#28 0x0000000000411efd in RUN_ALL_TESTS () at 
./third_party/googletest/src/include/gtest/gtest.h:20058
#29 main (argc=1, argv=<optimized out>) at test/test_libvpx.cc:68

Original issue reported on code.google.com by marpan@google.com on 14 Jul 2014 at 5:40

GoogleCodeExporter commented 9 years ago
The test case for the crash is in this patch: 
https://gerrit.chromium.org/gerrit/#/c/70850/

To reproduce: Apply the above patch to tip/master and run:
./test_libvpx 
gtest_filter=VP9/ErrorResilienceTestLarge.TestFlagsPeriodicNoRefLast/0

Original comment by marpan@google.com on 14 Jul 2014 at 5:41

GoogleCodeExporter commented 9 years ago

Original comment by marpan@google.com on 14 Jul 2014 at 5:42

GoogleCodeExporter commented 9 years ago
Proposing a fix here: 
https://gerrit.chromium.org/gerrit/#/c/70854/1

Original comment by ya...@google.com on 14 Jul 2014 at 9:59

GoogleCodeExporter commented 9 years ago
the proposed fix is now merged. 

Original comment by ya...@google.com on 15 Jul 2014 at 7:02