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

Server crashes in oqgraph3::intrusive_ptr_release upon query with ORDER BY

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      install soname 'ha_oqgraph';
       
      CREATE TABLE oq_backing (
        origid INT UNSIGNED NOT NULL, 
        destid INT UNSIGNED NOT NULL,  
        PRIMARY KEY (origid, destid), 
        KEY (destid)
      ) engine=InnoDB;
       
      INSERT INTO oq_backing(origid, destid) 
       VALUES (1,2), (2,3), (3,4), (4,5), (2,6), (5,6);
       
      CREATE TABLE oq_graph (
        latch VARCHAR(32) NULL,
        origid BIGINT UNSIGNED NULL,
        destid BIGINT UNSIGNED NULL,
        weight DOUBLE NULL,
        seq BIGINT UNSIGNED NULL,
        linkid BIGINT UNSIGNED NULL,
        KEY (latch, origid, destid) USING HASH,
        KEY (latch, destid, origid) USING HASH
      ) 
      ENGINE=OQGRAPH 
      data_table='oq_backing' origid='origid' destid='destid';
       
      SELECT * FROM oq_graph ORDER BY destid;
      

      10.2 5d57e04b

      #3  <signal handler called>
      #4  0x00007fa7b137c807 in oqgraph3::intrusive_ptr_release (ptr=0xa5a5a5a5a5a5a5a5) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/storage/oqgraph/oqgraph_thunk.h:132
      #5  0x00007fa7b137ec9d in boost::intrusive_ptr<oqgraph3::cursor>::~intrusive_ptr (this=0x7fa7b13f9a88, __in_chrg=<optimized out>) at /usr/include/boost/smart_ptr/intrusive_ptr.hpp:98
      #6  0x00007fa7b137ed6e in boost::intrusive_ptr<oqgraph3::cursor>::operator= (this=0x7fa75c187a58, rhs=...) at /usr/include/boost/smart_ptr/intrusive_ptr.hpp:154
      #7  0x00007fa7b137c6df in oqgraph3::cursor_ptr::operator= (this=0x7fa75c187a58) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/storage/oqgraph/oqgraph_thunk.h:57
      #8  0x00007fa7b137e149 in oqgraph3::edge_info::operator= (this=0x7fa75c187a58) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/storage/oqgraph/oqgraph_thunk.h:67
      #9  0x00007fa7b137e1a9 in open_query::reference::operator= (this=0x7fa75c187a48, ref=...) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/storage/oqgraph/graphcore.cc:155
      #10 0x00007fa7b137e9af in open_query::edges_cursor::current (this=0x7fa75c008170, ref=...) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/storage/oqgraph/graphcore.cc:327
      #11 0x00007fa7b137b38f in open_query::oqgraph::row_ref (this=0x7fa75c02adb0, ref_ptr=0x7fa75c187a48) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/storage/oqgraph/graphcore.cc:974
      #12 0x00007fa7b1376a5c in ha_oqgraph::position (this=0x7fa75c08aad8, record=0x7fa75c1876e8 "\361") at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/storage/oqgraph/ha_oqgraph.cc:1114
      #13 0x0000564314386612 in find_all_keys (thd=0x7fa75c000d90, param=0x7fa7b13f9e00, select=0x7fa75c0150d0, fs_info=0x7fa75c189660, buffpek_pointers=0x7fa7b13fa000, tempfile=0x7fa7b13f9e90, pq=0x0, found_rows=0x7fa75c189840) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/filesort.cc:814
      #14 0x0000564314384a49 in filesort (thd=0x7fa75c000d90, table=0x7fa75c098660, filesort=0x7fa75c0152a0, tracker=0x7fa75c015938, join=0x7fa75c012de8, first_table_bit=1) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/filesort.cc:275
      #15 0x0000564314187ee5 in create_sort_index (thd=0x7fa75c000d90, join=0x7fa75c012de8, tab=0x7fa75c014780, fsort=0x7fa75c0152a0) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_select.cc:22132
      #16 0x00005643141824b7 in st_join_table::sort_table (this=0x7fa75c014780) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_select.cc:19874
      #17 0x0000564314182103 in join_init_read_record (tab=0x7fa75c014780) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_select.cc:19815
      #18 0x000056431417ff6a in sub_select (join=0x7fa75c012de8, join_tab=0x7fa75c014780, end_of_records=false) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_select.cc:18899
      #19 0x000056431417f520 in do_select (join=0x7fa75c012de8, procedure=0x0) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_select.cc:18445
      #20 0x0000564314158f71 in JOIN::exec_inner (this=0x7fa75c012de8) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_select.cc:3651
      #21 0x0000564314158418 in JOIN::exec (this=0x7fa75c012de8) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_select.cc:3446
      #22 0x00005643141595f2 in mysql_select (thd=0x7fa75c000d90, tables=0x7fa75c012568, wild_num=1, fields=..., conds=0x0, og_num=1, order=0x7fa75c012ca8, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fa75c012dc8, unit=0x7fa75c0047f0, select_lex=0x7fa75c004f40) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_select.cc:3849
      #23 0x000056431414d745 in handle_select (thd=0x7fa75c000d90, lex=0x7fa75c004730, result=0x7fa75c012dc8, setup_tables_done_option=0) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_select.cc:361
      #24 0x0000564314118a7e in execute_sqlcom_select (thd=0x7fa75c000d90, all_tables=0x7fa75c012568) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_parse.cc:6271
      #25 0x000056431410f5f2 in mysql_execute_command (thd=0x7fa75c000d90) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_parse.cc:3582
      #26 0x000056431411c75a in mysql_parse (thd=0x7fa75c000d90, rawbuf=0x7fa75c012358 "SELECT * FROM oq_graph ORDER BY destid", length=38, parser_state=0x7fa7b13fb5b0, is_com_multi=false, is_next_command=false) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_parse.cc:7793
      #27 0x000056431410ab95 in dispatch_command (command=COM_QUERY, thd=0x7fa75c000d90, packet=0x7fa75c0089c1 "", packet_length=38, is_com_multi=false, is_next_command=false) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_parse.cc:1827
      #28 0x0000564314109704 in do_command (thd=0x7fa75c000d90) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_parse.cc:1381
      #29 0x0000564314261726 in do_handle_one_connection (connect=0x56431663f910) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_connect.cc:1336
      #30 0x000056431426148b in handle_one_connection (arg=0x56431663f910) at /home/jenkins/workspace/sandbox-elenst/Reproduce/buildtype/Debug/node/ubuntu-2004-amd64-build/version/10.2/src/sql/sql_connect.cc:1241
      #31 0x00007fa7b34b7609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #32 0x00007fa7b3092293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            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.