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

Crash with wsrep-forced-binlog-format=ROW + GRANT statement

    XMLWordPrintable

Details

    • 10.1.13

    Description

      I ran across this when bootstrapping a MariaDB 10.1 based Galera cluster under CentOS7. Granting a new user with binary logs enabled and wsrep_forced_binlog_format = ROW leads to a crash.

      Here's the simplest my.cnf I found to reproduce this:

       
      # my_print_defaults mysqld server mysqld-10.1 mariadb mariadb-10.1 client-server galera
      --wsrep_on=ON
      --wsrep_provider=/usr/lib64/galera/libgalera_smm.so
      --log_bin
      --binlog_format=row
      --wsrep_forced_binlog_format=row
      
      

      And here are the commands that lead to the crash

       
      # galera_new_cluster
       
      # mysql -e "DROP USER IF EXISTS test_user@localhost; GRANT USAGE ON *.* TO test_user@localhost IDENTIFIED BY 'random_password'"
      ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query
      

      And the stack trace from the logs

      Mar 07 19:19:28 galera-test01 mysqld[28431]: 160307 19:19:28 [ERROR] mysqld got signal 11 ;
      Mar 07 19:19:28 galera-test01 mysqld[28431]: This could be because you hit a bug. It is also possible that this binary
      Mar 07 19:19:28 galera-test01 mysqld[28431]: or one of the libraries it was linked against is corrupt, improperly built,
      Mar 07 19:19:28 galera-test01 mysqld[28431]: or misconfigured. This error can also be caused by malfunctioning hardware.
      Mar 07 19:19:28 galera-test01 mysqld[28431]: To report this bug, see http://kb.askmonty.org/en/reporting-bugs
      Mar 07 19:19:28 galera-test01 mysqld[28431]: We will try our best to scrape up some info that will hopefully help
      Mar 07 19:19:28 galera-test01 mysqld[28431]: diagnose the problem, but since we have already crashed,
      Mar 07 19:19:28 galera-test01 mysqld[28431]: something is definitely wrong and this may fail.
      Mar 07 19:19:28 galera-test01 mysqld[28431]: Server version: 10.1.12-MariaDB
      Mar 07 19:19:28 galera-test01 mysqld[28431]: key_buffer_size=134217728
      Mar 07 19:19:28 galera-test01 mysqld[28431]: read_buffer_size=131072
      Mar 07 19:19:28 galera-test01 mysqld[28431]: max_used_connections=1
      Mar 07 19:19:28 galera-test01 mysqld[28431]: max_threads=153
      Mar 07 19:19:28 galera-test01 mysqld[28431]: thread_count=1
      Mar 07 19:19:28 galera-test01 mysqld[28431]: It is possible that mysqld could use up to
      Mar 07 19:19:28 galera-test01 mysqld[28431]: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467113 K  bytes of memory
      Mar 07 19:19:28 galera-test01 mysqld[28431]: Hope that's ok; if not, decrease some variables in the equation.
      Mar 07 19:19:28 galera-test01 mysqld[28431]: Thread pointer: 0x0x7f5100bba008
      Mar 07 19:19:28 galera-test01 mysqld[28431]: Attempting backtrace. You can use the following information to find out
      Mar 07 19:19:28 galera-test01 mysqld[28431]: where mysqld died. If you see no messages after this, something went
      Mar 07 19:19:28 galera-test01 mysqld[28431]: terribly wrong...
      Mar 07 19:19:28 galera-test01 mysqld[28431]: stack_bottom = 0x7f5105655130 thread_stack 0x48400
      Mar 07 19:19:28 galera-test01 mysqld[28431]: /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7f51061aa8fe]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: /usr/sbin/mysqld(handle_fatal_signal+0x38d)[0x7f5105cd769d]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: /lib64/libpthread.so.0(+0xf130)[0x7f51052f7130]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: /usr/sbin/mysqld(bitmap_bits_set+0xe)[0x7f51061a016e]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: /usr/sbin/mysqld(_Z8pack_rowP5TABLEPK9st_bitmapPhPKh+0x2f)[0x7f5105db78bf]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: /usr/sbin/mysqld(_ZN3THD16binlog_write_rowEP5TABLEbPKh+0x76)[0x7f5105b2f376]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: mysys/stacktrace.c:247(my_print_stacktrace)[0x7f5105ce16fd]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: sql/sql_class.cc:6300(THD::binlog_write_row(TABLE*, bool, unsigned char const*))[0x7f5105af16dd]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: sql/handler.cc:5753(binlog_log_row)[0x7f5105b0a1b4]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: sql/sql_acl.cc:3600(replace_user_table)[0x7f5105b5cec2]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: sql/sql_parse.cc:4754(mysql_execute_command(THD*))[0x7f5105b5f17e]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: sql/sql_parse.cc:1488(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x7f5105b6263b]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: sql/sql_parse.cc:1111(do_command(THD*))[0x7f5105b62eb9]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: sql/sql_connect.cc:1349(do_handle_one_connection(THD*))[0x7f5105c2657a]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: sql/sql_connect.cc:1263(handle_one_connection)[0x7f5105c26750]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: /lib64/libpthread.so.0(+0x7df3)[0x7f51052efdf3]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: /lib64/libc.so.6(clone+0x6d)[0x7f51037171ad]
      Mar 07 19:19:28 galera-test01 mysqld[28431]: Trying to get some variables.
      Mar 07 19:19:28 galera-test01 mysqld[28431]: Some pointers may be invalid and cause the dump to abort.
      Mar 07 19:19:28 galera-test01 mysqld[28431]: Query (0x7f50d541f020): GRANT USAGE ON *.* TO test_user@localhost IDENTIFIED BY 'random_password'
      Mar 07 19:19:28 galera-test01 mysqld[28431]: Connection ID (thread ID): 3
      Mar 07 19:19:28 galera-test01 mysqld[28431]: Status: NOT_KILLED
      Mar 07 19:19:28 galera-test01 mysqld[28431]: Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on
      Mar 07 19:19:28 galera-test01 mysqld[28431]: The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      Mar 07 19:19:28 galera-test01 mysqld[28431]: information that should help you find out what is causing the crash.
      Mar 07 19:19:28 galera-test01 systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
      Mar 07 19:19:28 galera-test01 systemd[1]: Unit mariadb.service entered failed state.
      Mar 07 19:19:28 galera-test01 systemd[1]: mariadb.service failed.
      

      I think crashing here is not intended, but I would be fine with an error if GRANT + wsrep_forced_binlog_format=ROW is not supported.

      Attachments

        Issue Links

          Activity

            People

              nirbhay_c Nirbhay Choubey (Inactive)
              andrew.garner Andrew Garner
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.