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

strings/ctype-ucs2.c:2336: my_vsnprintf_utf32: Assertion `(n % 4) == 0' failed in my_vsnprintf_utf32 on INSERT

Details

    Description

      This seems to be a recent regression:
      The bug does not reproduce on 10.6 of 11 Sep at 961b96a5e0dd40512b8fff77dcec273187ccc9fd but does reproduce at 10.6 of 26 Sep at d13a57ae8181f2a8fbee86838d5476740e050d50
      When the following SQL is executed in a standard master/slave setup:

      CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
      CALL sys.statement_performance_analyzer (1,1,1);
      DROP TABLE t;
      CREATE TABLE t (c INT) ENGINE=MyISAM;
      SET sql_log_bin=1;
      INSERT INTO t VALUES (1);
      

      The slave (debug build) will assert:

      10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)

      2023-09-26 15:36:59 5 [Note] Slave I/O thread: Start asynchronous replication to master 'repl_user@127.0.0.1:12208' in log '' at position 4
      2023-09-26 15:36:59 5 [Note] Slave I/O thread: connected to master 'repl_user@127.0.0.1:12208',replication starts at GTID position ''
      2023-09-26 15:36:59 6 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 4, relay log './relaylog.000001' position: 4; GTID position ''
      mariadbd: /test/10.6_dbg/strings/ctype-ucs2.c:2336: my_vsnprintf_utf32: Assertion `(n % 4) == 0' failed.
      

      10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)

      Core was generated by `/test/BASE_MD260923-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184)
          at ./nptl/pthread_kill.c:44
      [Current thread is 1 (Thread 0x1480697ea640 (LWP 1701910))]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=22541758277184, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  0x000014808f042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  0x000014808f0287f3 in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000014808f02871b in __assert_fail_base (fmt=0x14808f1dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563fb08bd6aa "(n % 4) == 0", file=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=2336, function=<optimized out>) at ./assert/assert.c:92
      #6  0x000014808f039e96 in __GI___assert_fail (assertion=assertion@entry=0x563fb08bd6aa "(n % 4) == 0", file=file@entry=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=line@entry=2336, function=function@entry=0x563fb08bded0 <__PRETTY_FUNCTION__.40> "my_vsnprintf_utf32") at ./assert/assert.c:101
      #7  0x0000563fb02834f0 in my_vsnprintf_utf32 (ap=0x1480697e9098, fmt=0x563fb0571df0 "varchar(%u octets) character set %s", n=<optimized out>, dst=<optimized out>) at /test/10.6_dbg/strings/ctype-ucs2.c:2336
      #8  my_snprintf_utf32 (cs=cs@entry=0x563fb0ce4c60 <my_charset_utf32_turkish_uca_ci>, to=<optimized out>, n=<optimized out>, fmt=fmt@entry=0x563fb0571df0 "varchar(%u octets) character set %s") at /test/10.6_dbg/strings/ctype-ucs2.c:2428
      #9  0x0000563fafa9dd32 in Field_varstring::sql_rpl_type (this=0x147f7c01f8c8, res=0x1480697e9530) at /test/10.6_dbg/sql/sql_string.h:359
      #10 0x0000563faf94cc28 in table_def::compatible_with (this=this@entry=0x147f7c021be8, thd=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, table=0x147f7c023cb8, conv_table_var=conv_table_var@entry=0x1480697e98d0) at /test/10.6_dbg/sql/rpl_utility_server.cc:999
      #11 0x0000563fafc36685 in Rows_log_event::do_apply_event (this=0x14803006f998, rgi=0x14803006c470) at /test/10.6_dbg/sql/log_event_server.cc:5602
      #12 0x0000563faf7443f4 in Log_event::apply_event (rgi=0x14803006c470, this=0x14803006f998) at /test/10.6_dbg/sql/log_event.h:1499
      #13 apply_event_and_update_pos_apply (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3894
      #14 0x0000563faf74e4df in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470) at /test/10.6_dbg/sql/slave.cc:4090
      #15 0x0000563faf9e3db0 in rpt_handle_event (qev=qev@entry=0x14803006fb18, rpt=rpt@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:64
      #16 0x0000563faf9e889a in handle_rpl_parallel_thread (arg=arg@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:1512
      #17 0x0000563fafdafc3e in pfs_spawn_thread (arg=0x148030038768) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #18 0x000014808f094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #19 0x000014808f126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attempts to replicate the bug on a standalone (non-replication) server have failed thus far.

      Attachments

        Activity

          Roel Roel Van de Paar created issue -
          Roel Roel Van de Paar made changes -
          Field Original Value New Value
          Description This seems to be a recent regression. The issue does not reproduce on 10.6 of 11 Sep at 961b96a5e0dd40512b8fff77dcec273187ccc9fd but does reproduce at 10.6 of 26 Sep at d13a57ae8181f2a8fbee86838d5476740e050d50
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, MTR testcase, etc.) which will follow later.
          _When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          The slave
          This seems to be a recent regression. The issue does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, MTR testcase, etc.) which will follow later._
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          The slave
          Roel Roel Van de Paar made changes -
          Description This seems to be a recent regression. The issue does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, MTR testcase, etc.) which will follow later._
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          The slave
          This seems to be a recent regression. The issue does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, MTR testcase, etc.) which will follow later._
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          A debug slave will SIGABRT:
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          Core was generated by `/test/BASE_MD260923-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
          Program terminated with signal SIGABRT, Aborted.
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184)
              at ./nptl/pthread_kill.c:44
          [Current thread is 1 (Thread 0x1480697ea640 (LWP 1701910))]
          (gdb) bt
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:44
          #1 __pthread_kill_internal (signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:78
          #2 __GI___pthread_kill (threadid=22541758277184, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
          #3 0x000014808f042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
          #4 0x000014808f0287f3 in __GI_abort () at ./stdlib/abort.c:79
          #5 0x000014808f02871b in __assert_fail_base (fmt=0x14808f1dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563fb08bd6aa "(n % 4) == 0", file=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=2336, function=<optimized out>) at ./assert/assert.c:92
          #6 0x000014808f039e96 in __GI___assert_fail (assertion=assertion@entry=0x563fb08bd6aa "(n % 4) == 0", file=file@entry=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=line@entry=2336, function=function@entry=0x563fb08bded0 <__PRETTY_FUNCTION__.40> "my_vsnprintf_utf32") at ./assert/assert.c:101
          #7 0x0000563fb02834f0 in my_vsnprintf_utf32 (ap=0x1480697e9098, fmt=0x563fb0571df0 "varchar(%u octets) character set %s", n=<optimized out>, dst=<optimized out>) at /test/10.6_dbg/strings/ctype-ucs2.c:2336
          #8 my_snprintf_utf32 (cs=cs@entry=0x563fb0ce4c60 <my_charset_utf32_turkish_uca_ci>, to=<optimized out>, n=<optimized out>, fmt=fmt@entry=0x563fb0571df0 "varchar(%u octets) character set %s") at /test/10.6_dbg/strings/ctype-ucs2.c:2428
          #9 0x0000563fafa9dd32 in Field_varstring::sql_rpl_type (this=0x147f7c01f8c8, res=0x1480697e9530) at /test/10.6_dbg/sql/sql_string.h:359
          #10 0x0000563faf94cc28 in table_def::compatible_with (this=this@entry=0x147f7c021be8, thd=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, table=0x147f7c023cb8, conv_table_var=conv_table_var@entry=0x1480697e98d0) at /test/10.6_dbg/sql/rpl_utility_server.cc:999
          #11 0x0000563fafc36685 in Rows_log_event::do_apply_event (this=0x14803006f998, rgi=0x14803006c470) at /test/10.6_dbg/sql/log_event_server.cc:5602
          #12 0x0000563faf7443f4 in Log_event::apply_event (rgi=0x14803006c470, this=0x14803006f998) at /test/10.6_dbg/sql/log_event.h:1499
          #13 apply_event_and_update_pos_apply (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3894
          #14 0x0000563faf74e4df in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470) at /test/10.6_dbg/sql/slave.cc:4090
          #15 0x0000563faf9e3db0 in rpt_handle_event (qev=qev@entry=0x14803006fb18, rpt=rpt@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:64
          #16 0x0000563faf9e889a in handle_rpl_parallel_thread (arg=arg@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:1512
          #17 0x0000563fafdafc3e in pfs_spawn_thread (arg=0x148030038768) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
          #18 0x000014808f094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
          #19 0x000014808f126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          {noformat}
          Roel Roel Van de Paar made changes -
          Description This seems to be a recent regression. The issue does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, MTR testcase, etc.) which will follow later._
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          A debug slave will SIGABRT:
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          Core was generated by `/test/BASE_MD260923-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
          Program terminated with signal SIGABRT, Aborted.
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184)
              at ./nptl/pthread_kill.c:44
          [Current thread is 1 (Thread 0x1480697ea640 (LWP 1701910))]
          (gdb) bt
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:44
          #1 __pthread_kill_internal (signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:78
          #2 __GI___pthread_kill (threadid=22541758277184, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
          #3 0x000014808f042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
          #4 0x000014808f0287f3 in __GI_abort () at ./stdlib/abort.c:79
          #5 0x000014808f02871b in __assert_fail_base (fmt=0x14808f1dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563fb08bd6aa "(n % 4) == 0", file=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=2336, function=<optimized out>) at ./assert/assert.c:92
          #6 0x000014808f039e96 in __GI___assert_fail (assertion=assertion@entry=0x563fb08bd6aa "(n % 4) == 0", file=file@entry=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=line@entry=2336, function=function@entry=0x563fb08bded0 <__PRETTY_FUNCTION__.40> "my_vsnprintf_utf32") at ./assert/assert.c:101
          #7 0x0000563fb02834f0 in my_vsnprintf_utf32 (ap=0x1480697e9098, fmt=0x563fb0571df0 "varchar(%u octets) character set %s", n=<optimized out>, dst=<optimized out>) at /test/10.6_dbg/strings/ctype-ucs2.c:2336
          #8 my_snprintf_utf32 (cs=cs@entry=0x563fb0ce4c60 <my_charset_utf32_turkish_uca_ci>, to=<optimized out>, n=<optimized out>, fmt=fmt@entry=0x563fb0571df0 "varchar(%u octets) character set %s") at /test/10.6_dbg/strings/ctype-ucs2.c:2428
          #9 0x0000563fafa9dd32 in Field_varstring::sql_rpl_type (this=0x147f7c01f8c8, res=0x1480697e9530) at /test/10.6_dbg/sql/sql_string.h:359
          #10 0x0000563faf94cc28 in table_def::compatible_with (this=this@entry=0x147f7c021be8, thd=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, table=0x147f7c023cb8, conv_table_var=conv_table_var@entry=0x1480697e98d0) at /test/10.6_dbg/sql/rpl_utility_server.cc:999
          #11 0x0000563fafc36685 in Rows_log_event::do_apply_event (this=0x14803006f998, rgi=0x14803006c470) at /test/10.6_dbg/sql/log_event_server.cc:5602
          #12 0x0000563faf7443f4 in Log_event::apply_event (rgi=0x14803006c470, this=0x14803006f998) at /test/10.6_dbg/sql/log_event.h:1499
          #13 apply_event_and_update_pos_apply (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3894
          #14 0x0000563faf74e4df in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470) at /test/10.6_dbg/sql/slave.cc:4090
          #15 0x0000563faf9e3db0 in rpt_handle_event (qev=qev@entry=0x14803006fb18, rpt=rpt@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:64
          #16 0x0000563faf9e889a in handle_rpl_parallel_thread (arg=arg@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:1512
          #17 0x0000563fafdafc3e in pfs_spawn_thread (arg=0x148030038768) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
          #18 0x000014808f094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
          #19 0x000014808f126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          {noformat}
          This seems to be a recent regression. The issue does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, MTR testcase, etc.) which will follow later._
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          The slave (debug build) will assert:
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: Start asynchronous replication to master 'repl_user@127.0.0.1:12208' in log '' at position 4
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: connected to master 'repl_user@127.0.0.1:12208',replication starts at GTID position ''
          2023-09-26 15:36:59 6 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 4, relay log './relaylog.000001' position: 4; GTID position ''
          mariadbd: /test/10.6_dbg/strings/ctype-ucs2.c:2336: my_vsnprintf_utf32: Assertion `(n % 4) == 0' failed.
          {noformat}
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          Core was generated by `/test/BASE_MD260923-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
          Program terminated with signal SIGABRT, Aborted.
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184)
              at ./nptl/pthread_kill.c:44
          [Current thread is 1 (Thread 0x1480697ea640 (LWP 1701910))]
          (gdb) bt
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:44
          #1 __pthread_kill_internal (signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:78
          #2 __GI___pthread_kill (threadid=22541758277184, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
          #3 0x000014808f042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
          #4 0x000014808f0287f3 in __GI_abort () at ./stdlib/abort.c:79
          #5 0x000014808f02871b in __assert_fail_base (fmt=0x14808f1dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563fb08bd6aa "(n % 4) == 0", file=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=2336, function=<optimized out>) at ./assert/assert.c:92
          #6 0x000014808f039e96 in __GI___assert_fail (assertion=assertion@entry=0x563fb08bd6aa "(n % 4) == 0", file=file@entry=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=line@entry=2336, function=function@entry=0x563fb08bded0 <__PRETTY_FUNCTION__.40> "my_vsnprintf_utf32") at ./assert/assert.c:101
          #7 0x0000563fb02834f0 in my_vsnprintf_utf32 (ap=0x1480697e9098, fmt=0x563fb0571df0 "varchar(%u octets) character set %s", n=<optimized out>, dst=<optimized out>) at /test/10.6_dbg/strings/ctype-ucs2.c:2336
          #8 my_snprintf_utf32 (cs=cs@entry=0x563fb0ce4c60 <my_charset_utf32_turkish_uca_ci>, to=<optimized out>, n=<optimized out>, fmt=fmt@entry=0x563fb0571df0 "varchar(%u octets) character set %s") at /test/10.6_dbg/strings/ctype-ucs2.c:2428
          #9 0x0000563fafa9dd32 in Field_varstring::sql_rpl_type (this=0x147f7c01f8c8, res=0x1480697e9530) at /test/10.6_dbg/sql/sql_string.h:359
          #10 0x0000563faf94cc28 in table_def::compatible_with (this=this@entry=0x147f7c021be8, thd=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, table=0x147f7c023cb8, conv_table_var=conv_table_var@entry=0x1480697e98d0) at /test/10.6_dbg/sql/rpl_utility_server.cc:999
          #11 0x0000563fafc36685 in Rows_log_event::do_apply_event (this=0x14803006f998, rgi=0x14803006c470) at /test/10.6_dbg/sql/log_event_server.cc:5602
          #12 0x0000563faf7443f4 in Log_event::apply_event (rgi=0x14803006c470, this=0x14803006f998) at /test/10.6_dbg/sql/log_event.h:1499
          #13 apply_event_and_update_pos_apply (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3894
          #14 0x0000563faf74e4df in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470) at /test/10.6_dbg/sql/slave.cc:4090
          #15 0x0000563faf9e3db0 in rpt_handle_event (qev=qev@entry=0x14803006fb18, rpt=rpt@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:64
          #16 0x0000563faf9e889a in handle_rpl_parallel_thread (arg=arg@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:1512
          #17 0x0000563fafdafc3e in pfs_spawn_thread (arg=0x148030038768) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
          #18 0x000014808f094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
          #19 0x000014808f126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          {noformat}
          Attempts to replicate the bug on a standalone (non-replication) server have failed thus far.
          Roel Roel Van de Paar made changes -
          Description This seems to be a recent regression. The issue does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, MTR testcase, etc.) which will follow later._
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          The slave (debug build) will assert:
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: Start asynchronous replication to master 'repl_user@127.0.0.1:12208' in log '' at position 4
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: connected to master 'repl_user@127.0.0.1:12208',replication starts at GTID position ''
          2023-09-26 15:36:59 6 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 4, relay log './relaylog.000001' position: 4; GTID position ''
          mariadbd: /test/10.6_dbg/strings/ctype-ucs2.c:2336: my_vsnprintf_utf32: Assertion `(n % 4) == 0' failed.
          {noformat}
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          Core was generated by `/test/BASE_MD260923-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
          Program terminated with signal SIGABRT, Aborted.
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184)
              at ./nptl/pthread_kill.c:44
          [Current thread is 1 (Thread 0x1480697ea640 (LWP 1701910))]
          (gdb) bt
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:44
          #1 __pthread_kill_internal (signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:78
          #2 __GI___pthread_kill (threadid=22541758277184, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
          #3 0x000014808f042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
          #4 0x000014808f0287f3 in __GI_abort () at ./stdlib/abort.c:79
          #5 0x000014808f02871b in __assert_fail_base (fmt=0x14808f1dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563fb08bd6aa "(n % 4) == 0", file=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=2336, function=<optimized out>) at ./assert/assert.c:92
          #6 0x000014808f039e96 in __GI___assert_fail (assertion=assertion@entry=0x563fb08bd6aa "(n % 4) == 0", file=file@entry=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=line@entry=2336, function=function@entry=0x563fb08bded0 <__PRETTY_FUNCTION__.40> "my_vsnprintf_utf32") at ./assert/assert.c:101
          #7 0x0000563fb02834f0 in my_vsnprintf_utf32 (ap=0x1480697e9098, fmt=0x563fb0571df0 "varchar(%u octets) character set %s", n=<optimized out>, dst=<optimized out>) at /test/10.6_dbg/strings/ctype-ucs2.c:2336
          #8 my_snprintf_utf32 (cs=cs@entry=0x563fb0ce4c60 <my_charset_utf32_turkish_uca_ci>, to=<optimized out>, n=<optimized out>, fmt=fmt@entry=0x563fb0571df0 "varchar(%u octets) character set %s") at /test/10.6_dbg/strings/ctype-ucs2.c:2428
          #9 0x0000563fafa9dd32 in Field_varstring::sql_rpl_type (this=0x147f7c01f8c8, res=0x1480697e9530) at /test/10.6_dbg/sql/sql_string.h:359
          #10 0x0000563faf94cc28 in table_def::compatible_with (this=this@entry=0x147f7c021be8, thd=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, table=0x147f7c023cb8, conv_table_var=conv_table_var@entry=0x1480697e98d0) at /test/10.6_dbg/sql/rpl_utility_server.cc:999
          #11 0x0000563fafc36685 in Rows_log_event::do_apply_event (this=0x14803006f998, rgi=0x14803006c470) at /test/10.6_dbg/sql/log_event_server.cc:5602
          #12 0x0000563faf7443f4 in Log_event::apply_event (rgi=0x14803006c470, this=0x14803006f998) at /test/10.6_dbg/sql/log_event.h:1499
          #13 apply_event_and_update_pos_apply (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3894
          #14 0x0000563faf74e4df in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470) at /test/10.6_dbg/sql/slave.cc:4090
          #15 0x0000563faf9e3db0 in rpt_handle_event (qev=qev@entry=0x14803006fb18, rpt=rpt@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:64
          #16 0x0000563faf9e889a in handle_rpl_parallel_thread (arg=arg@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:1512
          #17 0x0000563fafdafc3e in pfs_spawn_thread (arg=0x148030038768) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
          #18 0x000014808f094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
          #19 0x000014808f126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          {noformat}
          Attempts to replicate the bug on a standalone (non-replication) server have failed thus far.
          This seems to be a recent regression:
          The bug does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, MTR testcase, etc.) which will follow later._
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          The slave (debug build) will assert:
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: Start asynchronous replication to master 'repl_user@127.0.0.1:12208' in log '' at position 4
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: connected to master 'repl_user@127.0.0.1:12208',replication starts at GTID position ''
          2023-09-26 15:36:59 6 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 4, relay log './relaylog.000001' position: 4; GTID position ''
          mariadbd: /test/10.6_dbg/strings/ctype-ucs2.c:2336: my_vsnprintf_utf32: Assertion `(n % 4) == 0' failed.
          {noformat}
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          Core was generated by `/test/BASE_MD260923-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
          Program terminated with signal SIGABRT, Aborted.
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184)
              at ./nptl/pthread_kill.c:44
          [Current thread is 1 (Thread 0x1480697ea640 (LWP 1701910))]
          (gdb) bt
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:44
          #1 __pthread_kill_internal (signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:78
          #2 __GI___pthread_kill (threadid=22541758277184, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
          #3 0x000014808f042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
          #4 0x000014808f0287f3 in __GI_abort () at ./stdlib/abort.c:79
          #5 0x000014808f02871b in __assert_fail_base (fmt=0x14808f1dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563fb08bd6aa "(n % 4) == 0", file=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=2336, function=<optimized out>) at ./assert/assert.c:92
          #6 0x000014808f039e96 in __GI___assert_fail (assertion=assertion@entry=0x563fb08bd6aa "(n % 4) == 0", file=file@entry=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=line@entry=2336, function=function@entry=0x563fb08bded0 <__PRETTY_FUNCTION__.40> "my_vsnprintf_utf32") at ./assert/assert.c:101
          #7 0x0000563fb02834f0 in my_vsnprintf_utf32 (ap=0x1480697e9098, fmt=0x563fb0571df0 "varchar(%u octets) character set %s", n=<optimized out>, dst=<optimized out>) at /test/10.6_dbg/strings/ctype-ucs2.c:2336
          #8 my_snprintf_utf32 (cs=cs@entry=0x563fb0ce4c60 <my_charset_utf32_turkish_uca_ci>, to=<optimized out>, n=<optimized out>, fmt=fmt@entry=0x563fb0571df0 "varchar(%u octets) character set %s") at /test/10.6_dbg/strings/ctype-ucs2.c:2428
          #9 0x0000563fafa9dd32 in Field_varstring::sql_rpl_type (this=0x147f7c01f8c8, res=0x1480697e9530) at /test/10.6_dbg/sql/sql_string.h:359
          #10 0x0000563faf94cc28 in table_def::compatible_with (this=this@entry=0x147f7c021be8, thd=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, table=0x147f7c023cb8, conv_table_var=conv_table_var@entry=0x1480697e98d0) at /test/10.6_dbg/sql/rpl_utility_server.cc:999
          #11 0x0000563fafc36685 in Rows_log_event::do_apply_event (this=0x14803006f998, rgi=0x14803006c470) at /test/10.6_dbg/sql/log_event_server.cc:5602
          #12 0x0000563faf7443f4 in Log_event::apply_event (rgi=0x14803006c470, this=0x14803006f998) at /test/10.6_dbg/sql/log_event.h:1499
          #13 apply_event_and_update_pos_apply (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3894
          #14 0x0000563faf74e4df in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470) at /test/10.6_dbg/sql/slave.cc:4090
          #15 0x0000563faf9e3db0 in rpt_handle_event (qev=qev@entry=0x14803006fb18, rpt=rpt@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:64
          #16 0x0000563faf9e889a in handle_rpl_parallel_thread (arg=arg@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:1512
          #17 0x0000563fafdafc3e in pfs_spawn_thread (arg=0x148030038768) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
          #18 0x000014808f094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
          #19 0x000014808f126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          {noformat}
          Attempts to replicate the bug on a standalone (non-replication) server have failed thus far.
          bar Alexander Barkov made changes -
          Assignee Alexander Barkov [ bar ] Roel Van de Paar [ roel ]
          Roel Roel Van de Paar made changes -
          Description This seems to be a recent regression:
          The bug does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, MTR testcase, etc.) which will follow later._
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          The slave (debug build) will assert:
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: Start asynchronous replication to master 'repl_user@127.0.0.1:12208' in log '' at position 4
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: connected to master 'repl_user@127.0.0.1:12208',replication starts at GTID position ''
          2023-09-26 15:36:59 6 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 4, relay log './relaylog.000001' position: 4; GTID position ''
          mariadbd: /test/10.6_dbg/strings/ctype-ucs2.c:2336: my_vsnprintf_utf32: Assertion `(n % 4) == 0' failed.
          {noformat}
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          Core was generated by `/test/BASE_MD260923-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
          Program terminated with signal SIGABRT, Aborted.
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184)
              at ./nptl/pthread_kill.c:44
          [Current thread is 1 (Thread 0x1480697ea640 (LWP 1701910))]
          (gdb) bt
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:44
          #1 __pthread_kill_internal (signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:78
          #2 __GI___pthread_kill (threadid=22541758277184, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
          #3 0x000014808f042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
          #4 0x000014808f0287f3 in __GI_abort () at ./stdlib/abort.c:79
          #5 0x000014808f02871b in __assert_fail_base (fmt=0x14808f1dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563fb08bd6aa "(n % 4) == 0", file=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=2336, function=<optimized out>) at ./assert/assert.c:92
          #6 0x000014808f039e96 in __GI___assert_fail (assertion=assertion@entry=0x563fb08bd6aa "(n % 4) == 0", file=file@entry=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=line@entry=2336, function=function@entry=0x563fb08bded0 <__PRETTY_FUNCTION__.40> "my_vsnprintf_utf32") at ./assert/assert.c:101
          #7 0x0000563fb02834f0 in my_vsnprintf_utf32 (ap=0x1480697e9098, fmt=0x563fb0571df0 "varchar(%u octets) character set %s", n=<optimized out>, dst=<optimized out>) at /test/10.6_dbg/strings/ctype-ucs2.c:2336
          #8 my_snprintf_utf32 (cs=cs@entry=0x563fb0ce4c60 <my_charset_utf32_turkish_uca_ci>, to=<optimized out>, n=<optimized out>, fmt=fmt@entry=0x563fb0571df0 "varchar(%u octets) character set %s") at /test/10.6_dbg/strings/ctype-ucs2.c:2428
          #9 0x0000563fafa9dd32 in Field_varstring::sql_rpl_type (this=0x147f7c01f8c8, res=0x1480697e9530) at /test/10.6_dbg/sql/sql_string.h:359
          #10 0x0000563faf94cc28 in table_def::compatible_with (this=this@entry=0x147f7c021be8, thd=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, table=0x147f7c023cb8, conv_table_var=conv_table_var@entry=0x1480697e98d0) at /test/10.6_dbg/sql/rpl_utility_server.cc:999
          #11 0x0000563fafc36685 in Rows_log_event::do_apply_event (this=0x14803006f998, rgi=0x14803006c470) at /test/10.6_dbg/sql/log_event_server.cc:5602
          #12 0x0000563faf7443f4 in Log_event::apply_event (rgi=0x14803006c470, this=0x14803006f998) at /test/10.6_dbg/sql/log_event.h:1499
          #13 apply_event_and_update_pos_apply (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3894
          #14 0x0000563faf74e4df in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470) at /test/10.6_dbg/sql/slave.cc:4090
          #15 0x0000563faf9e3db0 in rpt_handle_event (qev=qev@entry=0x14803006fb18, rpt=rpt@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:64
          #16 0x0000563faf9e889a in handle_rpl_parallel_thread (arg=arg@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:1512
          #17 0x0000563fafdafc3e in pfs_spawn_thread (arg=0x148030038768) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
          #18 0x000014808f094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
          #19 0x000014808f126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          {noformat}
          Attempts to replicate the bug on a standalone (non-replication) server have failed thus far.
          This seems to be a recent regression:
          The bug does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, -MTR testcase-, etc.) which will follow later._
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          The slave (debug build) will assert:
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: Start asynchronous replication to master 'repl_user@127.0.0.1:12208' in log '' at position 4
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: connected to master 'repl_user@127.0.0.1:12208',replication starts at GTID position ''
          2023-09-26 15:36:59 6 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 4, relay log './relaylog.000001' position: 4; GTID position ''
          mariadbd: /test/10.6_dbg/strings/ctype-ucs2.c:2336: my_vsnprintf_utf32: Assertion `(n % 4) == 0' failed.
          {noformat}
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          Core was generated by `/test/BASE_MD260923-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
          Program terminated with signal SIGABRT, Aborted.
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184)
              at ./nptl/pthread_kill.c:44
          [Current thread is 1 (Thread 0x1480697ea640 (LWP 1701910))]
          (gdb) bt
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:44
          #1 __pthread_kill_internal (signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:78
          #2 __GI___pthread_kill (threadid=22541758277184, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
          #3 0x000014808f042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
          #4 0x000014808f0287f3 in __GI_abort () at ./stdlib/abort.c:79
          #5 0x000014808f02871b in __assert_fail_base (fmt=0x14808f1dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563fb08bd6aa "(n % 4) == 0", file=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=2336, function=<optimized out>) at ./assert/assert.c:92
          #6 0x000014808f039e96 in __GI___assert_fail (assertion=assertion@entry=0x563fb08bd6aa "(n % 4) == 0", file=file@entry=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=line@entry=2336, function=function@entry=0x563fb08bded0 <__PRETTY_FUNCTION__.40> "my_vsnprintf_utf32") at ./assert/assert.c:101
          #7 0x0000563fb02834f0 in my_vsnprintf_utf32 (ap=0x1480697e9098, fmt=0x563fb0571df0 "varchar(%u octets) character set %s", n=<optimized out>, dst=<optimized out>) at /test/10.6_dbg/strings/ctype-ucs2.c:2336
          #8 my_snprintf_utf32 (cs=cs@entry=0x563fb0ce4c60 <my_charset_utf32_turkish_uca_ci>, to=<optimized out>, n=<optimized out>, fmt=fmt@entry=0x563fb0571df0 "varchar(%u octets) character set %s") at /test/10.6_dbg/strings/ctype-ucs2.c:2428
          #9 0x0000563fafa9dd32 in Field_varstring::sql_rpl_type (this=0x147f7c01f8c8, res=0x1480697e9530) at /test/10.6_dbg/sql/sql_string.h:359
          #10 0x0000563faf94cc28 in table_def::compatible_with (this=this@entry=0x147f7c021be8, thd=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, table=0x147f7c023cb8, conv_table_var=conv_table_var@entry=0x1480697e98d0) at /test/10.6_dbg/sql/rpl_utility_server.cc:999
          #11 0x0000563fafc36685 in Rows_log_event::do_apply_event (this=0x14803006f998, rgi=0x14803006c470) at /test/10.6_dbg/sql/log_event_server.cc:5602
          #12 0x0000563faf7443f4 in Log_event::apply_event (rgi=0x14803006c470, this=0x14803006f998) at /test/10.6_dbg/sql/log_event.h:1499
          #13 apply_event_and_update_pos_apply (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3894
          #14 0x0000563faf74e4df in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470) at /test/10.6_dbg/sql/slave.cc:4090
          #15 0x0000563faf9e3db0 in rpt_handle_event (qev=qev@entry=0x14803006fb18, rpt=rpt@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:64
          #16 0x0000563faf9e889a in handle_rpl_parallel_thread (arg=arg@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:1512
          #17 0x0000563fafdafc3e in pfs_spawn_thread (arg=0x148030038768) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
          #18 0x000014808f094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
          #19 0x000014808f126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          {noformat}
          Attempts to replicate the bug on a standalone (non-replication) server have failed thus far.
          Roel Roel Van de Paar made changes -
          Description This seems to be a recent regression:
          The bug does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          _Note: A fair bit more work is required on this ticket (git bisect, checking other versions after re-building them, some replication setup scripting, -MTR testcase-, etc.) which will follow later._
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          The slave (debug build) will assert:
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: Start asynchronous replication to master 'repl_user@127.0.0.1:12208' in log '' at position 4
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: connected to master 'repl_user@127.0.0.1:12208',replication starts at GTID position ''
          2023-09-26 15:36:59 6 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 4, relay log './relaylog.000001' position: 4; GTID position ''
          mariadbd: /test/10.6_dbg/strings/ctype-ucs2.c:2336: my_vsnprintf_utf32: Assertion `(n % 4) == 0' failed.
          {noformat}
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          Core was generated by `/test/BASE_MD260923-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
          Program terminated with signal SIGABRT, Aborted.
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184)
              at ./nptl/pthread_kill.c:44
          [Current thread is 1 (Thread 0x1480697ea640 (LWP 1701910))]
          (gdb) bt
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:44
          #1 __pthread_kill_internal (signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:78
          #2 __GI___pthread_kill (threadid=22541758277184, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
          #3 0x000014808f042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
          #4 0x000014808f0287f3 in __GI_abort () at ./stdlib/abort.c:79
          #5 0x000014808f02871b in __assert_fail_base (fmt=0x14808f1dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563fb08bd6aa "(n % 4) == 0", file=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=2336, function=<optimized out>) at ./assert/assert.c:92
          #6 0x000014808f039e96 in __GI___assert_fail (assertion=assertion@entry=0x563fb08bd6aa "(n % 4) == 0", file=file@entry=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=line@entry=2336, function=function@entry=0x563fb08bded0 <__PRETTY_FUNCTION__.40> "my_vsnprintf_utf32") at ./assert/assert.c:101
          #7 0x0000563fb02834f0 in my_vsnprintf_utf32 (ap=0x1480697e9098, fmt=0x563fb0571df0 "varchar(%u octets) character set %s", n=<optimized out>, dst=<optimized out>) at /test/10.6_dbg/strings/ctype-ucs2.c:2336
          #8 my_snprintf_utf32 (cs=cs@entry=0x563fb0ce4c60 <my_charset_utf32_turkish_uca_ci>, to=<optimized out>, n=<optimized out>, fmt=fmt@entry=0x563fb0571df0 "varchar(%u octets) character set %s") at /test/10.6_dbg/strings/ctype-ucs2.c:2428
          #9 0x0000563fafa9dd32 in Field_varstring::sql_rpl_type (this=0x147f7c01f8c8, res=0x1480697e9530) at /test/10.6_dbg/sql/sql_string.h:359
          #10 0x0000563faf94cc28 in table_def::compatible_with (this=this@entry=0x147f7c021be8, thd=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, table=0x147f7c023cb8, conv_table_var=conv_table_var@entry=0x1480697e98d0) at /test/10.6_dbg/sql/rpl_utility_server.cc:999
          #11 0x0000563fafc36685 in Rows_log_event::do_apply_event (this=0x14803006f998, rgi=0x14803006c470) at /test/10.6_dbg/sql/log_event_server.cc:5602
          #12 0x0000563faf7443f4 in Log_event::apply_event (rgi=0x14803006c470, this=0x14803006f998) at /test/10.6_dbg/sql/log_event.h:1499
          #13 apply_event_and_update_pos_apply (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3894
          #14 0x0000563faf74e4df in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470) at /test/10.6_dbg/sql/slave.cc:4090
          #15 0x0000563faf9e3db0 in rpt_handle_event (qev=qev@entry=0x14803006fb18, rpt=rpt@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:64
          #16 0x0000563faf9e889a in handle_rpl_parallel_thread (arg=arg@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:1512
          #17 0x0000563fafdafc3e in pfs_spawn_thread (arg=0x148030038768) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
          #18 0x000014808f094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
          #19 0x000014808f126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          {noformat}
          Attempts to replicate the bug on a standalone (non-replication) server have failed thus far.
          This seems to be a recent regression:
          The bug does not reproduce on 10.6 of 11 Sep at {{961b96a5e0dd40512b8fff77dcec273187ccc9fd}} but does reproduce at 10.6 of 26 Sep at {{d13a57ae8181f2a8fbee86838d5476740e050d50}}
          When the following SQL is executed *in a standard master/slave setup*:
          {code:sql}
          CREATE TABLE t (c VARCHAR(1) CHARACTER SET utf32 COLLATE utf32_turkish_ci) ENGINE=MyISAM;
          CALL sys.statement_performance_analyzer (1,1,1);
          DROP TABLE t;
          CREATE TABLE t (c INT) ENGINE=MyISAM;
          SET sql_log_bin=1;
          INSERT INTO t VALUES (1);
          {code}
          The slave (debug build) will assert:
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: Start asynchronous replication to master 'repl_user@127.0.0.1:12208' in log '' at position 4
          2023-09-26 15:36:59 5 [Note] Slave I/O thread: connected to master 'repl_user@127.0.0.1:12208',replication starts at GTID position ''
          2023-09-26 15:36:59 6 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 4, relay log './relaylog.000001' position: 4; GTID position ''
          mariadbd: /test/10.6_dbg/strings/ctype-ucs2.c:2336: my_vsnprintf_utf32: Assertion `(n % 4) == 0' failed.
          {noformat}
          {noformat:title=10.6.16 d13a57ae8181f2a8fbee86838d5476740e050d50 (Debug)}
          Core was generated by `/test/BASE_MD260923-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
          Program terminated with signal SIGABRT, Aborted.
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184)
              at ./nptl/pthread_kill.c:44
          [Current thread is 1 (Thread 0x1480697ea640 (LWP 1701910))]
          (gdb) bt
          #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:44
          #1 __pthread_kill_internal (signo=6, threadid=22541758277184) at ./nptl/pthread_kill.c:78
          #2 __GI___pthread_kill (threadid=22541758277184, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
          #3 0x000014808f042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
          #4 0x000014808f0287f3 in __GI_abort () at ./stdlib/abort.c:79
          #5 0x000014808f02871b in __assert_fail_base (fmt=0x14808f1dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563fb08bd6aa "(n % 4) == 0", file=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=2336, function=<optimized out>) at ./assert/assert.c:92
          #6 0x000014808f039e96 in __GI___assert_fail (assertion=assertion@entry=0x563fb08bd6aa "(n % 4) == 0", file=file@entry=0x563fb08bd5e0 "/test/10.6_dbg/strings/ctype-ucs2.c", line=line@entry=2336, function=function@entry=0x563fb08bded0 <__PRETTY_FUNCTION__.40> "my_vsnprintf_utf32") at ./assert/assert.c:101
          #7 0x0000563fb02834f0 in my_vsnprintf_utf32 (ap=0x1480697e9098, fmt=0x563fb0571df0 "varchar(%u octets) character set %s", n=<optimized out>, dst=<optimized out>) at /test/10.6_dbg/strings/ctype-ucs2.c:2336
          #8 my_snprintf_utf32 (cs=cs@entry=0x563fb0ce4c60 <my_charset_utf32_turkish_uca_ci>, to=<optimized out>, n=<optimized out>, fmt=fmt@entry=0x563fb0571df0 "varchar(%u octets) character set %s") at /test/10.6_dbg/strings/ctype-ucs2.c:2428
          #9 0x0000563fafa9dd32 in Field_varstring::sql_rpl_type (this=0x147f7c01f8c8, res=0x1480697e9530) at /test/10.6_dbg/sql/sql_string.h:359
          #10 0x0000563faf94cc28 in table_def::compatible_with (this=this@entry=0x147f7c021be8, thd=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, table=0x147f7c023cb8, conv_table_var=conv_table_var@entry=0x1480697e98d0) at /test/10.6_dbg/sql/rpl_utility_server.cc:999
          #11 0x0000563fafc36685 in Rows_log_event::do_apply_event (this=0x14803006f998, rgi=0x14803006c470) at /test/10.6_dbg/sql/log_event_server.cc:5602
          #12 0x0000563faf7443f4 in Log_event::apply_event (rgi=0x14803006c470, this=0x14803006f998) at /test/10.6_dbg/sql/log_event.h:1499
          #13 apply_event_and_update_pos_apply (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3894
          #14 0x0000563faf74e4df in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14803006f998, thd=thd@entry=0x147f7c000f98, rgi=rgi@entry=0x14803006c470) at /test/10.6_dbg/sql/slave.cc:4090
          #15 0x0000563faf9e3db0 in rpt_handle_event (qev=qev@entry=0x14803006fb18, rpt=rpt@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:64
          #16 0x0000563faf9e889a in handle_rpl_parallel_thread (arg=arg@entry=0x148030026d78) at /test/10.6_dbg/sql/rpl_parallel.cc:1512
          #17 0x0000563fafdafc3e in pfs_spawn_thread (arg=0x148030038768) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
          #18 0x000014808f094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
          #19 0x000014808f126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          {noformat}
          Attempts to replicate the bug on a standalone (non-replication) server have failed thus far.
          Roel Roel Van de Paar made changes -
          Priority Critical [ 2 ] Major [ 3 ]
          Roel Roel Van de Paar made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          bar Alexander Barkov made changes -
          Assignee Roel Van de Paar [ roel ] Alexander Barkov [ bar ]
          Roel Roel Van de Paar made changes -
          Affects Version/s 11.3 [ 28565 ]
          bar Alexander Barkov made changes -
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.6 [ 24028 ]
          bar Alexander Barkov made changes -
          Affects Version/s 10.4 [ 22408 ]
          Affects Version/s 10.5 [ 23123 ]
          Affects Version/s 10.7 [ 24805 ]
          Affects Version/s 10.8 [ 26121 ]
          Affects Version/s 10.9 [ 26905 ]
          Affects Version/s 10.10 [ 27530 ]
          Affects Version/s 10.11 [ 27614 ]
          Affects Version/s 11.0 [ 28320 ]
          Affects Version/s 11.1 [ 28549 ]
          Affects Version/s 11.2 [ 28603 ]
          Affects Version/s 11.3.0 [ 29302 ]
          bar Alexander Barkov made changes -
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.10 [ 27530 ]
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.0 [ 28320 ]
          Fix Version/s 11.1 [ 28549 ]
          Fix Version/s 11.2 [ 28603 ]
          Fix Version/s 11.3 [ 28565 ]
          bar Alexander Barkov made changes -
          Status Confirmed [ 10101 ] In Progress [ 3 ]
          bar Alexander Barkov made changes -
          Assignee Alexander Barkov [ bar ] Andrei Elkin [ elkin ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          Roel Roel Van de Paar made changes -
          Fix Version/s 11.3 [ 28565 ]
          Fix Version/s 11.2 [ 28603 ]
          Elkin Andrei Elkin made changes -
          Assignee Andrei Elkin [ elkin ] Alexander Barkov [ bar ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          bar Alexander Barkov made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          bar Alexander Barkov made changes -
          Fix Version/s 10.4.32 [ 29300 ]
          Fix Version/s 10.5.23 [ 29012 ]
          Fix Version/s 10.6.16 [ 29014 ]
          Fix Version/s 10.10.7 [ 29018 ]
          Fix Version/s 10.11.6 [ 29020 ]
          Fix Version/s 11.0.4 [ 29021 ]
          Fix Version/s 11.1.3 [ 29023 ]
          Fix Version/s 11.2.2 [ 29035 ]
          Fix Version/s 11.3.1 [ 29416 ]
          Fix Version/s 10.9.8 [ 29015 ]
          Fix Version/s 10.8.8 [ 28518 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.10 [ 27530 ]
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.0 [ 28320 ]
          Fix Version/s 11.1 [ 28549 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]

          People

            bar Alexander Barkov
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.