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

Semaphore wait has lasted > 600 seconds

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.5.7, 10.5.8
    • 10.2.37, 10.3.28, 10.4.18, 10.5.9
    • Server version: 10.5.8-MariaDB-1:10.5.8+maria~focal-log
      Mariadb server in docker. mariadb:latest
      Docker version 19.03.13, build 4484c46d9d
      Linux 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux

    Description

      I import a schema with all table definition and data to mariadb. File size of the file iz about 150GB. At some point, when importing a 70GB table I receive the following information in log and import is disconnected.

      2020-12-09 13:19:29 0 [Note] InnoDB: A semaphore wait:
      --Thread 139977950762752 has waited at btr0cur.cc line 1480 for 607.00 seconds the semaphore:
      SX-lock on RW-latch at 0x7f4b3b32c160 created in file dict0dict.cc line 2160
      a writer (thread id 139963135923968) has reserved it in mode  SX
      number of readers 0, waiters flag 1, lock_word: 10000000
      Last time write locked in file dict0stats.cc line 1969
      InnoDB: ###### Starts InnoDB Monitor for 30 secs to print diagnostic info:
      InnoDB: Pending reads 1, writes 0
      InnoDB: ###### Diagnostic info printed to the standard error stream
      2020-12-09 13:19:30 0 [Warning] InnoDB: A long semaphore wait:
      --Thread 139977950762752 has waited at btr0cur.cc line 1480 for 608.00 seconds the semaphore:
      SX-lock on RW-latch at 0x7f4b3b32c160 created in file dict0dict.cc line 2160
      a writer (thread id 139963135923968) has reserved it in mode  SX
      number of readers 0, waiters flag 1, lock_word: 10000000
      Last time write locked in file dict0stats.cc line 1969
      2020-12-09 13:19:30 0 [Note] InnoDB: A semaphore wait:
      --Thread 139977950762752 has waited at btr0cur.cc line 1480 for 608.00 seconds the semaphore:
      SX-lock on RW-latch at 0x7f4b3b32c160 created in file dict0dict.cc line 2160
      a writer (thread id 139963135923968) has reserved it in mode  SX
      number of readers 0, waiters flag 1, lock_word: 10000000
      Last time write locked in file dict0stats.cc line 1969
      InnoDB: ###### Starts InnoDB Monitor for 30 secs to print diagnostic info:
      InnoDB: Pending reads 1, writes 0
      InnoDB: ###### Diagnostic info printed to the standard error stream
      2020-12-09 13:19:31 0 [Warning] InnoDB: A long semaphore wait:
      --Thread 139977950762752 has waited at btr0cur.cc line 1480 for 609.00 seconds the semaphore:
      SX-lock on RW-latch at 0x7f4b3b32c160 created in file dict0dict.cc line 2160
      a writer (thread id 139963135923968) has reserved it in mode  SX
      number of readers 0, waiters flag 1, lock_word: 10000000
      Last time write locked in file dict0stats.cc line 1969
      2020-12-09 13:19:31 0 [Note] InnoDB: A semaphore wait:
      --Thread 139977950762752 has waited at btr0cur.cc line 1480 for 609.00 seconds the semaphore:
      SX-lock on RW-latch at 0x7f4b3b32c160 created in file dict0dict.cc line 2160
      a writer (thread id 139963135923968) has reserved it in mode  SX
      number of readers 0, waiters flag 1, lock_word: 10000000
      Last time write locked in file dict0stats.cc line 1969
      InnoDB: ###### Starts InnoDB Monitor for 30 secs to print diagnostic info:
      InnoDB: Pending reads 1, writes 0
      InnoDB: ###### Diagnostic info printed to the standard error stream
      2020-12-09 13:19:32 0 [Warning] InnoDB: A long semaphore wait:
      --Thread 139977950762752 has waited at btr0cur.cc line 1480 for 610.00 seconds the semaphore:
      SX-lock on RW-latch at 0x7f4b3b32c160 created in file dict0dict.cc line 2160
      a writer (thread id 139963135923968) has reserved it in mode  SX
      number of readers 0, waiters flag 1, lock_word: 10000000
      Last time write locked in file dict0stats.cc line 1969
      2020-12-09 13:19:32 0 [Note] InnoDB: A semaphore wait:
      --Thread 139977950762752 has waited at btr0cur.cc line 1480 for 610.00 seconds the semaphore:
      SX-lock on RW-latch at 0x7f4b3b32c160 created in file dict0dict.cc line 2160
      a writer (thread id 139963135923968) has reserved it in mode  SX
      number of readers 0, waiters flag 1, lock_word: 10000000
      Last time write locked in file dict0stats.cc line 1969
      InnoDB: ###### Starts InnoDB Monitor for 30 secs to print diagnostic info:
      InnoDB: Pending reads 0, writes 0
      InnoDB: ###### Diagnostic info printed to the standard error stream
      2020-12-09 13:19:33 0 [Warning] InnoDB: A long semaphore wait:
      --Thread 139977950762752 has waited at btr0cur.cc line 1480 for 611.00 seconds the semaphore:
      SX-lock on RW-latch at 0x7f4b3b32c160 created in file dict0dict.cc line 2160
      a writer (thread id 139963135923968) has reserved it in mode  SX
      number of readers 0, waiters flag 1, lock_word: 10000000
      Last time write locked in file dict0stats.cc line 1969
      2020-12-09 13:19:33 0 [Note] InnoDB: A semaphore wait:
      --Thread 139977950762752 has waited at btr0cur.cc line 1480 for 611.00 seconds the semaphore:
      SX-lock on RW-latch at 0x7f4b3b32c160 created in file dict0dict.cc line 2160
      a writer (thread id 139963135923968) has reserved it in mode  SX
      number of readers 0, waiters flag 1, lock_word: 10000000
      Last time write locked in file dict0stats.cc line 1969
      InnoDB: ###### Starts InnoDB Monitor for 30 secs to print diagnostic info:
      InnoDB: Pending reads 1, writes 0
      InnoDB: ###### Diagnostic info printed to the standard error stream
      2020-12-09 13:19:33 0 [ERROR] [FATAL] InnoDB: Semaphore wait has lasted > 600 seconds. We intentionally crash the server because it appears to be hung.
      201209 13:19:33 [ERROR] mysqld got signal 6 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed,
      something is definitely wrong and this may fail.
       
      Server version: 10.5.8-MariaDB-1:10.5.8+maria~focal-log
      key_buffer_size=2147483648
      read_buffer_size=20971520
      max_used_connections=6
      max_threads=1002
      thread_count=5
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 547980111 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x0 thread_stack 0x49000
      mysqld(my_print_stacktrace+0x32)[0x55ea24b5c692]
      mysqld(handle_fatal_signal+0x485)[0x55ea245b3e45]
      

      The mariadb server continues working, but importing is stopped.

      Attachments

        Issue Links

          Activity

            mastertheknife Kfir Itzhak added a comment - - edited

            @Mario Hubert
            And all others

            This seems to be related to MDEV-24275
            According to this, it was fixed in in 10.2.37, 10.3.28, 10.4.18 and 10.5.9.
            I haven't tested if it solves the issue for me yet, but i feel confident its this one.

            mastertheknife Kfir Itzhak added a comment - - edited @Mario Hubert And all others This seems to be related to MDEV-24275 According to this, it was fixed in in 10.2.37, 10.3.28, 10.4.18 and 10.5.9. I haven't tested if it solves the issue for me yet, but i feel confident its this one.

            mastertheknife, there were two regressions in the previous releases that could explain this. MDEV-24188 was an infinite loop (hang of some threads until the server is killed), while MDEV-24275 is a recoverable slowdown (statistics collection is being executed for too many iterations). Both bugs are fixed in the latest releases.

            marko Marko Mäkelä added a comment - mastertheknife , there were two regressions in the previous releases that could explain this. MDEV-24188 was an infinite loop (hang of some threads until the server is killed), while MDEV-24275 is a recoverable slowdown (statistics collection is being executed for too many iterations). Both bugs are fixed in the latest releases.
            vbvbrj vbvbrj added a comment -

            Thank you for inputs. Docker repository have version 10.5.9. While because of no space left on master database on the disk, the slave could not be synchronized as binlog files on master became incomplete. I will start from scratch to replicate to the slave and test the import.

            vbvbrj vbvbrj added a comment - Thank you for inputs. Docker repository have version 10.5.9. While because of no space left on master database on the disk, the slave could not be synchronized as binlog files on master became incomplete. I will start from scratch to replicate to the slave and test the import.

            mastertheknife, vbvbrj, pvguzman, does 10.5.9 work for you?

            marko Marko Mäkelä added a comment - mastertheknife , vbvbrj , pvguzman , does 10.5.9 work for you?
            Bunjil Bunjil added a comment -

            Marko Mäkelä, I was trying to restore a dump (which has 1 TB table) and it couldn't restore it even upto %10 of table. It seems that 10.5.9 fixed the issue. Now it's %15 and still working without any errors or slowness.

            Bunjil Bunjil added a comment - Marko Mäkelä, I was trying to restore a dump (which has 1 TB table) and it couldn't restore it even upto %10 of table. It seems that 10.5.9 fixed the issue. Now it's %15 and still working without any errors or slowness.

            People

              marko Marko Mäkelä
              vbvbrj vbvbrj
              Votes:
              10 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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