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

wsrep_forced_binlog_format With Binlog Causes Crash

    XMLWordPrintable

Details

    Description

      While evaluating MariaDB 10.1.9, I found that creating a user or creating a stored procedure caused all three of our galera nodes to crash (the second trace below). Other operations may cause trigger the issue, but these are the only ones I tested. After the crash I had one node back up, I created a procedure which also caused a crash (the first trace below). While testing the issue on a VM running 10.1.10, I was able to narrow down the cause to having wsrep_forced_binlog_format to ROW with binlogging enabled. When wsrep_forced_binlog_format is not set, but binlogging is enabled, the crash doesn't happen. When binlogging is disabled but wsrep_forced_binlog_format is set, the crash doesn't happen.

      I was able to start the server with binlogging enabled and wsrep_forced_binlog_format not set and was able to create a procedure. Then I set wsrep_forced_binlog_format to "ROW" and tried creating a procedure again and the server crashed. The crash also happens even if wsrep_on is not set and the only wsrep_* variable set is wsrep_forced_binlog_format.

      You should be able to replicate this issue on a new 10.1.10 by enabling binlogging and setting wsrep_forced_binlog_format to "ROW" and creating a procedure or a user.

      Based on the stack trace, this may be related to MDEV-9296.

      Creating a procedure:

      /usr/sbin/mysqld(my_print_stacktrace+0x2b) [0x7ff4b222b49b]
      /usr/sbin/mysqld(handle_fatal_signal+0x475) [0x7ff4b1d8c7b5]
      /lib64/libpthread.so.0(+0xf710) [0x7ff4b13a3710]
      /usr/sbin/mysqld(bitmap_bits_set+0x1) [0x7ff4b2220d71]
      /usr/sbin/mysqld(pack_row(TABLE*, st_bitmap const*, unsigned char*, unsigned char const*)+0x2f) [0x7ff4b1e5dabf]
      /usr/sbin/mysqld(THD::binlog_write_row(TABLE*, bool, unsigned char const*)+0x83) [0x7ff4b1bf6a83]
      /usr/sbin/mysqld(handler::ha_write_row(unsigned char*)+0x207) [0x7ff4b1d960b7]
      /usr/sbin/mysqld(sp_create_routine(THD*, stored_procedure_type, sp_head*)+0x8f2) [0x7ff4b1e86472]
      /usr/sbin/mysqld(mysql_execute_command(THD*)+0x5b8d) [0x7ff4b1c2037d]
      /usr/sbin/mysqld(mysql_parse(THD*, char*, unsigned int, Parser_state*)+0x22d) [0x7ff4b1c2390d]
      /usr/sbin/mysqld(+0x450a0c) [0x7ff4b1c23a0c]
      /usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x1c63) [0x7ff4b1c25d93]
      /usr/sbin/mysqld(do_command(THD*)+0x16b) [0x7ff4b1c2695b]
      /usr/sbin/mysqld(do_handle_one_connection(THD*)+0x17f) [0x7ff4b1ce1c6f]
      /usr/sbin/mysqld(handle_one_connection+0x47) [0x7ff4b1ce1dc7]
      /usr/sbin/mysqld(+0x94525d) [0x7ff4b211825d]
      /lib64/libpthread.so.0(+0x79d1) [0x7ff4b139b9d1]
      /lib64/libc.so.6(clone+0x6d) [0x7ff4af8818fd]

      creating a user:

      /usr/sbin/mysqld(my_print_stacktrace+0x2b) [0x7f4de6e5049b]
      /usr/sbin/mysqld(handle_fatal_signal+0x475) [0x7f4de69b17b5]
      /lib64/libpthread.so.0(+0xf710) [0x7f4de5fc8710]
      /usr/sbin/mysqld(bitmap_bits_set+0x1) [0x7f4de6e45d71]
      /usr/sbin/mysqld(pack_row(TABLE*, st_bitmap const*, unsigned char*, unsigned char const*)+0x2f) [0x7f4de6a82abf]
      /usr/sbin/mysqld(THD::binlog_write_row(TABLE*, bool, unsigned char const*)+0x83) [0x7f4de681ba83]
      /usr/sbin/mysqld(handler::ha_write_row(unsigned char*)+0x207) [0x7f4de69bb0b7]
      /usr/sbin/mysqld(+0x3e913f) [0x7f4de67e113f]
      /usr/sbin/mysqld(mysql_create_user(THD*, List<st_lex_user>&, bool)+0x5e7) [0x7f4de67ea0a7]
      /usr/sbin/mysqld(mysql_execute_command(THD*)+0x2447) [0x7f4de6841c37]
      /usr/sbin/mysqld(mysql_parse(THD*, char*, unsigned int, Parser_state*)+0x22d) [0x7f4de684890d]
      /usr/sbin/mysqld(Query_log_event::do_apply_event(rpl_group_info*, char const*, unsigned int)+0x1184) [0x7f4de6a78794]
      /usr/sbin/mysqld(wsrep_apply_cb(void*, void const*, unsigned long, unsigned int, wsrep_trx_meta const*)+0x542) [0x7f4de6960462]
      /usr/lib64/galera/libgalera_smm.so(galera::TrxHandle::apply(void*, wsrep_cb_status (*)(void*, void const*, unsigned long, unsigned int, wsrep_trx_meta const*), wsrep_trx_meta const&) const+0xd3) [0x7f4dac5119f3]
      /usr/lib64/galera/libgalera_smm.so(+0x21576e) [0x7f4dac54376e]
      /usr/lib64/galera/libgalera_smm.so(galera::ReplicatorSMM::apply_trx(void*, galera::TrxHandle*)+0xa4) [0x7f4dac545414]
      /usr/lib64/galera/libgalera_smm.so(galera::ReplicatorSMM::process_trx(void*, galera::TrxHandle*)+0x40) [0x7f4dac546810]
      /usr/lib64/galera/libgalera_smm.so(galera::GcsActionSource::dispatch(void*, gcs_action const&, bool&)+0x185) [0x7f4dac529f15]
      /usr/lib64/galera/libgalera_smm.so(galera::GcsActionSource::process(void*, bool&)+0x63) [0x7f4dac52a273]
      /usr/lib64/galera/libgalera_smm.so(galera::ReplicatorSMM::async_recv(void*)+0x6d) [0x7f4dac5481fd]
      /usr/lib64/galera/libgalera_smm.so(galera_recv+0x23) [0x7f4dac559083]
      /usr/sbin/mysqld(+0x569202) [0x7f4de6961202]
      /usr/sbin/mysqld(start_wsrep_THD+0x3c1) [0x7f4de69528c1]
      /lib64/libpthread.so.0(+0x79d1) [0x7f4de5fc09d1]
      /lib64/libc.so.6(clone+0x6d) [0x7f4de44a68fd]

      Attachments

        Issue Links

          Activity

            People

              nirbhay_c Nirbhay Choubey (Inactive)
              bradjorgensen Brad Jorgensen
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.