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

Assertion `!commit_lsn' failed in DROP DATABASE

    XMLWordPrintable

Details

    • Not for Release Notes
    • Hide
      After a DROP DATABASE operation that collected some garbage that was missed by calls to ha_innobase::delete_table(), a read-only transaction could unnecessarily wait for a redo log flush. (That is, there is a potential negligible performance drop in a read-only operation after executing an I/O intensive DDL operation.)
      Show
      After a DROP DATABASE operation that collected some garbage that was missed by calls to ha_innobase::delete_table(), a read-only transaction could unnecessarily wait for a redo log flush. (That is, there is a potential negligible performance drop in a read-only operation after executing an I/O intensive DDL operation.)

    Description

      --source include/have_innodb.inc
       
      SET max_session_mem_used=8192;
      --ERROR ER_SQL_DISCOVER_ERROR
      CREATE TABLE t (a INT,b VECTOR (5) NOT NULL,VECTOR INDEX (b) ) ENGINE=INNODB;
      SET GLOBAL innodb_flush_log_at_trx_commit=0;
      DROP DATABASE test;
      

      Leads to:

      CS 12.2.2 d26a6f44c1f2119377e79a9540886c6d8c01472f (Debug, Clang 18.1.3-11) Build 11/02/2026

      mariadbd: /test/12.2_dbg/storage/innobase/trx/trx0trx.cc:394: void trx_t::free(): Assertion `!commit_lsn' failed.
      

      CS 12.2.2 d26a6f44c1f2119377e79a9540886c6d8c01472f (Debug, Clang 18.1.3-11) Build 11/02/2026

      Core was generated by `/test/MD110226-mariadb-12.2.2-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 1631959)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x00007ff74444527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00007ff7444288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00007ff74442881b in __assert_fail_base (fmt=0x7ff7445d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x57902490f259 "!commit_lsn", file=file@entry=0x57902490f0ad "/test/12.2_dbg/storage/innobase/trx/trx0trx.cc", line=line@entry=394, function=function@entry=0x57902490f1dd "void trx_t::free()")at ./assert/assert.c:96
      #6  0x00007ff74443b517 in __assert_fail (assertion=0x57902490f259 "!commit_lsn", file=0x57902490f0ad "/test/12.2_dbg/storage/innobase/trx/trx0trx.cc", line=394, function=0x57902490f1dd "void trx_t::free()")at ./assert/assert.c:105
      #7  0x00005790241b769b in trx_t::free (this=0x7ff73b339680)at /test/12.2_dbg/storage/innobase/trx/trx0trx.cc:394
      #8  0x0000579023f11d33 in innodb_drop_database (path=0x7ff73830bfc0 "./test/")at /test/12.2_dbg/storage/innobase/handler/ha_innodb.cc:1534
      #9  0x0000579023ac2c68 in dropdb_handlerton (plugin=0x7fd860019a88, path=0x7ff73830bfc0) at /test/12.2_dbg/sql/handler.cc:907
      #10 0x00005790236baaeb in plugin_foreach_with_mask (thd=0x0, func=0x579023ac2c20 <dropdb_handlerton(THD*, st_plugin_int**, void*)>, type=1, state_mask=8, arg=0x7ff73830bfc0)at /test/12.2_dbg/sql/sql_plugin.cc:2559
      #11 0x0000579023ac2c1a in ha_drop_database (path=0x7ff73830bfc0 "./test/")at /test/12.2_dbg/sql/handler.cc:914
      #12 0x0000579023601333 in drop_database_objects (thd=0x7fd860000d58, path=0x7ff73830bae8, db=0x7ff73830bb10, rm_mysql_schema=false)at /test/12.2_dbg/sql/sql_db.cc:1010
      #13 0x0000579023601a22 in mysql_rm_db_internal (thd=0x7fd860000d58, db=@0x7ff73830cb40: {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x7ff73830cf78 "test", length = 4}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, if_exists=false, silent=false) at /test/12.2_dbg/sql/sql_db.cc:1151
      #14 0x0000579023601434 in mysql_rm_db (thd=0x7fd860000d58, db=@0x7ff73830cb40: {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x7ff73830cf78 "test", length = 4}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, if_exists=false) at /test/12.2_dbg/sql/sql_db.cc:1327
      #15 0x000057902368a51e in mysql_execute_command (thd=0x7fd860000d58, is_called_from_prepared_stmt=false) at /test/12.2_dbg/sql/sql_parse.cc:5107
      #16 0x000057902367d564 in mysql_parse (thd=0x7fd860000d58, rawbuf=0x7fd860019ea0 "DROP DATABASE test", length=18, parser_state=0x7ff73830da00) at /test/12.2_dbg/sql/sql_parse.cc:7925
      #17 0x000057902367a91d in dispatch_command (command=COM_QUERY, thd=0x7fd860000d58, packet=0x7fd86000b249 "DROP DATABASE test", packet_length=18, blocking=true) at /test/12.2_dbg/sql/sql_parse.cc:1896
      #18 0x000057902367e113 in do_command (thd=0x7fd860000d58, blocking=true)at /test/12.2_dbg/sql/sql_parse.cc:1432
      #19 0x000057902386d329 in do_handle_one_connection (connect=0x579064a093b8, put_in_cache=true) at /test/12.2_dbg/sql/sql_connect.cc:1503
      #20 0x000057902386d0ce in handle_one_connection (arg=0x5790649648f8)at /test/12.2_dbg/sql/sql_connect.cc:1415
      #21 0x00007ff74449caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #22 0x00007ff744529c6c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.6   dbg  110226  1758b2578a8cc7e193bb35de0d8dc9a5e517c89c  MARIADBD_ERROR|mariadbd: Incorrect information in frm file
      CS  10.6   opt  110226  1758b2578a8cc7e193bb35de0d8dc9a5e517c89c  MARIADBD_ERROR|mariadbd: Incorrect information in frm file
      CS  10.11  dbg  110226  67fceadfa45b3f14921114544734455ecbdd480e  MARIADBD_ERROR|mariadbd: Incorrect information in frm file
      CS  10.11  opt  110226  67fceadfa45b3f14921114544734455ecbdd480e  MARIADBD_ERROR|mariadbd: Incorrect information in frm file
      CS  11.4   dbg  110226  78201a41b5e88b94c27f5ecc16c9e5486e2e50c3  MARIADBD_ERROR|mariadbd: Incorrect information in frm file
      CS  11.4   opt  110226  78201a41b5e88b94c27f5ecc16c9e5486e2e50c3  MARIADBD_ERROR|mariadbd: Incorrect information in frm file
      CS  11.8   dbg  110226  65ee9a7b4694d1b6f366b5a7a3d1b0549e5a3671  !commit_lsn|SIGABRT|trx_t::free|innodb_drop_database|dropdb_handlerton|plugin_foreach_with_mask
      CS  11.8   opt  110226  65ee9a7b4694d1b6f366b5a7a3d1b0549e5a3671  MARIADBD_ERROR|mariadbd: Incorrect information in frm file
      CS  12.2   dbg  110226  d26a6f44c1f2119377e79a9540886c6d8c01472f  !commit_lsn|SIGABRT|trx_t::free|innodb_drop_database|dropdb_handlerton|plugin_foreach_with_mask
      CS  12.2   opt  110226  d26a6f44c1f2119377e79a9540886c6d8c01472f  MARIADBD_ERROR|mariadbd: Incorrect information in frm file
      CS  12.3   dbg  110226  21a0714a118614982d20bfa504763d7247800091  !commit_lsn|SIGABRT|trx_t::free|innodb_drop_database|dropdb_handlerton|plugin_foreach_with_mask
      CS  12.3   opt  110226  21a0714a118614982d20bfa504763d7247800091  MARIADBD_ERROR|mariadbd: Incorrect information in frm file
      ES  10.5   dbg  040825  70586522eacf09d04d49962072e14325a75d8155  No bug found                  
      ES  10.5   opt  040825  70586522eacf09d04d49962072e14325a75d8155  No bug found                  
      ES  10.6   dbg  040825  9b794f34b48fb7eee490b6da44edc0f33a947447  No bug found                  
      ES  10.6   opt  040825  9b794f34b48fb7eee490b6da44edc0f33a947447  No bug found                  
      ES  11.4   dbg  040825  a1c03ccd54b582e75506687ee19b273ca897f261  No bug found                  
      ES  11.4   opt  040825  a1c03ccd54b582e75506687ee19b273ca897f261  No bug found                  
      ES  11.8   dbg  151025  780565c207e9ce0ebf7d8e3d59f223801447b619  No bug found                  
      ES  11.8   opt  151025  780565c207e9ce0ebf7d8e3d59f223801447b619  No bug found                  
      

      The assertion is happening after this merge commit

      commit 9bfea48ce1214cc4470f6f6f8a4e30352cef84e7 (HEAD, tag: mariadb-11.8.6, origin/bb-11.8-release)
      Merge: 9749d71f952 054a893f164
      Author: Sergei Golubchik <serg@mariadb.org>
      Date:   Sat Jan 31 14:08:54 2026 +0100
       
          Merge branch '11.4' into 11.8
      

      Since this is a merge commit, could not determine which commit caused this issue

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              ramesh Ramesh Sivaraman
              Thirunarayanan Balathandayuthapani Thirunarayanan Balathandayuthapani
              Marko Mäkelä Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.