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

Assertion `src' failed in MyCTX::update

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4(EOL)
    • 10.4.6
    • Server
    • None

    Description

      SELECT AES_ENCRYPT(SUBSTR('foo',0), 'qux');
      

      10.4 7d3a759d

      mysqld: /data/src/10.4/mysys_ssl/my_crypt.cc:63: virtual int MyCTX::update(const uchar*, uint, uchar*, uint*): Assertion `src' failed.
      190528 14:27:39 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f0721f2df12 in __GI___assert_fail (assertion=0x558882815e84 "src", file=0x558882815e00 "/data/src/10.4/mysys_ssl/my_crypt.cc", line=63, function=0x558882815f20 <MyCTX::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*)::__PRETTY_FUNCTION__> "virtual int MyCTX::update(const uchar*, uint, uchar*, uint*)") at assert.c:101
      #8  0x00005588823a1e29 in MyCTX::update (this=0x7f071c0fd5d0, src=0x0, slen=0, dst=0x7f071c0fdb38 "\275\320\067\202", dlen=0x7f071c0fd850) at /data/src/10.4/mysys_ssl/my_crypt.cc:63
      #9  0x00005588823a19c5 in my_aes_crypt_update (ctx=0x7f071c0fd5d0, src=0x0, slen=0, dst=0x7f071c0fdb38 "\275\320\067\202", dlen=0x7f071c0fd850) at /data/src/10.4/mysys_ssl/my_crypt.cc:286
      #10 0x00005588823a1ae9 in my_aes_crypt (mode=MY_AES_ECB, flags=1, src=0x0, slen=0, dst=0x7f071c0fdb38 "\275\320\067\202", dlen=0x7f071c0fd8bc, key=0x7f071c0fd8d0 "qux", klen=16, iv=0x0, ivlen=0) at /data/src/10.4/mysys_ssl/my_crypt.cc:305
      #11 0x0000558881c6c717 in Item_aes_crypt::val_str (this=0x7f070c013ac8, str2=0x7f071c0fdad0) at /data/src/10.4/sql/item_strfunc.cc:336
      #12 0x0000558881a89559 in Type_handler::Item_send_str (this=0x558882f06b68 <type_handler_varchar>, item=0x7f070c013ac8, protocol=0x7f070c0010c8, buf=0x7f071c0fdaa0) at /data/src/10.4/sql/sql_type.cc:6737
      #13 0x0000558881a94fe8 in Type_handler_string_result::Item_send (this=0x558882f06b68 <type_handler_varchar>, item=0x7f070c013ac8, protocol=0x7f070c0010c8, buf=0x7f071c0fdaa0) at /data/src/10.4/sql/sql_type.h:4628
      #14 0x0000558881766d8c in Item::send (this=0x7f070c013ac8, protocol=0x7f070c0010c8, buffer=0x7f071c0fdaa0) at /data/src/10.4/sql/item.h:1035
      #15 0x0000558881761a8d in Protocol::send_result_set_row (this=0x7f070c0010c8, row_items=0x7f070c013468) at /data/src/10.4/sql/protocol.cc:1024
      #16 0x000055888180ecb4 in select_send::send_data (this=0x7f070c0144c0, items=...) at /data/src/10.4/sql/sql_class.cc:3002
      #17 0x00005588818cd8bb in JOIN::exec_inner (this=0x7f070c0144e8) at /data/src/10.4/sql/sql_select.cc:4258
      #18 0x00005588818cd1d6 in JOIN::exec (this=0x7f070c0144e8) at /data/src/10.4/sql/sql_select.cc:4172
      #19 0x00005588818ce87b in mysql_select (thd=0x7f070c000b00, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f070c0144c0, unit=0x7f070c004a28, select_lex=0x7f070c013320) at /data/src/10.4/sql/sql_select.cc:4604
      #20 0x00005588818bee6a in handle_select (thd=0x7f070c000b00, lex=0x7f070c004960, result=0x7f070c0144c0, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:424
      #21 0x0000558881888812 in execute_sqlcom_select (thd=0x7f070c000b00, all_tables=0x0) at /data/src/10.4/sql/sql_parse.cc:6605
      #22 0x000055888187da8c in mysql_execute_command (thd=0x7f070c000b00) at /data/src/10.4/sql/sql_parse.cc:3884
      #23 0x000055888188c5a7 in mysql_parse (thd=0x7f070c000b00, rawbuf=0x7f070c013260 "SELECT AES_ENCRYPT(SUBSTR('foo',0), 'qux')", length=42, parser_state=0x7f071c0ff180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8157
      #24 0x0000558881877c83 in dispatch_command (command=COM_QUERY, thd=0x7f070c000b00, packet=0x7f070c008311 "", packet_length=42, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1829
      #25 0x0000558881876441 in do_command (thd=0x7f070c000b00) at /data/src/10.4/sql/sql_parse.cc:1362
      #26 0x00005588819ee411 in do_handle_one_connection (connect=0x558884c4bf10) at /data/src/10.4/sql/sql_connect.cc:1403
      #27 0x00005588819ee175 in handle_one_connection (arg=0x558884c4bf10) at /data/src/10.4/sql/sql_connect.cc:1306
      #28 0x00005588823166ab in pfs_spawn_thread (arg=0x558884c812a0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #29 0x00007f0723aa24a4 in start_thread (arg=0x7f071c100700) at pthread_create.c:456
      #30 0x00007f0721fead0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Not limited to SUBSTR, other functions can be used instead.

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.