Skip to content

Data race in s3Sg.ivf with frame threads

[jamrial@ArchVM build]$ ./dav1d --framethreads 4 -i s3Sg.ivf --muxer yuv -o /dev/null
dav1d dd57660 - by VideoLAN
Decoded 1/24 frames (4.2%)==================
WARNING: ThreadSanitizer: data race (pid=1151)
  Write of size 1 at 0x7fbfe5864a0b by thread T4:
    #0 restore2x8 ../src/cdef_apply.c:87 (libdav1d.so.0+0x7752c)
    #1 dav1d_cdef_brow_8bpc ../src/cdef_apply.c:169 (libdav1d.so.0+0x77d41)
    #2 filter_sbrow_8bpc ../src/recon.c:1468 (libdav1d.so.0+0x8e903)
    #3 decode_frame ../src/decode.c:2563 (libdav1d.so.0+0x2cc3e)
    #4 dav1d_frame_task ../src/thread_task.c:53 (libdav1d.so.0+0xcb6b8)

  Previous read of size 1 at 0x7fbfe5864a0b by thread T1:
    #0 memcpy /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:737 (libtsan.so.0+0x32ace)
    #1 emu_edge ../src/recon.c:475 (libdav1d.so.0+0x8478e)
    #2 mc ../src/recon.c:527 (libdav1d.so.0+0x84c9d)
    #3 recon_b_inter_8bpc ../src/recon.c:1194 (libdav1d.so.0+0x8bbca)
    #4 decode_b ../src/decode.c:1678 (libdav1d.so.0+0x23eb5)
    #5 decode_sb ../src/decode.c:1806 (libdav1d.so.0+0x2561d)
    #6 decode_sb ../src/decode.c:1840 (libdav1d.so.0+0x25c8d)
    #7 decode_sb ../src/decode.c:1840 (libdav1d.so.0+0x25c8d)
    #8 decode_tile_sbrow ../src/decode.c:2215 (libdav1d.so.0+0x2918f)
    #9 decode_frame ../src/decode.c:2557 (libdav1d.so.0+0x2cb91)
    #10 dav1d_frame_task ../src/thread_task.c:53 (libdav1d.so.0+0xcb6b8)

  Location is heap block of size 442376 at 0x7fbfe5805000 allocated by main thread:
    #0 posix_memalign /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors.cc:792 (libtsan.so.0+0x2bc41)
    #1 dav1d_alloc_aligned ../include/common/mem.h:46 (libdav1d.so.0+0x8db6)
    #2 dav1d_ref_create ../src/ref.c:40 (libdav1d.so.0+0x8e97)
    #3 picture_alloc_with_edges ../src/picture.c:76 (libdav1d.so.0+0x7d58)
    #4 dav1d_thread_picture_alloc ../src/picture.c:100 (libdav1d.so.0+0x7f80)
    #5 submit_frame ../src/decode.c:2772 (libdav1d.so.0+0x2e501)
    #6 parse_obus ../src/obu.c:1067 (libdav1d.so.0+0x1158b)
    #7 dav1d_decode ../src/lib.c:195 (libdav1d.so.0+0xca861)
    #8 main ../tools/dav1d.c:110 (dav1d+0x286e)

  Thread T4 (tid=1156, running) created by main thread at:
    #0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors.cc:915 (libtsan.so.0+0x2bf03)
    #1 dav1d_open ../src/lib.c:128 (libdav1d.so.0+0xca2e5)
    #2 main ../tools/dav1d.c:105 (dav1d+0x2812)

  Thread T1 (tid=1153, running) created by main thread at:
    #0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors.cc:915 (libtsan.so.0+0x2bf03)
    #1 dav1d_open ../src/lib.c:128 (libdav1d.so.0+0xca2e5)
    #2 main ../tools/dav1d.c:105 (dav1d+0x2812)

SUMMARY: ThreadSanitizer: data race ../src/cdef_apply.c:87 in restore2x8
==================
==================
WARNING: ThreadSanitizer: data race (pid=1151)
  Write of size 1 at 0x7fbfe5852d0b by thread T4:
    #0 restore2x8 ../src/cdef_apply.c:86 (libdav1d.so.0+0x774d4)
    #1 dav1d_cdef_brow_8bpc ../src/cdef_apply.c:169 (libdav1d.so.0+0x77d41)
    #2 filter_sbrow_8bpc ../src/recon.c:1468 (libdav1d.so.0+0x8e903)
    #3 decode_frame ../src/decode.c:2563 (libdav1d.so.0+0x2cc3e)
    #4 dav1d_frame_task ../src/thread_task.c:53 (libdav1d.so.0+0xcb6b8)

  Previous read of size 1 at 0x7fbfe5852d0b by thread T1:
    #0 memcpy /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:737 (libtsan.so.0+0x32ace)
    #1 emu_edge ../src/recon.c:475 (libdav1d.so.0+0x8478e)
    #2 mc ../src/recon.c:527 (libdav1d.so.0+0x84c9d)
    #3 recon_b_inter_8bpc ../src/recon.c:1194 (libdav1d.so.0+0x8bbca)
    #4 decode_b ../src/decode.c:1678 (libdav1d.so.0+0x23eb5)
    #5 decode_sb ../src/decode.c:1806 (libdav1d.so.0+0x2561d)
    #6 decode_sb ../src/decode.c:1840 (libdav1d.so.0+0x25c8d)
    #7 decode_sb ../src/decode.c:1840 (libdav1d.so.0+0x25c8d)
    #8 decode_tile_sbrow ../src/decode.c:2215 (libdav1d.so.0+0x2918f)
    #9 decode_frame ../src/decode.c:2557 (libdav1d.so.0+0x2cb91)
    #10 dav1d_frame_task ../src/thread_task.c:53 (libdav1d.so.0+0xcb6b8)

  Location is heap block of size 442376 at 0x7fbfe5805000 allocated by main thread:
    #0 posix_memalign /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors.cc:792 (libtsan.so.0+0x2bc41)
    #1 dav1d_alloc_aligned ../include/common/mem.h:46 (libdav1d.so.0+0x8db6)
    #2 dav1d_ref_create ../src/ref.c:40 (libdav1d.so.0+0x8e97)
    #3 picture_alloc_with_edges ../src/picture.c:76 (libdav1d.so.0+0x7d58)
    #4 dav1d_thread_picture_alloc ../src/picture.c:100 (libdav1d.so.0+0x7f80)
    #5 submit_frame ../src/decode.c:2772 (libdav1d.so.0+0x2e501)
    #6 parse_obus ../src/obu.c:1067 (libdav1d.so.0+0x1158b)
    #7 dav1d_decode ../src/lib.c:195 (libdav1d.so.0+0xca861)
    #8 main ../tools/dav1d.c:110 (dav1d+0x286e)

  Thread T4 (tid=1156, running) created by main thread at:
    #0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors.cc:915 (libtsan.so.0+0x2bf03)
    #1 dav1d_open ../src/lib.c:128 (libdav1d.so.0+0xca2e5)
    #2 main ../tools/dav1d.c:105 (dav1d+0x2812)

  Thread T1 (tid=1153, running) created by main thread at:
    #0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors.cc:915 (libtsan.so.0+0x2bf03)
    #1 dav1d_open ../src/lib.c:128 (libdav1d.so.0+0xca2e5)
    #2 main ../tools/dav1d.c:105 (dav1d+0x2812)

SUMMARY: ThreadSanitizer: data race ../src/cdef_apply.c:86 in restore2x8
==================
Decoded 24/24 frames (100.0%)
ThreadSanitizer: reported 2 warnings
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information