[FFmpeg-trac] #7570(avcodec:new): fate-h264-conformance-frext-hpcafl_bcrm_c failes with THREADS=3

FFmpeg trac at avcodec.org
Sat Sep 16 06:01:05 EEST 2023


#7570: fate-h264-conformance-frext-hpcafl_bcrm_c failes with THREADS=3
-------------------------------------+-------------------------------------
             Reporter:  Carl Eugen   |                    Owner:  (none)
  Hoyos                              |
                 Type:  defect       |                   Status:  new
             Priority:  important    |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  h264 race    |               Blocked By:
  regression                         |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by mkver):

 tsan shows races with this one:

 {{{
 WARNING: ThreadSanitizer: data race (pid=962636)
   Read of size 4 at 0x7b7000020118 by thread T6 (mutexes: write M0):
     #0 pred_temp_direct_motion src/libavcodec/h264_direct.c:504:9
 (libavcodec.so.60+0x4384dc) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #1 ff_h264_pred_direct_motion src/libavcodec/h264_direct.c:726:9
 (libavcodec.so.60+0x4384dc)
     #2 ff_h264_decode_mb_cabac src/libavcodec/h264_cabac.c:2124:17
 (libavcodec.so.60+0x41c6ac) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #3 decode_slice src/libavcodec/h264_slice.c:2614:19
 (libavcodec.so.60+0x485292) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #4 ff_h264_execute_decode_slices src/libavcodec/h264_slice.c:2788:15
 (libavcodec.so.60+0x48473d) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #5 decode_nal_units src/libavcodec/h264dec.c:675:27
 (libavcodec.so.60+0x49488f) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #6 h264_decode_frame src/libavcodec/h264dec.c:1047:17
 (libavcodec.so.60+0x49488f)
     #7 frame_worker_thread src/libavcodec/pthread_frame.c:228:21
 (libavcodec.so.60+0x82968c) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #8 <null> <null> (ffmpeg+0x58858) (BuildId:
 861bb3de734715ec5061bd4c494dd54f21bed62e)

   Previous write of size 4 at 0x7b7000020118 by thread T4 (mutexes: write
 M1):
     #0 ff_h264_decode_mb_cabac src/libavcodec/h264_cabac.c:2392:31
 (libavcodec.so.60+0x41eaf2) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #1 decode_slice src/libavcodec/h264_slice.c:2614:19
 (libavcodec.so.60+0x485292) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #2 ff_h264_execute_decode_slices src/libavcodec/h264_slice.c:2788:15
 (libavcodec.so.60+0x48473d) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #3 decode_nal_units src/libavcodec/h264dec.c:675:27
 (libavcodec.so.60+0x49488f) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #4 h264_decode_frame src/libavcodec/h264dec.c:1047:17
 (libavcodec.so.60+0x49488f)
     #5 frame_worker_thread src/libavcodec/pthread_frame.c:228:21
 (libavcodec.so.60+0x82968c) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #6 <null> <null> (ffmpeg+0x58858) (BuildId:
 861bb3de734715ec5061bd4c494dd54f21bed62e)
 }}}

 It also shows the same races in (at least) h264-conformance-frext-
 hpcaflnl_bcrm_c and h264-conformance-frext-hpcamapalq_bcrm_b. There is
 also a CAVLC analog:

 {{{
 WARNING: ThreadSanitizer: data race (pid=963052)
   Read of size 4 at 0x7b7000021118 by thread T6 (mutexes: write M0):
     #0 pred_temp_direct_motion src/libavcodec/h264_direct.c:504:9
 (libavcodec.so.60+0x4384dc) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #1 ff_h264_pred_direct_motion src/libavcodec/h264_direct.c:726:9
 (libavcodec.so.60+0x4384dc)
     #2 ff_h264_decode_mb_cavlc src/libavcodec/h264_cavlc.c:855:17
 (libavcodec.so.60+0x42c78c) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #3 decode_slice src/libavcodec/h264_slice.c:2685:19
 (libavcodec.so.60+0x485bff) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #4 ff_h264_execute_decode_slices src/libavcodec/h264_slice.c:2788:15
 (libavcodec.so.60+0x48473d) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #5 decode_nal_units src/libavcodec/h264dec.c:675:27
 (libavcodec.so.60+0x49488f) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #6 h264_decode_frame src/libavcodec/h264dec.c:1047:17
 (libavcodec.so.60+0x49488f)
     #7 frame_worker_thread src/libavcodec/pthread_frame.c:228:21
 (libavcodec.so.60+0x82968c) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #8 <null> <null> (ffmpeg+0x58858) (BuildId:
 861bb3de734715ec5061bd4c494dd54f21bed62e)

   Previous write of size 4 at 0x7b7000021118 by thread T4 (mutexes: write
 M1):
     #0 ff_h264_decode_mb_cavlc src/libavcodec/h264_cavlc.c:1094:31
 (libavcodec.so.60+0x4311ce) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #1 decode_slice src/libavcodec/h264_slice.c:2685:19
 (libavcodec.so.60+0x485bff) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #2 ff_h264_execute_decode_slices src/libavcodec/h264_slice.c:2788:15
 (libavcodec.so.60+0x48473d) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #3 decode_nal_units src/libavcodec/h264dec.c:675:27
 (libavcodec.so.60+0x49488f) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #4 h264_decode_frame src/libavcodec/h264dec.c:1047:17
 (libavcodec.so.60+0x49488f)
     #5 frame_worker_thread src/libavcodec/pthread_frame.c:228:21
 (libavcodec.so.60+0x82968c) (BuildId:
 275297ad43451441dc12abf5615000d86b6c49ef)
     #6 <null> <null> (ffmpeg+0x58858) (BuildId:
 861bb3de734715ec5061bd4c494dd54f21bed62e)
 }}}

 This one happens (at least) in h264-conformance-frext-hpcvfl_bcrm_a, h264
 -conformance-frext-hpcvflnl_bcrm_a and h264-conformance-mr8_bt_b.

 Notice that ubitux' [https://fate.ffmpeg.org/history.cgi?slot=x86_64
 -archlinux-gcc-tsan tsan FATE-box] uses two threads and therefore does not
 show these races.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/7570#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list