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

SIGSEGV in TABLE::use_all_columns, replace_roles_mapping_table, UBSAN runtime error: member call on null pointer in replace_roles_mapping_table and other functions

    XMLWordPrintable

Details

    Description

      DROP TABLE IF EXISTS mysql.roles_mapping;
      CREATE ROLE r1;
      

      Leads to:

      10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Optimized)

      Core was generated by `/test/mtest/GAL_MD080622-mariadb-10.10.0-linux-x86_64-opt/bin/mysqld --defaults'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x146cba28a700 (LWP 2230243))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000056091dc5319f in my_write_core (sig=sig@entry=11) at /test/mtest/10.10_opt/mysys/stacktrace.c:424
      #2  0x000056091d7a2170 in handle_fatal_signal (sig=11) at /test/mtest/10.10_opt/sql/signal_handler.cc:345
      #3  <signal handler called>
      #4  TABLE::use_all_columns (this=0x0) at /test/mtest/10.10_opt/sql/table.h:1620
      #5  replace_roles_mapping_table (table=0x0, user=0x146c800107d8, host=0x146c800107e8, role=role@entry=0x146c800107a0, with_admin=with_admin@entry=true, existing=existing@entry=0x0, revoke_grant=false) at /test/mtest/10.10_opt/sql/sql_acl.cc:4953
      #6  0x000056091d4d68c5 in mysql_create_user (thd=thd@entry=0x146c80000c58, list=@0x146c80005b50: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x146c800107c8, last = 0x146c800107c8, elements = 1}, <No data fields>}, handle_as_role=true) at /test/mtest/10.10_opt/sql/sql_acl.cc:10936
      #7  0x000056091d567046 in mysql_execute_command (thd=0x146c80000c58, is_called_from_prepared_stmt=<optimized out>) at /test/mtest/10.10_opt/sql/sql_parse.cc:5328
      #8  0x000056091d557036 in mysql_parse (rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, thd=0x146c80000c58) at /test/mtest/10.10_opt/sql/sql_parse.cc:8036
      #9  mysql_parse (thd=0x146c80000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/mtest/10.10_opt/sql/sql_parse.cc:7958
      #10 0x000056091d5568c1 in wsrep_mysql_parse (thd=0x146c80000c58, rawbuf=0x146c80010720 "CREATE ROLE r1", length=14, parser_state=0x146cba289470) at /test/mtest/10.10_opt/sql/sql_parse.cc:7849
      #11 0x000056091d563da5 in dispatch_command (command=COM_QUERY, thd=0x146c80000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/mtest/10.10_opt/sql/sql_parse.cc:1977
      #12 0x000056091d564b18 in do_command (thd=0x146c80000c58, blocking=blocking@entry=true) at /test/mtest/10.10_opt/sql/sql_parse.cc:1407
      #13 0x000056091d67c5c7 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x56091f53d598, put_in_cache=put_in_cache@entry=true) at /test/mtest/10.10_opt/sql/sql_connect.cc:1418
      #14 0x000056091d67c8ad in handle_one_connection (arg=0x56091f53d598) at /test/mtest/10.10_opt/sql/sql_connect.cc:1312
      #15 0x0000146cf0348609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x0000146ceff36293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (opt), 10.3.36 (dbg), 10.4.25 (opt), 10.4.26 (dbg), 10.5.16 (opt), 10.5.17 (dbg), 10.6.8 (opt), 10.6.9 (dbg), 10.7.4 (opt), 10.7.5 (dbg), 10.8.4 (dbg), 10.8.3 (opt), 10.9.2 (opt), 10.9.2 (dbg), 10.10.0 (opt), 10.10.0 (dbg)

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.