Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-349

Potential deadlock when closing an LSM tree

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT1.6.6
    • Labels:

      Description

      If a merge is in progress when __lsm_drop is called, there will be a deadlock on the schema lock.

      Example stack traces:
      Thread 3 (process 27910):
      #0 0x00007fff90d2b122 in __psynch_mutexwait ()
      WT-1 0x00007fff8ebb8d9d in pthread_mutex_lock ()
      WT-2 0x0000000101087d3c in __wt_spin_lock (session=0x100956e60, t=0x100931b38) at mutex.i:91
      WT-3 0x0000000101088870 in __session_create (wt_session=0x100956e60, uri=0x1015d1430 "file:test_lsm01-000010.bf", config=0x1015d2340 ",key_format=r,value_format=1t,exclusive=true") at session_api.c:256
      WT-4 0x000000010100d51e in __wt_bloom_finalize (bloom=0x1015d2300) at bloom.c:174
      WT-5 0x000000010106a1ce in __wt_lsm_merge (session=0x100956e60, lsm_tree=0x101703160) at lsm_merge.c:202
      WT-6 0x000000010106d9b1 in __wt_lsm_worker (arg=0x101703160) at lsm_worker.c:34
      WT-7 0x00007fff8ebb3742 in _pthread_start ()
      WT-8 0x00007fff8eba0181 in thread_start ()

      Thread 1 (process 27910):
      #0 0x00007fff90d2b386 in __semwait_signal ()
      WT-1 0x00007fff8ec3dcbd in pthread_join ()
      WT-2 0x0000000101075025 in __wt_thread_join (tid=0x102181000) at os_thread.c:28
      WT-3 0x000000010106ba52 in __lsm_tree_close (session=0x100956c40, lsm_tree=0x101703160) at lsm_tree.c:65
      WT-4 0x000000010106cffd in __wt_lsm_tree_drop (session=0x100956c40, name=0x101197efc "lsm:test_lsm01", cfg=0x7fff5fbfdb50) at lsm_tree.c:442
      WT-5 0x0000000101068ea7 in __lsm_drop (dsrc=0x101701020, wt_session=0x100956c40, uri=0x101197efc "lsm:test_lsm01", cfg=0x7fff5fbfdb50) at lsm_dsrc.c:39
      WT-6 0x000000010107c445 in __wt_schema_drop (session=0x100956c40, uri=0x101197efc "lsm:test_lsm01", cfg=0x7fff5fbfdb50) at schema_drop.c:260
      WT-7 0x0000000101088c3a in __session_drop (wt_session=0x100956c40, uri=0x101197efc "lsm:test_lsm01", config=0x0) at session_api.c:295
      WT-8 0x00000001004e43b9 in _wrap_Session_drop (self=<value temporarily unavailable, due to optimizations>, args=<value temporarily unavailable, due to optimizations>) at ../../../lang/python/wiredtiger_wrap.c:4341

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alexander.gorrod Alexander Gorrod
                Reporter:
                alexander.gorrod Alexander Gorrod
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: