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

Server crashes in traverse_role_graph_up or Assertion `user' fails in traverse_role_graph_impl

    XMLWordPrintable

Details

    Description

      CREATE ROLE r;
      SET ROLE r;
      DROP ROLE r;
      REVOKE ALL ON *.* FROM CURRENT_ROLE;
      

      10.4 RelWithDebInfo 6adb0d2f

      #3  <signal handler called>
      #4  traverse_role_graph_impl (user=<optimized out>, user@entry=0x0, context=context@entry=0x7f5c8dd5d500, offset=offset@entry=88, on_node=on_node@entry=0x55ea814c5b80 <init_role_for_merging(ACL_ROLE*, void*)>, on_edge=on_edge@entry=0x55ea814c5b90 <count_subgraph_nodes(ACL_ROLE*, ACL_ROLE*, void*)>) at /data/src/10.4/sql/sql_acl.cc:5979
      #5  0x000055ea814c6dc1 in traverse_role_graph_up (on_edge=0x55ea814c5b90 <count_subgraph_nodes(ACL_ROLE*, ACL_ROLE*, void*)>, on_node=0x55ea814c5b80 <init_role_for_merging(ACL_ROLE*, void*)>, context=0x7f5c8dd5d500, role=0x0) at /data/src/10.4/sql/sql_acl.cc:6097
      #6  propagate_role_grants (role=0x0, what=what@entry=PRIVS_TO_MERGE::GLOBAL, db=db@entry=0x0, name=name@entry=0x0) at /data/src/10.4/sql/sql_acl.cc:5910
      #7  0x000055ea814df1f3 in mysql_grant (thd=thd@entry=0x7f5c7c0009a8, db=0x0, list=..., rights=1073740799, revoke_grant=<optimized out>, is_proxy=false) at /data/src/10.4/sql/sql_acl.cc:7503
      #8  0x000055ea81549d0f in mysql_execute_command (thd=thd@entry=0x7f5c7c0009a8) at /data/src/10.4/sql/sql_parse.cc:5357
      #9  0x000055ea8154ac69 in mysql_parse (thd=thd@entry=0x7f5c7c0009a8, rawbuf=<optimized out>, length=35, parser_state=parser_state@entry=0x7f5c8dd5f5b0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.4/sql/sql_parse.cc:7900
      #10 0x000055ea8154ce5f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f5c7c0009a8, packet=packet@entry=0x7f5c7c007a19 "REVOKE ALL ON *.* FROM CURRENT_ROLE", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.4/sql/sql_parse.cc:1842
      #11 0x000055ea8154e5d1 in do_command (thd=0x7f5c7c0009a8) at /data/src/10.4/sql/sql_parse.cc:1360
      #12 0x000055ea8161de04 in do_handle_one_connection (connect=connect@entry=0x55ea848b7128) at /data/src/10.4/sql/sql_connect.cc:1412
      #13 0x000055ea8161deb4 in handle_one_connection (arg=arg@entry=0x55ea848b7128) at /data/src/10.4/sql/sql_connect.cc:1316
      #14 0x000055ea81bc0ec4 in pfs_spawn_thread (arg=0x55ea848b7188) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #15 0x00007f5c95b404a4 in start_thread (arg=0x7f5c8dd60700) at pthread_create.c:456
      #16 0x00007f5c93c74d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.4 debug 6adb0d2f

      mysqld: /data/src/10.4/sql/sql_acl.cc:5957: int traverse_role_graph_impl(ACL_USER_BASE*, void*, off_t, int (*)(ACL_USER_BASE*, void*), int (*)(ACL_USER_BASE*, ACL_ROLE*, void*)): Assertion `user' failed.
      200510 18:21:54 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007f626b6dae67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55ba203929f7 "user", file=file@entry=0x55ba203927f0 "/data/src/10.4/sql/sql_acl.cc", line=line@entry=5957, function=function@entry=0x55ba20395c60 <traverse_role_graph_impl(ACL_USER_BASE*, void*, long, int (*)(ACL_USER_BASE*, void*), int (*)(ACL_USER_BASE*, ACL_ROLE*, void*))::__PRETTY_FUNCTION__> "int traverse_role_graph_impl(ACL_USER_BASE*, void*, off_t, int (*)(ACL_USER_BASE*, void*), int (*)(ACL_USER_BASE*, ACL_ROLE*, void*))") at assert.c:92
      #7  0x00007f626b6daf12 in __GI___assert_fail (assertion=0x55ba203929f7 "user", file=0x55ba203927f0 "/data/src/10.4/sql/sql_acl.cc", line=5957, function=0x55ba20395c60 <traverse_role_graph_impl(ACL_USER_BASE*, void*, long, int (*)(ACL_USER_BASE*, void*), int (*)(ACL_USER_BASE*, ACL_ROLE*, void*))::__PRETTY_FUNCTION__> "int traverse_role_graph_impl(ACL_USER_BASE*, void*, off_t, int (*)(ACL_USER_BASE*, void*), int (*)(ACL_USER_BASE*, ACL_ROLE*, void*))") at assert.c:101
      #8  0x000055ba1f5ee4d0 in traverse_role_graph_impl (user=0x0, context=0x7f6265883920, offset=88, on_node=0x55ba1f5ee293 <init_role_for_merging(ACL_ROLE*, void*)>, on_edge=0x55ba1f5ee2b1 <count_subgraph_nodes(ACL_ROLE*, ACL_ROLE*, void*)>) at /data/src/10.4/sql/sql_acl.cc:5957
      #9  0x000055ba1f5eef1c in traverse_role_graph_up (role=0x0, context=0x7f6265883920, on_node=0x55ba1f5ee293 <init_role_for_merging(ACL_ROLE*, void*)>, on_edge=0x55ba1f5ee2b1 <count_subgraph_nodes(ACL_ROLE*, ACL_ROLE*, void*)>) at /data/src/10.4/sql/sql_acl.cc:6097
      #10 0x000055ba1f5ee3ea in propagate_role_grants (role=0x0, what=PRIVS_TO_MERGE::GLOBAL, db=0x0, name=0x0) at /data/src/10.4/sql/sql_acl.cc:5910
      #11 0x000055ba1f5f3799 in mysql_grant (thd=0x7f6254000af0, db=0x0, list=..., rights=1073740799, revoke_grant=true, is_proxy=false) at /data/src/10.4/sql/sql_acl.cc:7503
      #12 0x000055ba1f6beb5e in mysql_execute_command (thd=0x7f6254000af0) at /data/src/10.4/sql/sql_parse.cc:5357
      #13 0x000055ba1f6c6ad3 in mysql_parse (thd=0x7f6254000af0, rawbuf=0x7f6254013198 "REVOKE ALL ON *.* FROM CURRENT_ROLE", length=35, parser_state=0x7f6265884570, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7900
      #14 0x000055ba1f6b3083 in dispatch_command (command=COM_QUERY, thd=0x7f6254000af0, packet=0x7f6254136221 "REVOKE ALL ON *.* FROM CURRENT_ROLE", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1842
      #15 0x000055ba1f6b1825 in do_command (thd=0x7f6254000af0) at /data/src/10.4/sql/sql_parse.cc:1360
      #16 0x000055ba1f839394 in do_handle_one_connection (connect=0x55ba226a3d40) at /data/src/10.4/sql/sql_connect.cc:1412
      #17 0x000055ba1f8390e3 in handle_one_connection (arg=0x55ba226a3d40) at /data/src/10.4/sql/sql_connect.cc:1316
      #18 0x000055ba20238f41 in pfs_spawn_thread (arg=0x55ba22612570) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #19 0x00007f626d6634a4 in start_thread (arg=0x7f6265885700) at pthread_create.c:456
      #20 0x00007f626b797d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.1-10.5, including old releases/builds; debug assertion and non-debug SIGSEGV as described above.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              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.