Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21596

Draft: InnoDB reports DEADLOCK of threads detected!

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      thread2:
          SELECT `k` FROM oltp3 WHERE `id` BETWEEN _smallint_unsigned AND _smallint_unsigned ;
      thread2_connect:
          ;
      thread2_init:
          ;
      thread1:
          UPDATE IGNORE oltp3 SET `k` = `k` + 1 WHERE `id` = _smallint_unsigned |
          UPDATE IGNORE oltp3 SET `k` = `k` + 1 WHERE `id` = _smallint_unsigned |
          FLUSH TABLE oltp3 FOR EXPORT |
          LOCK TABLE t9 WRITE ;
      thread1_connect:
          ;
      thread1_init:
          ;
       
      Only two sessions are required.
      The table oltp3 exists (id is PK, k is indexed) and contains 1000 rows.
      The table t9 does not exist at all.
       
      After around 60 - 90 seconds the DB server aborts with
      # 2020-01-29T14:25:19 [124160] | DEADLOCK of threads detected!
      # 2020-01-29T14:25:19 [124160] | rw-lock 0x7f89c005b090 --Thread 140230162839296 has waited at row0sel.cc line 3511 for 0.00 seconds the semaphore:
      # 2020-01-29T14:25:19 [124160] | X-lock on RW-latch at 0x7f89c005b090 created in file buf0buf.cc line 1534
      # 2020-01-29T14:25:19 [124160] | a writer (thread id 140229155460864) has reserved it in mode  exclusive
      # 2020-01-29T14:25:19 [124160] | number of readers 0, waiters flag 1, lock_word: 0
      # 2020-01-29T14:25:19 [124160] | Last time write locked in file row0row.cc line 1300
      # 2020-01-29T14:25:19 [124160] | Locked: thread 140229155460864 file row0row.cc line 1300  X-LOCK
      # 2020-01-29T14:25:19 [124160] | Locked: thread 140229155460864 file row0row.cc line 1300  X-LOCK
      # 2020-01-29T14:25:19 [124160] | rw-lock 0x7f8978079418 --Thread 140230163142400 has waited at row0quiesce.cc line 675 for 0.00 seconds the semaphore:
      # 2020-01-29T14:25:19 [124160] | X-lock (wait_ex) on RW-latch at 0x7f8978079418 created in file dict0dict.cc line 2072
      # 2020-01-29T14:25:19 [124160] | a writer (thread id 140230163142400) has reserved it in mode  wait exclusive
      # 2020-01-29T14:25:19 [124160] | number of readers 1, waiters flag 0, lock_word: ffffffff
      # 2020-01-29T14:25:19 [124160] | Last time write locked in file btr0cur.cc line 1474
      # 2020-01-29T14:25:19 [124160] | Locked: thread 140230162839296 file btr0cur.cc line 1506  S-LOCK
      # 2020-01-29T14:25:19 [124160] | Locked: thread 140230162839296 file btr0cur.cc line 1506  S-LOCK
      # 2020-01-29T14:25:19 [124160] | rw-lock 0x7f8978089578 --Thread 140229155460864 has waited at btr0cur.cc line 1506 for 0.00 seconds the semaphore:
      # 2020-01-29T14:25:19 [124160] | S-lock on RW-latch at 0x7f8978089578 created in file dict0dict.cc line 2072
      # 2020-01-29T14:25:19 [124160] | a writer (thread id 140230163142400) has reserved it in mode  exclusive
      # 2020-01-29T14:25:19 [124160] | number of readers 0, waiters flag 1, lock_word: 0
      # 2020-01-29T14:25:19 [124160] | Last time write locked in file row0quiesce.cc line 675
      # 2020-01-29T14:25:19 [124160] | Locked: thread 140230163142400 file row0quiesce.cc line 675  X-LOCK
      # 2020-01-29T14:25:19 [124160] | 2020-01-29 14:24:51 0 [ERROR] [FATAL] InnoDB: ######################################## Deadlock Detected!
      # 2020-01-29T14:25:19 [124160] | 200129 14:24:51 [ERROR] mysqld got signal 6 ;
       
      Replay on actual 10.5 (2020-01-27) compiles with debug.
      No replay or other issue on actual 10.4. or 10.5 compiled without debug.
      

      Attachments

        Issue Links

          Activity

            People

              mleich Matthias Leich
              mleich Matthias Leich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.