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

SIGABRT upon executing BINLOG statement

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 12.2
    • 12.2
    • Replication
    • None

    Description

      Feature branch under test main-MDEV-36290.

      MariaDB crashes when executing the following statements:

      CREATE TABLE t1 (a INT,b CHAR,KEY(a));
      CREATE TABLE t2 (b INT,c INT,FOREIGN KEY(b) REFERENCES t1 (a));
      BINLOG ' SOgWTg8CAAAAbgAAAHIAAAAAAAQANS42LjMtbTUtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAABI6BZOEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAAVAYI8=';
      BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA=';
      

      Leads to:

      CS 12.2.0 c0bd9cdf131412fe26fa96d65e896c86208a3c8b (Optimized, Clang 18.1.3-11) Build 25/09/2025

      Core was generated by `/test/MD250925-mariadb-12.2.0-linux-x86_64-opt/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 3832834)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x00000e94a144527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00000e94a14288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00000e94a14297b6 in __libc_message_impl (fmt=fmt@entry=0xe94a15ce8d7 "%s\n") at ../sysdeps/posix/libc_fatal.c:134
      #6  0x00000e94a14a8ff5 in malloc_printerr (str=str@entry=0xe94a15cc672 "free(): invalid pointer")at ./malloc/malloc.c:5772
      #7  0x00000e94a14ab38c in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at ./malloc/malloc.c:4507
      #8  0x00000e94a14addae in __GI___libc_free (mem=0xe9450017ad0)at ./malloc/malloc.c:3398
      #9  0x00005bd3c8b5b1c9 in rpl_group_info::clear_tables_to_lock (this=0xe9450021950) at /test/main-MDEV-36290_opt/sql/rpl_rli.cc:2398
      #10 rpl_group_info::slave_close_thread_tables (this=0xe9450021950, thd=<optimized out>) at /test/main-MDEV-36290_opt/sql/rpl_rli.cc:2445
      #11 0x00005bd3c8b45e4c in mysql_client_binlog_statement (thd=thd@entry=0xe9450000c68)at /test/main-MDEV-36290_opt/sql/sql_binlog.cc:467
      #12 0x00005bd3c8a3bc71 in mysql_execute_command (thd=thd@entry=0xe9450000c68, is_called_from_prepared_stmt=false)at /test/main-MDEV-36290_opt/sql/sql_parse.cc:5772
      #13 0x00005bd3c8a36a21 in mysql_parse (thd=thd@entry=0xe9450000c68, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0xe94a007e420)at /test/main-MDEV-36290_opt/sql/sql_parse.cc:7883
      #14 0x00005bd3c8a34f3f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0xe9450000c68, packet=packet@entry=0xe94500089f9 "BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='", packet_length=packet_length@entry=118, blocking=true)at /test/main-MDEV-36290_opt/sql/sql_parse.cc:1878
      #15 0x00005bd3c8a36e31 in do_command (thd=thd@entry=0xe9450000c68, blocking=true) at /test/main-MDEV-36290_opt/sql/sql_parse.cc:1417
      #16 0x00005bd3c8b6476d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5bd3f72c4468, put_in_cache=true)at /test/main-MDEV-36290_opt/sql/sql_connect.cc:1414
      #17 0x00005bd3c8b6452f in handle_one_connection (arg=arg@entry=0x5bd3f72c4468)at /test/main-MDEV-36290_opt/sql/sql_connect.cc:1326
      #18 0x00005bd3c8f11dc9 in pfs_spawn_thread (arg=0x5bd3f72953b8)at /test/main-MDEV-36290_opt/storage/perfschema/pfs.cc:2198
      #19 0x00000e94a149caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #20 0x00000e94a1529c6c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      error log:

      2025-09-25 13:57:01 4 [ERROR]  BINLOG_BASE64_EVENT: Column 1 of table 'test.t1' cannot be converted from type 'int' to type 'char(4 octets) character set utf8mb4', Internal MariaDB error code: 1677
      free(): invalid pointer
      

      The above crash is not seen on the released builds.

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.6   dbg  240925  e1f12f149c198829e130eacbeddc19dce3f55b3b  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  10.6   opt  240925  e1f12f149c198829e130eacbeddc19dce3f55b3b  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  10.11  dbg  240925  990b44495c6345fa1198d2f7cb61839d1ada97ef  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  10.11  opt  240925  990b44495c6345fa1198d2f7cb61839d1ada97ef  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  11.4   dbg  240925  e8ef8c005545f0163d76077e285c700e2822f533  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  11.4   opt  240925  e8ef8c005545f0163d76077e285c700e2822f533  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  11.8   dbg  240925  d203a8a5df95e2c5778a304a885fb7aedfbc095e  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  11.8   opt  240925  d203a8a5df95e2c5778a304a885fb7aedfbc095e  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  12.1   dbg  240925  667c5e0b002a24bc595d60955950200a588f4fb7  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  12.1   opt  240925  667c5e0b002a24bc595d60955950200a588f4fb7  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  12.2   dbg  240925  b8a77289639a3b10ada64cf892f02b5cecdb1603  MARIADB_ERROR_CODE|MariaDB error code: 1677
      CS  12.2   opt  240925  b8a77289639a3b10ada64cf892f02b5cecdb1603  MARIADB_ERROR_CODE|MariaDB error code: 1677
      ES  10.6   dbg  240925  ed866636069dda51daa8570497926ae43af8aa24  MARIADB_ERROR_CODE|MariaDB error code: 1677
      ES  10.6   opt  240925  ed866636069dda51daa8570497926ae43af8aa24  MARIADB_ERROR_CODE|MariaDB error code: 1677
      ES  11.4   dbg  240925  0ddbffaced6c2b50ef4c6e0d8685b1fa25148875  MARIADB_ERROR_CODE|MariaDB error code: 1677
      ES  11.4   opt  240925  0ddbffaced6c2b50ef4c6e0d8685b1fa25148875  MARIADB_ERROR_CODE|MariaDB error code: 1677
      ES  11.8   dbg  240925  543157202acd67ac9b0bb50e0b35bf7790e5467d  MARIADB_ERROR_CODE|MariaDB error code: 1677
      ES  11.8   opt  240925  543157202acd67ac9b0bb50e0b35bf7790e5467d  MARIADB_ERROR_CODE|MariaDB error code: 1677
      

      The above error can be seen on a single server instance.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              susil.behera Susil Behera
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.