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

Assertion `!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || thd->handler_tables_hash.records || thd->ull_hash.records || thd->global_read_lock.is_acquired()' failed.

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.2, 10.3, 10.4
    • 10.4
    • None

    Description

      Looks similar to MDEV-21994, but the crash is not due to backup lock and the versions affected are different (ref below)

      SET autocommit=FALSE;
      ALTER TABLE mysql.columns_priv ENGINE=InnoDB;
      FLUSH PRIVILEGES;
      

      Leads to:

      10.3.29 eb7c5530eccb7d6782077e5562f5a471d2ccbc01 (Debug)

      mysqld: /test/10.3_dbg/sql/sql_reload.cc:213: bool reload_acl_and_cache(THD*, long long unsigned int, TABLE_LIST*, int*): Assertion `!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || thd->handler_tables_hash.records || thd->ull_hash.records || thd->global_read_lock.is_acquired()' failed.
      

      10.3.29 eb7c5530eccb7d6782077e5562f5a471d2ccbc01 (Debug)

      Core was generated by `/test/MD160321-mariadb-10.3.29-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x152df40bd700 (LWP 4059893))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055e0b2960b86 in my_write_core (sig=sig@entry=6) at /test/10.3_dbg/mysys/stacktrace.c:386
      #2  0x000055e0b210bb91 in handle_fatal_signal (sig=6) at /test/10.3_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000152df7819859 in __GI_abort () at abort.c:79
      #6  0x0000152df7819729 in __assert_fail_base (fmt=0x152df79af588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e0b2a45e28 "!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || thd->handler_tables_hash.records || thd->ull_hash.records || thd->global_read_lock.is_acquired()", file=0x55e0b2a45e00 "/test/10.3_dbg/sql/sql_reload.cc", line=213, function=<optimized out>) at assert.c:92
      #7  0x0000152df782af36 in __GI___assert_fail (assertion=assertion@entry=0x55e0b2a45e28 "!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || thd->handler_tables_hash.records || thd->ull_hash.records || thd->global_read_lock.is_acquired()", file=file@entry=0x55e0b2a45e00 "/test/10.3_dbg/sql/sql_reload.cc", line=line@entry=213, function=function@entry=0x55e0b2a45db0 "bool reload_acl_and_cache(THD*, long long unsigned int, TABLE_LIST*, int*)") at assert.c:101
      #8  0x000055e0b1fe24bd in reload_acl_and_cache (thd=thd@entry=0x152d98000d90, options=1, tables=tables@entry=0x0, write_to_binlog=write_to_binlog@entry=0x152df40bae70) at /test/10.3_dbg/sql/sql_class.h:1989
      #9  0x000055e0b1e84f0c in mysql_execute_command (thd=thd@entry=0x152d98000d90) at /test/10.3_dbg/sql/sql_parse.cc:5421
      #10 0x000055e0b1e894c4 in mysql_parse (thd=thd@entry=0x152d98000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152df40bc540, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.3_dbg/sql/sql_parse.cc:7867
      #11 0x000055e0b1e8bc32 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152d98000d90, packet=packet@entry=0x152d980198f1 "FLUSH PRIVILEGES", packet_length=packet_length@entry=16, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.3_dbg/sql/sql_class.h:1139
      #12 0x000055e0b1e8eddf in do_command (thd=0x152d98000d90) at /test/10.3_dbg/sql/sql_parse.cc:1398
      #13 0x000055e0b1fb47db in do_handle_one_connection (connect=connect@entry=0x55e0b64a8cd0) at /test/10.3_dbg/sql/sql_connect.cc:1403
      #14 0x000055e0b1fb4a12 in handle_one_connection (arg=0x55e0b64a8cd0) at /test/10.3_dbg/sql/sql_connect.cc:1308
      #15 0x0000152df7d1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x0000152df7916293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.2.38 (Debug)

      mysqld: /test/10.2_dbg/sql/sql_reload.cc:220: bool reload_acl_and_cache(THD*, long long unsigned int, TABLE_LIST*, int*): Assertion `!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || thd->handler_tables_hash.records || thd->ull_hash.records || thd->global_read_lock.is_acquired()' failed.
      

      10.2.38 (Debug)

      Core was generated by `/test/MD160321-mariadb-10.2.38-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14bf98142700 (LWP 4035190))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055d94e7c7f9a in my_write_core (sig=sig@entry=6) at /test/10.2_dbg/mysys/stacktrace.c:382
      #2  0x000055d94e0ae043 in handle_fatal_signal (sig=6) at /test/10.2_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014bfb31ee859 in __GI_abort () at abort.c:79
      #6  0x000014bfb31ee729 in __assert_fail_base (fmt=0x14bfb3384588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55d94e89d120 "!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || thd->handler_tables_hash.records || thd->ull_hash.records || thd->global_read_lock.is_acquired()", file=0x55d94e89d0f8 "/test/10.2_dbg/sql/sql_reload.cc", line=220, function=<optimized out>) at assert.c:92
      #7  0x000014bfb31fff36 in __GI___assert_fail (assertion=assertion@entry=0x55d94e89d120 "!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || thd->handler_tables_hash.records || thd->ull_hash.records || thd->global_read_lock.is_acquired()", file=file@entry=0x55d94e89d0f8 "/test/10.2_dbg/sql/sql_reload.cc", line=line@entry=220, function=function@entry=0x55d94e89d0a8 "bool reload_acl_and_cache(THD*, long long unsigned int, TABLE_LIST*, int*)") at assert.c:101
      #8  0x000055d94dfe36f6 in reload_acl_and_cache (thd=thd@entry=0x14bf54000d90, options=1, tables=tables@entry=0x0, write_to_binlog=write_to_binlog@entry=0x14bf9813ffc0) at /test/10.2_dbg/sql/sql_plist.h:84
      #9  0x000055d94dead0ef in mysql_execute_command (thd=thd@entry=0x14bf54000d90) at /test/10.2_dbg/sql/sql_parse.cc:5202
      #10 0x000055d94deb0e33 in mysql_parse (thd=thd@entry=0x14bf54000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14bf98141550, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_parse.cc:7790
      #11 0x000055d94deb3933 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14bf54000d90, packet=packet@entry=0x14bf540195d1 "FLUSH PRIVILEGES", packet_length=packet_length@entry=16, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_class.h:1109
      #12 0x000055d94deb673c in do_command (thd=0x14bf54000d90) at /test/10.2_dbg/sql/sql_parse.cc:1381
      #13 0x000055d94dfb9bcc in do_handle_one_connection (connect=connect@entry=0x55d951b272e0) at /test/10.2_dbg/sql/sql_connect.cc:1336
      #14 0x000055d94dfb9df7 in handle_one_connection (arg=0x55d951b272e0) at /test/10.2_dbg/sql/sql_connect.cc:1241
      #15 0x000014bfb36f4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x000014bfb32eb293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.38 (dbg), 10.3.29 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (opt), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (dbg), 10.6.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              ramesh Ramesh Sivaraman
              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.