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

Assertion `srv_undo_sources || <....> && srv_fast_shutdown)' failed in trx_purge_add_undo_to_history upon shutdown

Details

    Description

      Note: I've set it to 10.3 because that's where most tests run, and where I am thus getting it regularly; but it might well be that 10.2 is also affected. Since I don't have anything marginally reproducible so far, I cannot make sure.

      10.3 0b597d3ab2494bc1db97cc4a30d697a5fdf48c21

      2018-01-09 18:24:07 0 [Note] /home/elenst/git/10.3/sql/mysqld (rqg[rqg] @ localhost [127.0.0.1]): Normal shutdown
      2018-01-09 18:24:07 0 [Note] Event Scheduler: Purging the queue. 0 events
      2018-01-09 18:24:09 0 [Note] InnoDB: FTS optimize thread exiting.
      mysqld: /home/elenst/git/10.3/storage/innobase/trx/trx0purge.cc:301: void trx_purge_add_undo_to_history(const trx_t*, trx_undo_t*&, mtr_t*): Assertion `srv_undo_sources || ((srv_startup_is_before_trx_rollback_phase || trx_ro
      llback_or_clean_is_active) && purge_sys->state == PURGE_STATE_INIT) || (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND && purge_sys->state == PURGE_STATE_DISABLED) || ((trx->undo_no == 0 || trx->in_mysql_trx_list || trx->pers
      istent_stats) && srv_fast_shutdown)' failed.
      180109 18:24:09 [ERROR] mysqld got signal 6 ;
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f9c80013828): ALTER TABLE t1 ADD COLUMN extra INT /* QNO 11451 CON_ID 20 */
      Connection ID (thread ID): 20
      Status: KILL_SERVER
      

      7  0x00007f9d0f85cc82 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055fd5f1bdeb8 in trx_purge_add_undo_to_history (trx=0x7f9d0d4d3888, undo=@0x7f9d0d4d3bb8: 0x7f9c9c5da140, mtr=0x7f9cf00afa80) at /home/elenst/git/10.3/storage/innobase/trx/trx0purge.cc:301
      #9  0x000055fd5f1e6cd7 in trx_write_serialisation_history (trx=0x7f9d0d4d3888, mtr=0x7f9cf00afa80) at /home/elenst/git/10.3/storage/innobase/trx/trx0trx.cc:1444
      #10 0x000055fd5f1e89bd in trx_commit_low (trx=0x7f9d0d4d3888, mtr=0x7f9cf00afa80) at /home/elenst/git/10.3/storage/innobase/trx/trx0trx.cc:1922
      #11 0x000055fd5f1e8b51 in trx_commit (trx=0x7f9d0d4d3888) at /home/elenst/git/10.3/storage/innobase/trx/trx0trx.cc:1992
      #12 0x000055fd5f1e9578 in trx_commit_for_mysql (trx=0x7f9d0d4d3888) at /home/elenst/git/10.3/storage/innobase/trx/trx0trx.cc:2208
      #13 0x000055fd5f35e188 in fts_sql_commit (trx=0x7f9d0d4d3888) at /home/elenst/git/10.3/storage/innobase/fts/fts0sql.cc:297
      #14 0x000055fd5f348de7 in fts_load_stopword (table=0x7f9c800bb868, trx=0x7f9d0d4d3888, global_stopword_table=0x0, session_stopword_table=0x0, stopword_is_on=1, reload=0) at /home/elenst/git/10.3/storage/innobase/fts/fts0fts.cc:7269
      #15 0x000055fd5efbd95f in innobase_fts_load_stopword (table=0x7f9c800bb868, trx=0x0, thd=0x7f9c80000b00) at /home/elenst/git/10.3/storage/innobase/handler/ha_innodb.cc:12164
      #16 0x000055fd5efbf757 in create_table_info_t::create_table_update_dict (this=0x7f9cf00b04a0) at /home/elenst/git/10.3/storage/innobase/handler/ha_innodb.cc:12997
      #17 0x000055fd5efbfca9 in ha_innobase::create (this=0x7f9c801047e8, name=0x7f9cf00b326c "./test/#sql-1d11_14", form=0x7f9cf00b09c0, create_info=0x7f9cf00b35d0) at /home/elenst/git/10.3/storage/innobase/handler/ha_innodb.cc:13118
      #18 0x000055fd5ed911b2 in handler::ha_create (this=0x7f9c801047e8, name=0x7f9cf00b326c "./test/#sql-1d11_14", form=0x7f9cf00b09c0, info_arg=0x7f9cf00b35d0) at /home/elenst/git/10.3/sql/handler.cc:4522
      #19 0x000055fd5ed921e9 in ha_create_table (thd=0x7f9c80000b00, path=0x7f9cf00b326c "./test/#sql-1d11_14", db=0x7f9c80013f60 "test", table_name=0x7f9cf00b2a00 "#sql-1d11_14", create_info=0x7f9cf00b35d0, frm=0x7f9cf00b1d60) at /home/elenst/git/10.3/sql/handler.cc:4893
      #20 0x000055fd5eb8d94e in mysql_alter_table (thd=0x7f9c80000b00, new_db=0x7f9c80013f60 "test", new_name=0x0, create_info=0x7f9cf00b35d0, table_list=0x7f9c80013950, alter_info=0x7f9cf00b3520, order_num=0, order=0x0, ignore=false) at /home/elenst/git/10.3/sql/sql_table.cc:9450
      #21 0x000055fd5ec0dd4e in Sql_cmd_alter_table::execute (this=0x7f9c80014078, thd=0x7f9c80000b00) at /home/elenst/git/10.3/sql/sql_alter.cc:331
      #22 0x000055fd5eabf092 in mysql_execute_command (thd=0x7f9c80000b00) at /home/elenst/git/10.3/sql/sql_parse.cc:6252
      #23 0x000055fd5eac3d28 in mysql_parse (thd=0x7f9c80000b00, rawbuf=0x7f9c80013828 "ALTER TABLE t1 ADD COLUMN extra INT /* QNO 11451 CON_ID 20 */", length=61, parser_state=0x7f9cf00b4660, is_com_multi=false, is_next_command=false) at /home/elenst/git/10.3/sql/sql_parse.cc:7968
      #24 0x000055fd5eab13cd in dispatch_command (command=COM_QUERY, thd=0x7f9c80000b00, packet=0x7f9c8000b061 "ALTER TABLE t1 ADD COLUMN extra INT /* QNO 11451 CON_ID 20 */ ", packet_length=62, is_com_multi=false, is_next_command=false) at /home/elenst/git/10.3/sql/sql_parse.cc:1825
      #25 0x000055fd5eaafdfa in do_command (thd=0x7f9c80000b00) at /home/elenst/git/10.3/sql/sql_parse.cc:1369
      #26 0x000055fd5ec088bf in do_handle_one_connection (connect=0x55fd62635c70) at /home/elenst/git/10.3/sql/sql_connect.cc:1401
      #27 0x000055fd5ec0863f in handle_one_connection (arg=0x55fd62635c70) at /home/elenst/git/10.3/sql/sql_connect.cc:1307
      #28 0x00007f9d104a06ba in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      #29 0x00007f9d0f93582d in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Issue Links

          Activity

            I think that this can affect 10.2 just as well. There, the function is named trx_purge_add_update_undo_to_history() and only invoked at the commit of transactions that generated certain types of persistent undo log records. In 10.3, the function trx_purge_add_undo_to_history() is invoked for any persistent undo log.

            The solution is to register as internal the numerous background transactions that are created for FULLTEXT INDEX maintenance.

            marko Marko Mäkelä added a comment - I think that this can affect 10.2 just as well. There, the function is named trx_purge_add_update_undo_to_history() and only invoked at the commit of transactions that generated certain types of persistent undo log records. In 10.3, the function trx_purge_add_undo_to_history() is invoked for any persistent undo log. The solution is to register as internal the numerous background transactions that are created for FULLTEXT INDEX maintenance.

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.