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

Error 2027: received malformed packet or Assertion `length < 249' failed in Transaction_state_tracker::store

Details

    Description

      The same is reproducible with just setting CHARACTER_SET_DATABASE, without the need to create a new schema, but I made the test case not to do it, as the operation isn't supposed to be performed by users.

      CREATE DATABASE db CHARACTER SET utf32;
      SET SESSION SESSION_TRACK_TRANSACTION_INFO= CHARACTERISTICS;
      USE db;
      SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
      START TRANSACTION;
       
      # Cleanup
      DROP DATABASE db;
      

      10.2 non-debug b0df247d

      query 'START TRANSACTION' failed: 2027: received malformed packet
      

      10.2 debug b0df247d

      mysqld: /data/src/10.2/sql/session_tracker.cc:1325: virtual bool Transaction_state_tracker::store(THD*, String*): Assertion `length < 249' failed.
      200714 22:28:28 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f54c471cf12 in __GI___assert_fail (assertion=0x56055234891d "length < 249", file=0x560552348780 "/data/src/10.2/sql/session_tracker.cc", line=1325, function=0x560552348b80 <Transaction_state_tracker::store(THD*, String*)::__PRETTY_FUNCTION__> "virtual bool Transaction_state_tracker::store(THD*, String*)") at assert.c:101
      #8  0x0000560551813c5e in Transaction_state_tracker::store (this=0x7f54ac007ee0, thd=0x7f54ac000af0, buf=0x7f54bea50110) at /data/src/10.2/sql/session_tracker.cc:1325
      #9  0x00005605518144e9 in Session_tracker::store (this=0x7f54ac005fc0, thd=0x7f54ac000af0, buf=0x7f54bea50110) at /data/src/10.2/sql/session_tracker.cc:1688
      #10 0x0000560551807dc8 in net_send_ok (thd=0x7f54ac000af0, server_status=16387, statement_warn_count=0, affected_rows=0, id=0, message=0x7f54ac005ca3 "", is_eof=false, skip_flush=false) at /data/src/10.2/sql/protocol.cc:282
      #11 0x00005605518088c1 in Protocol::send_ok (this=0x7f54ac0010a8, server_status=16387, statement_warn_count=0, affected_rows=0, last_insert_id=0, message=0x7f54ac005ca3 "", skip_flush=false) at /data/src/10.2/sql/protocol.cc:623
      #12 0x00005605518087c3 in Protocol::end_statement (this=0x7f54ac0010a8) at /data/src/10.2/sql/protocol.cc:592
      #13 0x00005605518e1b5e in dispatch_command (command=COM_QUERY, thd=0x7f54ac000af0, packet=0x7f54ac08ccd1 "START TRANSACTION", packet_length=17, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:2380
      #14 0x00005605518deb14 in do_command (thd=0x7f54ac000af0) at /data/src/10.2/sql/sql_parse.cc:1377
      #15 0x0000560551a34aef in do_handle_one_connection (connect=0x560554156080) at /data/src/10.2/sql/sql_connect.cc:1336
      #16 0x0000560551a3485a in handle_one_connection (arg=0x560554156080) at /data/src/10.2/sql/sql_connect.cc:1241
      #17 0x000056055224af12 in pfs_spawn_thread (arg=0x5605540a2d90) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #18 0x00007f54c66a54a4 in start_thread (arg=0x7f54bea51700) at pthread_create.c:456
      #19 0x00007f54c47d9d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Attachments

        Activity

          Roel Roel Van de Paar added a comment - - edited

          Ran into this one also. Same unique bug id.

          SET SESSION_TRACK_TRANSACTION_INFO=CHARACTERISTICS;
          SET SESSION COLLATION_DATABASE=utf32_general_ci;
          SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
          START TRANSACTION WITH CONSISTENT SNAPSHOT;
          

          Leads to:

          10.5.6 c5517cd86440b6669509211b1ad10f837a929952 (Debug)

          mysqld: /test/10.5_dbg/sql/session_tracker.cc:960: virtual bool Transaction_state_tracker::store(THD*, String*): Assertion `length < 249' failed.
          

          10.5.6 c5517cd86440b6669509211b1ad10f837a929952 (Debug)

          Core was generated by `/test/MD080920-mariadb-10.5.6-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
          Program terminated with signal SIGABRT, Aborted.
          #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
              at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
          [Current thread is 1 (Thread 0x14c06f9d8700 (LWP 2498319))]
          (gdb) bt
          #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
          #1  0x00005603a96754e8 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
          #2  0x00005603a8e3c56b in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
          #3  <signal handler called>
          #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
          #5  0x000014c06dc6e8b1 in __GI_abort () at abort.c:79
          #6  0x000014c06dc5e42a in __assert_fail_base (fmt=0x14c06dde5a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5603a97cf4a3 "length < 249", file=file@entry=0x5603a97cf530 "/test/10.5_dbg/sql/session_tracker.cc", line=line@entry=960, function=function@entry=0x5603a97cf980 <Transaction_state_tracker::store(THD*, String*)::__PRETTY_FUNCTION__> "virtual bool Transaction_state_tracker::store(THD*, String*)") at assert.c:92
          #7  0x000014c06dc5e4a2 in __GI___assert_fail (assertion=assertion@entry=0x5603a97cf4a3 "length < 249", file=file@entry=0x5603a97cf530 "/test/10.5_dbg/sql/session_tracker.cc", line=line@entry=960, function=function@entry=0x5603a97cf980 <Transaction_state_tracker::store(THD*, String*)::__PRETTY_FUNCTION__> "virtual bool Transaction_state_tracker::store(THD*, String*)") at assert.c:101
          #8  0x00005603a8a9e2bd in Transaction_state_tracker::store (this=0x14c04b41b088, thd=<optimized out>, buf=0x14c06f9d6d60) at /test/10.5_dbg/sql/session_tracker.cc:960
          #9  0x00005603a8aa01f3 in Session_tracker::store (this=this@entry=0x14c04b41b048, thd=thd@entry=0x14c04b415088, buf=buf@entry=0x14c06f9d6d60) at /test/10.5_dbg/sql/session_tracker.cc:1270
          #10 0x00005603a8a96120 in Protocol::net_send_ok (this=<optimized out>, thd=0x14c04b415088, server_status=<optimized out>, statement_warn_count=0, affected_rows=<optimized out>, id=<optimized out>, message=<optimized out>, is_eof=false, skip_flush=false) at /test/10.5_dbg/sql/protocol.cc:281
          #11 0x00005603a8a94c30 in Protocol::send_ok (this=0x14c04b415650, server_status=16387, statement_warn_count=0, affected_rows=0, last_insert_id=0, message=0x14c04b41ad2b "", skip_flush=false) at /test/10.5_dbg/sql/protocol.cc:642
          #12 0x00005603a8a96801 in Protocol::end_statement (this=0x14c04b415650) at /test/10.5_dbg/sql/protocol.cc:605
          #13 0x00005603a8b84f7c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c04b415088, packet=<optimized out>, packet@entry=0x14c04b467089 "START TRANSACTION WITH CONSISTENT SNAPSHOT", packet_length=<optimized out>, packet_length@entry=42, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:2460
          #14 0x00005603a8b816d2 in do_command (thd=0x14c04b415088) at /test/10.5_dbg/sql/sql_parse.cc:1348
          #15 0x00005603a8ce0a27 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14c04e8d4808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1410
          #16 0x00005603a8ce114b in handle_one_connection (arg=arg@entry=0x14c04e8d4808) at /test/10.5_dbg/sql/sql_connect.cc:1312
          #17 0x00005603a914b784 in pfs_spawn_thread (arg=0x14c06c846508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
          #18 0x000014c06e9516db in start_thread (arg=0x14c06f9d8700) at pthread_create.c:463
          #19 0x000014c06dd4fa3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
          

          Bug confirmed present in:
          MariaDB: 10.2.34 (dbg), 10.3.25 (dbg), 10.4.15 (dbg), 10.5.6 (dbg)

          Bug confirmed not present in:
          MariaDB: 10.1.47 (dbg), 10.1.47 (opt), 10.2.34 (opt), 10.3.25 (opt), 10.4.15 (opt), 10.5.6 (opt)
          MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

          Roel Roel Van de Paar added a comment - - edited Ran into this one also. Same unique bug id. SET SESSION_TRACK_TRANSACTION_INFO=CHARACTERISTICS; SET SESSION COLLATION_DATABASE=utf32_general_ci; SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; START TRANSACTION WITH CONSISTENT SNAPSHOT; Leads to: 10.5.6 c5517cd86440b6669509211b1ad10f837a929952 (Debug) mysqld: /test/10.5_dbg/sql/session_tracker.cc:960: virtual bool Transaction_state_tracker::store(THD*, String*): Assertion `length < 249' failed. 10.5.6 c5517cd86440b6669509211b1ad10f837a929952 (Debug) Core was generated by `/test/MD080920-mariadb-10.5.6-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 [Current thread is 1 (Thread 0x14c06f9d8700 (LWP 2498319))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x00005603a96754e8 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424 #2 0x00005603a8e3c56b in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x000014c06dc6e8b1 in __GI_abort () at abort.c:79 #6 0x000014c06dc5e42a in __assert_fail_base (fmt=0x14c06dde5a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5603a97cf4a3 "length < 249", file=file@entry=0x5603a97cf530 "/test/10.5_dbg/sql/session_tracker.cc", line=line@entry=960, function=function@entry=0x5603a97cf980 <Transaction_state_tracker::store(THD*, String*)::__PRETTY_FUNCTION__> "virtual bool Transaction_state_tracker::store(THD*, String*)") at assert.c:92 #7 0x000014c06dc5e4a2 in __GI___assert_fail (assertion=assertion@entry=0x5603a97cf4a3 "length < 249", file=file@entry=0x5603a97cf530 "/test/10.5_dbg/sql/session_tracker.cc", line=line@entry=960, function=function@entry=0x5603a97cf980 <Transaction_state_tracker::store(THD*, String*)::__PRETTY_FUNCTION__> "virtual bool Transaction_state_tracker::store(THD*, String*)") at assert.c:101 #8 0x00005603a8a9e2bd in Transaction_state_tracker::store (this=0x14c04b41b088, thd=<optimized out>, buf=0x14c06f9d6d60) at /test/10.5_dbg/sql/session_tracker.cc:960 #9 0x00005603a8aa01f3 in Session_tracker::store (this=this@entry=0x14c04b41b048, thd=thd@entry=0x14c04b415088, buf=buf@entry=0x14c06f9d6d60) at /test/10.5_dbg/sql/session_tracker.cc:1270 #10 0x00005603a8a96120 in Protocol::net_send_ok (this=<optimized out>, thd=0x14c04b415088, server_status=<optimized out>, statement_warn_count=0, affected_rows=<optimized out>, id=<optimized out>, message=<optimized out>, is_eof=false, skip_flush=false) at /test/10.5_dbg/sql/protocol.cc:281 #11 0x00005603a8a94c30 in Protocol::send_ok (this=0x14c04b415650, server_status=16387, statement_warn_count=0, affected_rows=0, last_insert_id=0, message=0x14c04b41ad2b "", skip_flush=false) at /test/10.5_dbg/sql/protocol.cc:642 #12 0x00005603a8a96801 in Protocol::end_statement (this=0x14c04b415650) at /test/10.5_dbg/sql/protocol.cc:605 #13 0x00005603a8b84f7c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c04b415088, packet=<optimized out>, packet@entry=0x14c04b467089 "START TRANSACTION WITH CONSISTENT SNAPSHOT", packet_length=<optimized out>, packet_length@entry=42, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:2460 #14 0x00005603a8b816d2 in do_command (thd=0x14c04b415088) at /test/10.5_dbg/sql/sql_parse.cc:1348 #15 0x00005603a8ce0a27 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14c04e8d4808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1410 #16 0x00005603a8ce114b in handle_one_connection (arg=arg@entry=0x14c04e8d4808) at /test/10.5_dbg/sql/sql_connect.cc:1312 #17 0x00005603a914b784 in pfs_spawn_thread (arg=0x14c06c846508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201 #18 0x000014c06e9516db in start_thread (arg=0x14c06f9d8700) at pthread_create.c:463 #19 0x000014c06dd4fa3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.2.34 (dbg), 10.3.25 (dbg), 10.4.15 (dbg), 10.5.6 (dbg) Bug confirmed not present in: MariaDB: 10.1.47 (dbg), 10.1.47 (opt), 10.2.34 (opt), 10.3.25 (opt), 10.4.15 (opt), 10.5.6 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

          People

            bar Alexander Barkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.