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

Assertion `!srv_read_only_mode' failed when using innodb-read-only=1 as a startup option

    XMLWordPrintable

Details

    Description

      # mysqld options required for replay:  --innodb-read-only=1
      

      Leads to:

      10.7.0 05e29e177df243b700392b797e26cae43fd3181e (Debug)

      mysqld: /test/10.7_dbg/storage/innobase/trx/trx0trx.cc:956: void trx_start_low(trx_t*, bool): Assertion `!srv_read_only_mode' failed.
      

      10.7.0 05e29e177df243b700392b797e26cae43fd3181e (Debug)

      Core was generated by `/test/MD280821-mariadb-10.7.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --lc-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x1468cee33800 (LWP 3431934))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x00001468cefef859 in __GI_abort () at abort.c:79
      #2  0x00001468cefef729 in __assert_fail_base (fmt=0x1468cf185588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5573935d06f8 "! is_set() || m_can_overwrite_status", file=0x5573935d0468 "/test/10.7_dbg/sql/sql_error.cc", line=456, function=<optimized out>) at assert.c:92
      #3  0x00001468cf000f36 in __GI___assert_fail (assertion=assertion@entry=0x5573935d06f8 "! is_set() || m_can_overwrite_status", file=file@entry=0x5573935d0468 "/test/10.7_dbg/sql/sql_error.cc", line=line@entry=456, function=function@entry=0x5573935d0670 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at assert.c:101
      #4  0x00005573928facb9 in Diagnostics_area::set_error_status (this=this@entry=0x557394eef9a0, sql_errno=sql_errno@entry=6, message=message@entry=0x7ffde09f6cc0 "Error on delete of '/tmp/#sql-temptable-345dfe-1-27.MAD' (Errcode: 2 \"No such file or directory\")", sqlstate=sqlstate@entry=0x5573935f04c8 "HY000", ucid=@0x7ffde09f6c18: {m_user_condition_value = 0x0}, error_condition=0x0) at /test/10.7_dbg/sql/sql_error.h:1017
      #5  0x00005573928d5455 in THD::raise_condition (this=this@entry=0x557394ee9b28, sql_errno=sql_errno@entry=6, sqlstate=0x5573935f04c8 "HY000", sqlstate@entry=0x0, level=<optimized out>, ucid=@0x7ffde09f6c18: {m_user_condition_value = 0x0}, msg=msg@entry=0x7ffde09f6cc0 "Error on delete of '/tmp/#sql-temptable-345dfe-1-27.MAD' (Errcode: 2 \"No such file or directory\")") at /test/10.7_dbg/sql/sql_class.cc:1137
      #6  0x00005573928038bb in THD::raise_condition (msg=0x7ffde09f6cc0 "Error on delete of '/tmp/#sql-temptable-345dfe-1-27.MAD' (Errcode: 2 \"No such file or directory\")", level=<optimized out>, sqlstate=0x0, sql_errno=6, this=0x557394ee9b28) at /test/10.7_dbg/sql/sql_error.h:217
      #7  my_message_sql (error=6, str=0x7ffde09f6cc0 "Error on delete of '/tmp/#sql-temptable-345dfe-1-27.MAD' (Errcode: 2 \"No such file or directory\")", MyFlags=4) at /test/10.7_dbg/sql/mysqld.cc:3244
      #8  0x000055739343b874 in my_error (nr=nr@entry=6, MyFlags=MyFlags@entry=4) at /test/10.7_dbg/mysys/my_error.c:124
      #9  0x000055739343b4b6 in my_delete (name=name@entry=0x7ffde09f72c0 "/tmp/#sql-temptable-345dfe-1-27.MAD", MyFlags=MyFlags@entry=16) at /test/10.7_dbg/mysys/my_delete.c:53
      #10 0x0000557393444d8b in my_handler_delete_with_symlink (filename=filename@entry=0x7ffde09f72c0 "/tmp/#sql-temptable-345dfe-1-27.MAD", sync_dir=sync_dir@entry=16) at /test/10.7_dbg/mysys/my_symlink2.c:190
      #11 0x0000557392ee78af in inline_mysql_file_delete_with_symlink (key=0, src_file=src_file@entry=0x5573937dfe40 "/test/10.7_dbg/storage/maria/ma_delete_table.c", src_line=src_line@entry=103, name=name@entry=0x5573954843e8 "/tmp/#sql-temptable-345dfe-1-27", ext=ext@entry=0x5573937c86dd ".MAD", flags=flags@entry=16) at /test/10.7_dbg/include/mysql/psi/mysql_file.h:1396
      #12 0x0000557392ee799f in maria_delete_table_files (name=name@entry=0x5573954843e8 "/tmp/#sql-temptable-345dfe-1-27", temporary=temporary@entry=1 '\001', flags=flags@entry=16) at /test/10.7_dbg/storage/maria/ma_delete_table.c:103
      #13 0x0000557392e73c1e in ha_maria::drop_table (this=0x5573954844e0, name=0x5573954843e8 "/tmp/#sql-temptable-345dfe-1-27") at /test/10.7_dbg/storage/maria/ha_maria.cc:2793
      #14 0x0000557392c5a321 in handler::ha_drop_table (this=0x5573954844e0, name=0x5573954843e8 "/tmp/#sql-temptable-345dfe-1-27") at /test/10.7_dbg/sql/handler.cc:5319
      #15 0x00005573929bcfc4 in free_tmp_table (thd=thd@entry=0x557394ee9b28, entry=0x557395482ed0) at /test/10.7_dbg/sql/sql_select.cc:20348
      #16 0x00005573928b7188 in close_thread_tables (thd=thd@entry=0x557394ee9b28) at /test/10.7_dbg/sql/sql_base.cc:840
      #17 0x000055739295a937 in mysql_execute_command (thd=thd@entry=0x557394ee9b28, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:6063
      #18 0x0000557392940b83 in mysql_parse (thd=0x557394ee9b28, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7ffde09f7bd0) at /test/10.7_dbg/sql/sql_parse.cc:8030
      #19 0x000055739294d806 in bootstrap (file=0x5573947f5670 <instrumented_stdin>) at /test/10.7_dbg/sql/sql_class.h:1355
      #20 0x000055739280e1ee in mysqld_main (argc=<optimized out>, argv=<optimized out>) at /test/10.7_dbg/sql/mysqld.cc:5751
      #21 0x00005573927ffb46 in main (argc=<optimized out>, argv=<optimized out>) at /test/10.7_dbg/sql/main.cc:34
      

      10.6.5 9ac1ac006197c8979db1dc73f4e983f623e831e8 (Debug)

      mysqld: /test/10.6_dbg/storage/innobase/trx/trx0trx.cc:956: void trx_start_low(trx_t*, bool): Assertion `!srv_read_only_mode' failed.
      

      10.6.5 9ac1ac006197c8979db1dc73f4e983f623e831e8 (Debug)

      Core was generated by `/test/MD160821-mariadb-10.6.5-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14f8600c5700 (LWP 3442213))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014f8610dd859 in __GI_abort () at abort.c:79
      #2  0x000014f8610dd729 in __assert_fail_base (fmt=0x14f861273588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x561c6c427416 "!srv_read_only_mode", file=0x561c6c480f38 "/test/10.6_dbg/storage/innobase/trx/trx0trx.cc", line=956, function=<optimized out>) at assert.c:92
      #3  0x000014f8610eef36 in __GI___assert_fail (assertion=assertion@entry=0x561c6c427416 "!srv_read_only_mode", file=file@entry=0x561c6c480f38 "/test/10.6_dbg/storage/innobase/trx/trx0trx.cc", line=line@entry=956, function=function@entry=0x561c6c480fc8 "void trx_start_low(trx_t*, bool)") at assert.c:101
      #4  0x0000561c6be24943 in trx_start_low (trx=trx@entry=0x14f84c1fc390, read_write=read_write@entry=true) at /test/10.6_dbg/storage/innobase/trx/trx0trx.cc:956
      #5  0x0000561c6be25b1a in trx_start_internal_low (trx=trx@entry=0x14f84c1fc390, read_write=read_write@entry=true) at /test/10.6_dbg/storage/innobase/trx/trx0trx.cc:2103
      #6  0x0000561c6bf3c062 in dict_stats_fetch_from_ps (table=0x14f830019c18) at /test/10.6_dbg/storage/innobase/dict/dict0stats.cc:3246
      #7  dict_stats_update (table=table@entry=0x14f830014b18, stats_upd_option=<optimized out>) at /test/10.6_dbg/storage/innobase/dict/dict0stats.cc:3546
      #8  0x0000561c6bbf6081 in dict_stats_init (table=0x14f830014b18) at /test/10.6_dbg/storage/innobase/include/dict0stats.ic:165
      #9  ha_innobase::info_low (this=this@entry=0x14f830013e50, flag=flag@entry=282, is_analyze=is_analyze@entry=false) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:14377
      #10 0x0000561c6bbf7236 in ha_innobase::info (this=this@entry=0x14f830013e50, flag=flag@entry=282) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:14639
      #11 0x0000561c6bbfe95a in ha_innobase::open (this=0x14f830013e50, name=0x14f830010cc0 "./mysql/gtid_slave_pos") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:6062
      #12 0x0000561c6b815271 in handler::ha_open (this=0x14f830013e50, table_arg=table_arg@entry=0x14f830013558, name=0x14f830010cc0 "./mysql/gtid_slave_pos", mode=mode@entry=2, test_if_locked=test_if_locked@entry=18, mem_root=mem_root@entry=0x0, partitions_to_open=0x0) at /test/10.6_dbg/sql/handler.cc:3313
      #13 0x0000561c6b644d32 in open_table_from_share (thd=thd@entry=0x14f8300022b8, share=share@entry=0x14f830010710, alias=alias@entry=0x14f8600c4228, db_stat=db_stat@entry=33, prgflag=prgflag@entry=8, ha_open_flags=18, outparam=0x14f830013558, is_create_table=false, partitions_to_open=0x0) at /test/10.6_dbg/sql/table.cc:4327
      #14 0x0000561c6b49401e in open_table (thd=thd@entry=0x14f8300022b8, table_list=table_list@entry=0x14f8600c41e0, ot_ctx=ot_ctx@entry=0x14f8600c4060) at /test/10.6_dbg/sql/sql_base.cc:2003
      #15 0x0000561c6b498759 in open_and_process_table (ot_ctx=0x14f8600c4060, has_prelocking_list=false, prelocking_strategy=0x14f8600c41c0, flags=0, counter=0x14f8600c40fc, tables=0x14f8600c41e0, thd=0x14f8300022b8) at /test/10.6_dbg/sql/sql_base.cc:3807
      #16 open_tables (thd=thd@entry=0x14f8300022b8, options=@0x14f830007b10: {m_options = (DDL_options_st::OPT_LIKE | DDL_options_st::OPT_OR_REPLACE_SLAVE_GENERATED | DDL_options_st::OPT_CREATE_SELECT | unknown: 2779096321)}, start=start@entry=0x14f8600c40e8, counter=counter@entry=0x14f8600c40fc, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x14f8600c41c0) at /test/10.6_dbg/sql/sql_base.cc:4290
      #17 0x0000561c6b499856 in open_and_lock_tables (thd=thd@entry=0x14f8300022b8, options=@0x14f830007b10: {m_options = (DDL_options_st::OPT_LIKE | DDL_options_st::OPT_OR_REPLACE_SLAVE_GENERATED | DDL_options_st::OPT_CREATE_SELECT | unknown: 2779096321)}, tables=<optimized out>, tables@entry=0x14f8600c41e0, derived=derived@entry=false, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x14f8600c41c0) at /test/10.6_dbg/sql/sql_base.cc:5252
      #18 0x0000561c6b67ac9b in open_and_lock_tables (flags=0, derived=false, tables=0x14f8600c41e0, thd=0x14f8300022b8) at /test/10.6_dbg/sql/sql_base.h:509
      #19 scan_one_gtid_slave_pos_table (thd=thd@entry=0x14f8300022b8, hash=0x14f8600c4cc0, array=0x14f8600c4c90, tablename=tablename@entry=0x14f83000ec70, out_hton=out_hton@entry=0x14f8600c4918) at /test/10.6_dbg/sql/rpl_rli.cc:1587
      #20 0x0000561c6b67b285 in load_gtid_state_cb (thd=thd@entry=0x14f8300022b8, table_name=0x14f83000ec70, arg=arg@entry=0x14f8600c4c50) at /test/10.6_dbg/sql/rpl_rli.cc:1863
      #21 0x0000561c6b67a2fb in scan_all_gtid_slave_pos_table (thd=thd@entry=0x14f8300022b8, cb=cb@entry=0x561c6b67b258 <load_gtid_state_cb(THD*, LEX_CSTRING*, void*)>, cb_data=cb_data@entry=0x14f8600c4c50) at /test/10.6_dbg/sql/sql_array.h:138
      #22 0x0000561c6b67de59 in rpl_load_gtid_slave_state (thd=thd@entry=0x14f8300022b8) at /test/10.6_dbg/sql/rpl_rli.cc:1901
      #23 0x0000561c6b42f5e9 in bg_rpl_load_gtid_slave_state () at /test/10.6_dbg/sql/slave.cc:491
      #24 0x0000561c6b5132d2 in handle_manager (arg=arg@entry=0x0) at /test/10.6_dbg/sql/sql_manager.cc:113
      #25 0x0000561c6bb3b1ec in pfs_spawn_thread (arg=0x561c6ee17878) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #26 0x000014f8615ec609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x000014f8611da293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      10.6.5 (dbg), 10.7.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (opt), 10.7.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt)

      It seems the crash can happen at client exit or after some small delay or during startup. Also noteworthy is that stacks differ between 10.6 and 10.7.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              Roel Roel Van de Paar
              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.