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

[ThreadSanitizer] Lock inversion / data race seen with file handle's lock

    XMLWordPrintable

Details

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

    Description

      11:02:18 WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=109140)
      11:02:18   Cycle in lock order graph: M199 (0x7d0c0000eff0) => M517 (0x7d100000d570) => M199
      11:02:18 
      11:02:18   Mutex M517 acquired here while holding mutex M199 in main thread:
      11:02:18     #0 pthread_spin_lock <null> (multi_kv_functional_test+0x000000466ac0)
      11:02:18     #1 fdb_kvs_open /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/kv_instance.cc:1650 (multi_kv_functional_test+0x000000530523)
      11:02:18     #2 multi_kv_test(unsigned char, unsigned long) crtstuff.c (multi_kv_functional_test+0x0000004c973a)
      11:02:18     #3 main crtstuff.c (multi_kv_functional_test+0x0000004ddc47)
      11:02:18 
      11:02:18   Mutex M199 previously acquired by the same thread here:
      11:02:18     #0 pthread_spin_lock <null> (multi_kv_functional_test+0x000000466ac0)
      11:02:18     #1 fdb_kvs_open /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/kv_instance.cc:1638 (multi_kv_functional_test+0x000000530387)
      11:02:18     #2 multi_kv_test(unsigned char, unsigned long) crtstuff.c (multi_kv_functional_test+0x0000004c973a)
      11:02:18     #3 main crtstuff.c (multi_kv_functional_test+0x0000004ddc47)
      11:02:18 
      11:02:18   Mutex M199 acquired here while holding mutex M517 in main thread:
      11:02:18     #0 pthread_spin_lock <null> (multi_kv_functional_test+0x000000466ac0)
      11:02:18     #1 _fdb_kvs_any_handle_opened(_fdb_file_handle*, unsigned long) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/kv_instance.cc:94 (multi_kv_functional_test+0x000000532f4a)
      11:02:18     #2 _fdb_kvs_remove(_fdb_file_handle*, char const*, bool) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/kv_instance.cc:1980 (multi_kv_functional_test+0x000000531d63)
      11:02:18     #3 fdb_kvs_remove /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/kv_instance.cc:2267 (multi_kv_functional_test+0x000000532220)
      11:02:18     #4 multi_kv_test(unsigned char, unsigned long) crtstuff.c (multi_kv_functional_test+0x0000004c9836)
      11:02:18     #5 main crtstuff.c (multi_kv_functional_test+0x0000004ddc47)
      11:02:18 
      11:02:18   Mutex M517 previously acquired by the same thread here:
      11:02:18     #0 pthread_spin_lock <null> (multi_kv_functional_test+0x000000466ac0)
      11:02:18     #1 _fdb_kvs_remove(_fdb_file_handle*, char const*, bool) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/kv_instance.cc:1968 (multi_kv_functional_test+0x000000531b7b)
      11:02:18     #2 fdb_kvs_remove /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/kv_instance.cc:2267 (multi_kv_functional_test+0x000000532220)
      11:02:18     #3 multi_kv_test(unsigned char, unsigned long) crtstuff.c (multi_kv_functional_test+0x0000004c9836)
      11:02:18     #4 main crtstuff.c (multi_kv_functional_test+0x0000004ddc47)
      

      Attachments

        For Gerrit Dashboard: MB-19050
        # Subject Branch Project Status CR V

        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