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

Assertion `status == 0' failed in add_role_user_mapping_action on GRANT

    XMLWordPrintable

Details

    Description

      --source include/master-slave.inc
      SET sql_mode='';
      CREATE ROLE r1;
      GRANT r1 TO current_user;
      GRANT SELECT ON * TO '1';
      --source include/rpl_end.inc
      

      Will assert the slave:

      11.5.0 eeba940311ed17d160023280783fd2bbb64abef3

      mariadbd: /test/11.5_dbg/sql/sql_acl.cc:3969: my_bool add_role_user_mapping_action(void*, void*): Assertion `status == 0' failed.
      

      11.5.0 eeba940311ed17d160023280783fd2bbb64abef3

      Core was generated by `/test/MD190224-mariadb-11.5.0-linux-x86_64-dbg/bin/mariadbd --defaults-group-su'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22482913080896)
          at ./nptl/pthread_kill.c:44
      [Current thread is 1 (LWP 3444740)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22482913080896) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=22482913080896) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=22482913080896, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  0x00001472c1642476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  0x00001472c16287f3 in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00001472c162871b in __assert_fail_base (fmt=0x1472c17dd130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55b854e32b43 "status == 0", file=0x55b854e3274c "/test/11.5_dbg/sql/sql_acl.cc", line=3969, function=<optimized out>) at ./assert/assert.c:92
      #6  0x00001472c1639e96 in __GI___assert_fail (assertion=0x55b854e32b43 "status == 0", file=0x55b854e3274c "/test/11.5_dbg/sql/sql_acl.cc", line=3969, function=0x55b854e31298 "my_bool add_role_user_mapping_action(void*, void*)") at ./assert/assert.c:101
      #7  0x000055b85417e2ac in add_role_user_mapping_action (ptr=<optimized out>, unused=<optimized out>) at /test/11.5_dbg/sql/sql_acl.cc:3969
      #8  0x000055b854c4ebc8 in my_hash_iterate (hash=0x55b8558bf800 <acl_roles_mappings>, action=0x55b85417e24e <add_role_user_mapping_action(void*, void*)>, argument=0x0) at /test/11.5_dbg/mysys/hash.c:809
      #9  0x000055b85416f7d6 in rebuild_role_grants () at /test/11.5_dbg/sql/sql_acl.cc:3994
      #10 0x000055b854181949 in replace_user_table (thd=thd@entry=0x147280001b08, user_table=<optimized out>, combo=combo@entry=0x14728000fd60, rights=rights@entry=NO_ACL, revoke_grant=revoke_grant@entry=false, can_create_user=can_create_user@entry=true, no_auto_create=false) at /test/11.5_dbg/sql/sql_acl.cc:4965
      #11 0x000055b85418fc18 in mysql_grant (thd=thd@entry=0x147280001b08, db=<optimized out>, list=@0x147280006eb0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14728000fc90, last = 0x14728000fc90, elements = 1}, <No data fields>}, rights=SELECT_ACL, revoke_grant=false, is_proxy=false) at /test/11.5_dbg/sql/sql_acl.cc:2044
      #12 0x000055b854190146 in Sql_cmd_grant_table::execute_table_mask (this=0x14728000fca0, thd=0x147280001b08) at /test/11.5_dbg/sql/sql_acl.cc:12403
      #13 0x000055b854190229 in Sql_cmd_grant_table::execute (this=<optimized out>, thd=<optimized out>) at /test/11.5_dbg/sql/sql_acl.cc:12420
      #14 0x000055b8542261d2 in mysql_execute_command (thd=thd@entry=0x147280001b08, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.5_dbg/sql/sql_parse.cc:5803
      #15 0x000055b854227527 in mysql_parse (thd=0x147280001b08, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1472b60c20c0) at /test/11.5_dbg/sql/sql_parse.cc:7815
      #16 0x000055b8546b4bba in Query_log_event::do_apply_event (this=0x14728002ca08, rgi=0x147280000cf0, query_arg=0x147280046700 "GRANT SELECT ON * TO '1'", q_len_arg=<optimized out>) at /test/11.5_dbg/sql/sql_class.h:254
      #17 0x000055b8546b5451 in Query_log_event::do_apply_event (this=<optimized out>, rgi=<optimized out>) at /test/11.5_dbg/sql/log_event_server.cc:1504
      #18 0x000055b8546a5b3f in Log_event::apply_event (this=this@entry=0x14728002ca08, rgi=rgi@entry=0x147280000cf0) at /test/11.5_dbg/sql/log_event.cc:3917
      #19 0x000055b854146f89 in apply_event_and_update_pos_apply (ev=ev@entry=0x14728002ca08, thd=thd@entry=0x147280001b08, rgi=rgi@entry=0x147280000cf0, reason=reason@entry=0) at /test/11.5_dbg/sql/slave.cc:3918
      #20 0x000055b854151185 in apply_event_and_update_pos (ev=ev@entry=0x14728002ca08, thd=thd@entry=0x147280001b08, rgi=rgi@entry=0x147280000cf0) at /test/11.5_dbg/sql/slave.cc:4094
      #21 0x000055b8541539df in exec_relay_log_event (serial_rgi=0x147280000cf0, rli=0x55b858119dc0, thd=0x147280001b08) at /test/11.5_dbg/sql/slave.cc:4513
      #22 handle_slave_sql (arg=arg@entry=0x55b858117d00) at /test/11.5_dbg/sql/slave.cc:5750
      #23 0x000055b8547e223c in pfs_spawn_thread (arg=0x147288154f68) at /test/11.5_dbg/storage/perfschema/pfs.cc:2201
      #24 0x00001472c1694ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #25 0x00001472c1726850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Present in debug builds 10.4+

      Attachments

        Activity

          People

            serg Sergei Golubchik
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.