Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-19236

Threadsanitizer data race in block cache item->addr

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.5.0
    • 4.5.0
    • forestdb
    • None
    • Untriaged
    • No

    Description

      WARNING: ThreadSanitizer: data race (pid=24573)
      Read of size 8 at 0x7d080000efc0 by thread T2:
      #0 pwrite <null>:0 (bcache_test+0x000000065100)
      #1 _filemgr_linux_pwrite(int, void*, unsigned long, long) /root/work/watson/forestdb/src/filemgr_ops_linux.cc:50 (bcache_test+0x0000000ce1df)
      #2 filemgr_write_blocks /root/work/watson/forestdb/src/filemgr.cc:352 (bcache_test+0x0000000c35a3)
      #3 _flush_dirty_blocks(fnamedic_item*, bool, bool, bool) /root/work/watson/forestdb/src/blockcache.cc:585 (bcache_test+0x0000000c05d5)
      #4 _bcache_evict(fnamedic_item*) /root/work/watson/forestdb/src/blockcache.cc:712 (bcache_test+0x0000000bf0a8)
      #5 worker(void*) /root/work/watson/forestdb/tests/unit/bcache_test.cc:144 (bcache_test+0x0000000bbf31)

      Previous write of size 8 at 0x7d080000efc0 by thread T1 (mutexes: write M247):
      #0 memcpy <null>:0 (bcache_test+0x000000055950)
      #1 bcache_write /root/work/watson/forestdb/src/blockcache.cc:1159 (bcache_test+0x0000000bf4c3)
      #2 worker(void*) /root/work/watson/forestdb/tests/unit/bcache_test.cc:163 (bcache_test+0x0000000bc025)

      Location is heap block of size 32 at 0x7d080000efc0 allocated by main thread:
      #0 malloc <null>:0 (bcache_test+0x0000000540ad)
      #1 bcache_init /root/work/watson/forestdb/src/blockcache.cc:1417 (bcache_test+0x0000000c14d2)
      #2 filemgr_init /root/work/watson/forestdb/src/filemgr.cc:231 (bcache_test+0x0000000c3275)
      #3 filemgr_open /root/work/watson/forestdb/src/filemgr.cc:731 (bcache_test+0x0000000c3bcc)
      #4 multi_thread_test(int, int, int, int, int, int) /root/work/watson/forestdb/tests/unit/bcache_test.cc:214 (bcache_test+0x0000000bc303)
      #5 main /root/work/watson/forestdb/tests/unit/bcache_test.cc:252 (bcache_test+0x0000000bc594)

      Mutex M247 (0x7d6400018250) created at:
      #0 pthread_spin_init <null>:0 (bcache_test+0x0000000598e0)
      #1 _fname_create(filemgr*) /root/work/watson/forestdb/src/blockcache.cc:807 (bcache_test+0x0000000bf7b9)
      #2 bcache_write /root/work/watson/forestdb/src/blockcache.cc:1062 (bcache_test+0x0000000bedc6)
      #3 multi_thread_test(int, int, int, int, int, int) /root/work/watson/forestdb/tests/unit/bcache_test.cc:223 (bcache_test+0x0000000bc3a0)
      #4 main /root/work/watson/forestdb/tests/unit/bcache_test.cc:252 (bcache_test+0x0000000bc594)

      Thread T2 (tid=24582, running) created by main thread at:
      #0 pthread_create <null>:0 (bcache_test+0x000000057dc1)
      #1 multi_thread_test(int, int, int, int, int, int) /root/work/watson/forestdb/tests/unit/bcache_test.cc:232 (bcache_test+0x0000000bc480)
      #2 main /root/work/watson/forestdb/tests/unit/bcache_test.cc:252 (bcache_test+0x0000000bc594)

      Thread T1 (tid=24581, running) created by main thread at:
      #0 pthread_create <null>:0 (bcache_test+0x000000057dc1)
      #1 multi_thread_test(int, int, int, int, int, int) /root/work/watson/forestdb/tests/unit/bcache_test.cc:232 (bcache_test+0x0000000bc480)
      #2 main /root/work/watson/forestdb/tests/unit/bcache_test.cc:252 (bcache_test+0x0000000bc594)

      SUMMARY: ThreadSanitizer: data race ??:0 pwrite

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            abhinav Abhi Dangeti
            sundar Sundar Sridharan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty