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

Replace rw_spin_lock implementation with pthread/srwthread versions

    XMLWordPrintable

Details

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

    Description

      This is to avoid data races that thread sanitizer catches despite enclosing the affected code within the existent rw_spin_lock.

      11:38:55 WARNING: ThreadSanitizer: data race (pid=121717)
      11:38:55   Write of size 8 at 0x0000015616a0 by thread T2 (mutexes: write M12407, write M13064, write M13132, write M13):
      11:38:55     #0 _fname_create(filemgr*) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/blockcache.cc:809 (e2etest+0x0000004d6079)
      11:38:55     #1 bcache_write_partial /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/blockcache.cc:1165 (e2etest+0x0000004d6135)
      11:38:55     #2 filemgr_write_offset /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/filemgr.cc:2115 (e2etest+0x0000004f3760)
      11:38:55     #3 _btreeblk_alloc(void*, unsigned long*, int) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/btreeblock.cc:189 (e2etest+0x0000004e57d3)
      11:38:55     #4 btreeblk_alloc_sub(void*, unsigned long*) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/btreeblock.cc:767 (e2etest+0x0000004e3dab)
      11:38:55     #5 btree_init /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/btree.cc:394 (e2etest+0x0000004d949c)
      11:38:55     #6 fdb_compact_file /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:6610 (e2etest+0x000000504a08)
      11:38:55     #7 _fdb_compact(_fdb_file_handle*, char const*, unsigned long, bool, fdb_encryption_key const*) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:6957 (e2etest+0x00000050bf9e)
      11:38:55     #8 fdb_compact /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:6970 (e2etest+0x00000050beda)
      11:38:55     #9 compact_thread(void*) crtstuff.c (e2etest+0x0000004c89bb)
      11:38:55
      11:38:55   Previous read of size 8 at 0x0000015616a0 by thread T3:
      11:38:55     #0 _bcache_get_victim() /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/blockcache.cc:258 (e2etest+0x0000004d556d)
      11:38:55     #1 filemgr_read /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/filemgr.cc:1989 (e2etest+0x0000004f19cb)
      11:38:55     #2 _docio_read_through_buffer(docio_handle*, unsigned long, err_log_callback*, bool) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/docio.cc:691 (e2etest+0x0000004eb19b)
      11:38:55     #3 docio_read_doc /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/docio.cc:1380 (e2etest+0x0000004ec4fc)
      11:38:55     #4 fdb_iterator_get <null> (e2etest+0x00000051fbd6)
      11:38:55     #5 iterate_thread(void*) crtstuff.c (e2etest+0x0000004c8627)
      

      Attachments

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

        Activity

          People

            abhinav Abhi Dangeti
            abhinav Abhi Dangeti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty