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

Assertion `to <= end' failed in process_args & *** stack smashing detected ***

    XMLWordPrintable

Details

    Description

      This issue only happens in bb-10.6-monty

      SET SESSION default_master_connection=REPEAT('a',190),lc_messages=ru_ru;
      CHANGE MASTER TO master_host='dummy';
      START SLAVE sql_thread;
      CHANGE MASTER TO master_user='user',master_password='pwd';
      

      Leads to:

      10.6.1 90c8467341b8244e92e826e76c7697c88ca75cd2 (Debug)

      mysqld: /test/bb-10.6-monty_dbg/strings/my_vsnprintf.c:614: process_args: Assertion `to <= end' failed.
      

      10.6.1 90c8467341b8244e92e826e76c7697c88ca75cd2 (Debug)

      Core was generated by `/test/MONTY_MD030521-mariadb-10.6.1-linux-x86_64-dbg/bin/mysqld --no-defaults -'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14edb8164700 (LWP 4175185))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014edccde1859 in __GI_abort () at abort.c:79
      #2  0x000014edccde1729 in __assert_fail_base (fmt=0x14edccf77588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563a1f86cbe4 "to <= end", file=0x563a1f86c1a8 "/test/bb-10.6-monty_dbg/strings/my_vsnprintf.c", line=614, function=<optimized out>) at assert.c:92
      #3  0x000014edccdf2f36 in __GI___assert_fail (assertion=assertion@entry=0x563a1f86cbe4 "to <= end", file=file@entry=0x563a1f86c1a8 "/test/bb-10.6-monty_dbg/strings/my_vsnprintf.c", line=line@entry=614, function=function@entry=0x563a1f86cf50 <__PRETTY_FUNCTION__.16260> "process_args") at assert.c:101
      #4  0x0000563a1f1dca3f in process_args (cs=cs@entry=0x563a1fc2fea0 <my_charset_utf8mb3_general_ci>, to=0x14edb81623de "", to@entry=0x14edb8162231 'a' <repeats 190 times>, ". Снач"..., end=end@entry=0x14edb816239f 'a' <repeats 62 times>, "'", fmt=<optimized out>, fmt@entry=0x14ed8002500e "*1$s. Сначала выполните STOP SLAVE '%2$*1$s'", arg_index=<optimized out>, ap=ap@entry=0x14edb8162168) at /test/bb-10.6-monty_dbg/strings/my_vsnprintf.c:614
      #5  0x0000563a1f1dcca3 in my_vsnprintf_ex (cs=0x563a1fc2fea0 <my_charset_utf8mb3_general_ci>, to=0x14edb8162231 'a' <repeats 190 times>, ". Снач"..., to@entry=0x14edb81621a0 "Эту операцию невозможно выполнить при работающем потоке подчиненного сервера ", 'a' <repeats 55 times>..., n=n@entry=512, fmt=0x14ed8002500d "$*1$s. Сначала выполните STOP SLAVE '%2$*1$s'", ap=ap@entry=0x14edb8162168) at /test/bb-10.6-monty_dbg/strings/my_vsnprintf.c:681
      #6  0x0000563a1f17cbf6 in my_error (nr=nr@entry=1198, MyFlags=MyFlags@entry=0) at /test/bb-10.6-monty_dbg/mysys/my_error.c:120
      #7  0x0000563a1e682c24 in change_master (thd=thd@entry=0x14ed80000db8, mi=mi@entry=0x14ed80038190, master_info_added=master_info_added@entry=0x14edb8162fd0) at /test/bb-10.6-monty_dbg/sql/sql_repl.cc:3604
      #8  0x0000563a1e659a25 in mysql_execute_command (thd=thd@entry=0x14ed80000db8) at /test/bb-10.6-monty_dbg/sql/sql_parse.cc:4125
      #9  0x0000563a1e645806 in mysql_parse (thd=thd@entry=0x14ed80000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14edb8163410) at /test/bb-10.6-monty_dbg/sql/sql_parse.cc:8019
      #10 0x0000563a1e6542f5 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14ed80000db8, packet=packet@entry=0x14ed8000b759 "CHANGE MASTER TO master_user='user',master_password='pwd'", packet_length=packet_length@entry=57, blocking=blocking@entry=true) at /test/bb-10.6-monty_dbg/sql/sql_class.h:1333
      #11 0x0000563a1e6576e0 in do_command (thd=0x14ed80000db8, blocking=blocking@entry=true) at /test/bb-10.6-monty_dbg/sql/sql_parse.cc:1406
      #12 0x0000563a1e7bae0e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x563a20dd7728, put_in_cache=put_in_cache@entry=true) at /test/bb-10.6-monty_dbg/sql/sql_connect.cc:1410
      #13 0x0000563a1e7bb413 in handle_one_connection (arg=arg@entry=0x563a20dd7728) at /test/bb-10.6-monty_dbg/sql/sql_connect.cc:1312
      #14 0x0000563a1ec65da4 in pfs_spawn_thread (arg=0x563a20cc0148) at /test/bb-10.6-monty_dbg/storage/perfschema/pfs.cc:2201
      #15 0x000014edcd2ef609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x000014edccede293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.6.1 90c8467341b8244e92e826e76c7697c88ca75cd2 (Optimized)

      Core was generated by `/test/MONTY_MD030521-mariadb-10.6.1-linux-x86_64-opt/bin/mysqld --no-defaults -'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14999c62f700 (LWP 4011058))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014999f1b3859 in __GI_abort () at abort.c:79
      #2  0x000014999f21e3ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x14999f34807c "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:155
      #3  0x000014999f2c0b4a in __GI___fortify_fail (msg=msg@entry=0x14999f348064 "stack smashing detected") at fortify_fail.c:26
      #4  0x000014999f2c0b16 in __stack_chk_fail () at stack_chk_fail.c:24
      #5  0x00005614204d013f in my_error (nr=1198, MyFlags=0) at /test/bb-10.6-monty_opt/mysys/my_error.c:116
      #6  0x000056141fd5c1b4 in change_master (thd=thd@entry=0x14993c000c58, mi=mi@entry=0x14993c034620, master_info_added=master_info_added@entry=0x14999c62e080) at /test/bb-10.6-monty_opt/sql/sql_repl.cc:3604
      #7  0x000056141fd3ff1e in mysql_execute_command (thd=0x14993c000c58) at /test/bb-10.6-monty_opt/sql/sql_parse.cc:4125
      #8  0x000056141fd2ecc4 in mysql_parse (thd=0x14993c000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/bb-10.6-monty_opt/sql/sql_parse.cc:8019
      #9  0x000056141fd3aac5 in dispatch_command (command=COM_QUERY, thd=0x14993c000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/bb-10.6-monty_opt/sql/sql_class.h:1333
      #10 0x000056141fd3ca37 in do_command (thd=0x14993c000c58, blocking=blocking@entry=true) at /test/bb-10.6-monty_opt/sql/sql_parse.cc:1406
      #11 0x000056141fe49f67 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/bb-10.6-monty_opt/sql/sql_connect.cc:1410
      #12 0x000056141fe4a2cd in handle_one_connection (arg=arg@entry=0x561421d32b78) at /test/bb-10.6-monty_opt/sql/sql_connect.cc:1312
      #13 0x00005614201d1a78 in pfs_spawn_thread (arg=0x561421ccea58) at /test/bb-10.6-monty_opt/storage/perfschema/pfs.cc:2201
      #14 0x000014999f6c1609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x000014999f2b0293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.6.1 90c8467341b8244e92e826e76c7697c88ca75cd2 (Optimized)

      2021-05-07 10:20:16 0 [Note] InnoDB: Buffer pool(s) load completed at 210507 10:20:16
      2021-05-07 10:21:35 4 [Note] Master connection name: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'  Master_info_file: 'master-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.info'  Relay_info_file: 'relay-log-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.info'
      2021-05-07 10:21:35 4 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--log-basename=#' or '--relay-log=qa-roel-2-relay-bin' to avoid this problem.
      2021-05-07 10:21:35 4 [Note] 'CHANGE MASTER TO executed'. Previous state master_host='', master_port='3306', master_log_file='', master_log_pos='4'. New state master_host='dummy', master_port='3306', master_log_file='', master_log_pos='4'.
      2021-05-07 10:21:35 5 [Note] Master 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaSlave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log './qa-roel-2-relay-bin-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.000001' position: 4
      *** stack smashing detected ***: terminated
      

      Debug build has similar output, but assertion instead of stack smashing notice.

      Bug confirmed present in:
      MariaDB (bb-10.6-monty branch): 10.6.1 (dbg), 10.6.1 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB (trunk): 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.1 (dbg), 10.6.1 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 8.0.24 (dbg), 8.0.24 (opt)

      Attachments

        Activity

          People

            monty Michael Widenius
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.