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

Deadlock when concurrent innodb_encryption_threads are in progress

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Deadlock when concurrent innodb_encryption_threads are in progress on release build

      origin/10.11 080d92a6217a757300b629360cacf625f3c7ea60

      # 2025-12-05T06:21:05 [771015] Thread 4 (Thread 0x7f02bc8d36c0 (LWP 773480)):
      # 2025-12-05T06:21:05 [771015] #0  0x00007f02be898d61 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x601f3b66320c <fil_crypt_cond+44>) at ./nptl/futex-internal.c:57
      # 2025-12-05T06:21:05 [771015] #1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x601f3b66320c <fil_crypt_cond+44>) at ./nptl/futex-internal.c:87
      # 2025-12-05T06:21:05 [771015] #2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x601f3b66320c <fil_crypt_cond+44>, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
      # 2025-12-05T06:21:05 [771015] #3  0x00007f02be89b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x601f3b663120 <fil_crypt_threads_mutex>, cond=0x601f3b6631e0 <fil_crypt_cond>) at ./nptl/pthread_cond_wait.c:503
      # 2025-12-05T06:21:05 [771015] #4  ___pthread_cond_wait (cond=0x601f3b6631e0 <fil_crypt_cond>, mutex=0x601f3b663120 <fil_crypt_threads_mutex>) at ./nptl/pthread_cond_wait.c:627
      # 2025-12-05T06:21:05 [771015] #5  0x0000601f3a2940b3 in fil_crypt_set_thread_cnt (new_cnt=<optimized out>) at /data/Server/10.11G/storage/innobase/fil/fil0crypt.cc:2140
      # 2025-12-05T06:21:05 [771015] #6  0x0000601f3a14a994 in innodb_encryption_threads_update (save=0x7f0248010c68) at /data/Server/10.11G/storage/innobase/handler/ha_innodb.cc:18679
      # 2025-12-05T06:21:05 [771015] #7  0x0000601f39cf36d6 in sys_var_pluginvar::global_update (this=0x601f3baa64c8, thd=0x7f0248000c68, var=0x7f0248010c48) at /data/Server/10.11G/sql/sql_plugin.cc:3694
      # 2025-12-05T06:21:05 [771015] #8  0x0000601f39c1d0bd in sys_var::update (this=0x601f3baa64c8, thd=0x7f0248000c68, var=0x7f0248010c48) at /data/Server/10.11G/sql/set_var.cc:209
      # 2025-12-05T06:21:05 [771015] #9  0x0000601f39c1d5bb in set_var::update (this=<optimized out>, thd=<optimized out>) at /data/Server/10.11G/sql/set_var.cc:868
      # 2025-12-05T06:21:05 [771015] #10 0x0000601f39c1e6a9 in sql_set_variables (thd=thd@entry=0x7f0248000c68, var_list=var_list@entry=0x7f0248005d10, free=free@entry=true) at /data/Server/10.11G/sql/set_var.cc:749
      # 2025-12-05T06:21:05 [771015] #11 0x0000601f39cdaf18 in mysql_execute_command (thd=thd@entry=0x7f0248000c68, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/10.11G/sql/sql_parse.cc:5192
      # 2025-12-05T06:21:05 [771015] #12 0x0000601f39cdd2f3 in mysql_parse (thd=0x7f0248000c68, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /data/Server/10.11G/sql/sql_parse.cc:8229
      # 2025-12-05T06:21:05 [771015] #13 0x0000601f39cdf082 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f0248000c68, packet=packet@entry=0x7f02480084f9 "SET GLOBAL innodb_encryption_threads = 1 /* E_R Thread2 QNO 6176 CON_ID 32 */ ", packet_length=packet_length@entry=78, blocking=blocking@entry=true) at /data/Server/10.11G/sql/sql_parse.cc:2020
      # 2025-12-05T06:21:05 [771015] #14 0x0000601f39ce0ce5 in do_command (thd=thd@entry=0x7f0248000c68, blocking=blocking@entry=true) at /data/Server/10.11G/sql/sql_parse.cc:1434
      # 2025-12-05T06:21:05 [771015] #15 0x0000601f39df2c0d in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /data/Server/10.11G/sql/sql_connect.cc:1475
      # 2025-12-05T06:21:05 [771015] #16 0x0000601f39df2efd in handle_one_connection (arg=0x601f3bdc6b18) at /data/Server/10.11G/sql/sql_connect.cc:1387
      # 2025-12-05T06:21:05 [771015] #17 0x00007f02be89ca94 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      # 2025-12-05T06:21:05 [771015] #18 0x00007f02be929c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Core dump is present on SDP:
      /data/results/1764921999/MB-Deadlock-2350

      Attachments

        Activity

          People

            saahil Saahil Alam
            saahil Saahil Alam
            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.