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

SIGSEGV in my_scan_weight_utf8mb3_bin

    XMLWordPrintable

Details

    Description

      I am seeing this stack with some regularity during MDEV-31788 testing:

      CS 10.5.26 13ca1ce565c38ab41a6979a5d331efe78d840db1 (Optimized)

      Core was generated by `/test/MDEV31788_MD020724-mariadb-10.5.26-linux-x86_64-opt/bin/mariadbd --no-def'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  my_scan_weight_utf8mb3_bin (end=0x17 <error: Cannot access memory at address 0x17>, str=0xf <error: Cannot access memory at address 0xf>, weight=<synthetic pointer>)at /test/bb-10.5-mdev-31788_opt/strings/strcoll.inl:99
       
      [Current thread is 1 (LWP 2301109)]
      (gdb) bt
      #0  my_scan_weight_utf8mb3_bin (end=0x17 <error: Cannot access memory at address 0x17>, str=0xf <error: Cannot access memory at address 0xf>, weight=<synthetic pointer>)at /test/bb-10.5-mdev-31788_opt/strings/strcoll.inl:99
      #1  my_scan_weight_utf8mb3_bin (end=0x17 <error: Cannot access memory at address 0x17>, str=0xf <error: Cannot access memory at address 0xf>, weight=<synthetic pointer>)at /test/bb-10.5-mdev-31788_opt/strings/strcoll.inl:90
      #2  my_strnncoll_utf8mb3_bin (cs=<optimized out>, a=0x1542a82da678 "./test/t", a_length=<optimized out>, b=0xf <error: Cannot access memory at address 0xf>, b_length=<optimized out>, b_is_prefix=0 '\000')at /test/bb-10.5-mdev-31788_opt/strings/strcoll.inl:185
      #3  0x00005628f702f730 in hashcmp (pos=0x1542a8304a98, pos=0x1542a8304a98, length=0, key=0xf <error: Cannot access memory at address 0xf>, hash=0x1542a8292f28) at /test/bb-10.5-mdev-31788_opt/mysys/hash.c:374
      #4  my_hash_first_from_hash_value (hash=0x1542a8292f28, hash_value=<optimized out>, key=0xf <error: Cannot access memory at address 0xf>, length=0, current_record=current_record@entry=0x1543481204ac)at /test/bb-10.5-mdev-31788_opt/mysys/hash.c:289
      #5  0x00005628f702f795 in my_hash_search_using_hash_value (hash=<optimized out>, hash_value=<optimized out>, key=<optimized out>, length=<optimized out>) at /test/bb-10.5-mdev-31788_opt/mysys/hash.c:245
      #6  0x0000154334877f89 in spider_conn_queue_and_merge_loop_check (conn=conn@entry=0x1542a82927a8, lcptr=lcptr@entry=0x1542a8275598)at /test/bb-10.5-mdev-31788_opt/storage/spider/spd_conn.cc:1073
      #7  0x00001543348784dd in spider_conn_reset_queue_loop_check (conn=conn@entry=0x1542a82927a8)at /test/bb-10.5-mdev-31788_opt/storage/spider/spd_conn.cc:1194
      #8  0x000015433487876d in spider_reset_conn_setted_parameter (conn=conn@entry=0x1542a82927a8, thd=thd@entry=0x1542a8000c68)at /test/bb-10.5-mdev-31788_opt/storage/spider/spd_conn.cc:262
      #9  0x00001543348642eb in spider_db_connect (share=share@entry=0x1542a83e4af8, conn=conn@entry=0x1542a82927a8, link_idx=link_idx@entry=0)at /test/bb-10.5-mdev-31788_opt/storage/spider/spd_db_conn.cc:118
      #10 0x000015433486456a in spider_db_ping_internal (share=0x1542a83e4af8, conn=conn@entry=0x1542a82927a8, all_link_idx=0, need_mon=<optimized out>)at /test/bb-10.5-mdev-31788_opt/storage/spider/spd_db_conn.cc:172
      #11 0x0000154334864638 in spider_db_ping (spider=<optimized out>, conn=conn@entry=0x1542a82927a8, link_idx=link_idx@entry=0)at /test/bb-10.5-mdev-31788_opt/storage/spider/spd_db_conn.cc:215
      #12 0x00001543348cf13f in spider_mbase_handler::show_table_status (this=0x1542a824a730, link_idx=<optimized out>, sts_mode=1, flag=<optimized out>)at /test/bb-10.5-mdev-31788_opt/storage/spider/spd_db_mysql.cc:12782
      #13 0x0000154334890826 in spider_get_sts (share=share@entry=0x1542a83e4af8, link_idx=0, tmp_time=1720032891, spider=spider@entry=0x1542a8009530, sts_interval=sts_interval@entry=10, sts_mode=1, sts_sync=0, sts_sync_level=1, flag=88)at /test/bb-10.5-mdev-31788_opt/storage/spider/spd_table.cc:6813
      #14 0x000015433489b1b2 in spider_get_share (table_name=table_name@entry=0x1542a808a2f0 "./test/articles", table=<optimized out>, thd=thd@entry=0x1542a8000c68, spider=spider@entry=0x1542a8009530, error_num=error_num@entry=0x154348120a50)at /test/bb-10.5-mdev-31788_opt/storage/spider/spd_table.cc:4726
      #15 0x00001543348bbb86 in ha_spider::open (this=0x1542a8009530, name=0x1542a808a2f0 "./test/articles", mode=<optimized out>, test_if_locked=<optimized out>)at /test/bb-10.5-mdev-31788_opt/storage/spider/ha_spider.cc:358
      #16 0x00005628f6a64a16 in handler::ha_open (this=0x1542a8009530, table_arg=table_arg@entry=0x1542a827b368, name=0x1542a808a2f0 "./test/articles", mode=mode@entry=2, test_if_locked=test_if_locked@entry=18, mem_root=mem_root@entry=0x0, partitions_to_open=0x0) at /test/bb-10.5-mdev-31788_opt/sql/handler.cc:3087
      #17 0x00005628f69042d3 in open_table_from_share (thd=thd@entry=0x1542a8000c68, share=share@entry=0x1542a8089e50, alias=alias@entry=0x1542a8010d00, db_stat=db_stat@entry=33, prgflag=prgflag@entry=8, ha_open_flags=18, outparam=0x1542a827b368, is_create_table=false, partitions_to_open=0x0)at /test/bb-10.5-mdev-31788_opt/sql/table.cc:4319
      #18 0x00005628f67b196c in open_table (thd=thd@entry=0x1542a8000c68, table_list=table_list@entry=0x1542a8010cb8, ot_ctx=ot_ctx@entry=0x1543481212f0)at /test/bb-10.5-mdev-31788_opt/sql/sql_base.cc:2024
      #19 0x00005628f67b4f52 in open_and_process_table (ot_ctx=0x1543481212f0, has_prelocking_list=false, prelocking_strategy=0x1543481213e0, flags=0, counter=0x15434812138c, tables=0x1542a8010cb8, thd=0x1542a8000c68)at /test/bb-10.5-mdev-31788_opt/sql/sql_base.cc:3819
      #20 open_tables (thd=thd@entry=0x1542a8000c68, options=@0x1542a80061b8: {m_options = DDL_options_st::OPT_NONE}, start=start@entry=0x154348121378, counter=counter@entry=0x15434812138c, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x1543481213e0)at /test/bb-10.5-mdev-31788_opt/sql/sql_base.cc:4303
      #21 0x00005628f67b5c1a in open_and_lock_tables (thd=thd@entry=0x1542a8000c68, options=<optimized out>, tables=<optimized out>, tables@entry=0x1542a8010cb8, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x1543481213e0)at /test/bb-10.5-mdev-31788_opt/sql/sql_base.cc:5250
      #22 0x00005628f6814461 in open_and_lock_tables (flags=0, derived=true, tables=0x1542a8010cb8, thd=0x1542a8000c68)at /test/bb-10.5-mdev-31788_opt/sql/sql_base.h:509
      #23 execute_sqlcom_select (thd=thd@entry=0x1542a8000c68, all_tables=0x1542a8010cb8)at /test/bb-10.5-mdev-31788_opt/sql/sql_parse.cc:6346
      #24 0x00005628f6823f4d in mysql_execute_command (thd=thd@entry=0x1542a8000c68)at /test/bb-10.5-mdev-31788_opt/sql/sql_parse.cc:4030
      #25 0x00005628f6825993 in mysql_parse (thd=0x1542a8000c68, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>)at /test/bb-10.5-mdev-31788_opt/sql/sql_parse.cc:8221
      #26 0x00005628f6828635 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1542a8000c68, packet=packet@entry=0x1542a846faf9 "SELECT * FROM articles WHERE MATCH(title,body) AGAINST(\"+where +(show what)\" IN BOOLEAN MODE);", packet_length=packet_length@entry=142, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/bb-10.5-mdev-31788_opt/sql/sql_parse.cc:1993
      #27 0x00005628f682a800 in do_command (thd=0x1542a8000c68)at /test/bb-10.5-mdev-31788_opt/sql/sql_parse.cc:1376
      #28 0x00005628f69350b1 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5628f977bea8, put_in_cache=put_in_cache@entry=true)at /test/bb-10.5-mdev-31788_opt/sql/sql_connect.cc:1417
      #29 0x00005628f693553d in handle_one_connection (arg=arg@entry=0x5628f977bea8)at /test/bb-10.5-mdev-31788_opt/sql/sql_connect.cc:1319
      #30 0x00005628f6cead82 in pfs_spawn_thread (arg=0x5628f96e8c08)at /test/bb-10.5-mdev-31788_opt/storage/perfschema/pfs.cc:2201
      #31 0x000015434a897ada in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:492
      Backtrace stopped: previous frame inner to this frame (corrupt stack?)
      

      While seen with some regularity, as the issue is highly sporadic it is challeging to reduce.

      The issue at first glance does not look to be MDEV-31788 related. And though it has not reproduced in base 10.5/10.6 even once (despite many attempts), it has reproduced in the bb-10.6-mdev-31788 branch at revision 5b26a07698b92f58e5d1f55c7929b0e25d1a586b, which is the last commit just before the various mdev-31788 patches, and thus any connection with MDEV-31788 is excluded.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Roel Roel Van de Paar
            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.