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

Got error 12701 when reading table

    XMLWordPrintable

Details

    • Unexpected results

    Description

      The following is obsolete, see https://jira.mariadb.org/browse/MDEV-37828?focusedCommentId=289062&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-289062 for the current bug description.

      While present in ES and CS, the outcome in ES is different.

      INSTALL PLUGIN Spider SONAME 'ha_spider.so';
      CREATE TABLE t (i INT) ENGINE=Spider;
      HANDLER t OPEN;
      HANDLER t READ FIRST;
      HANDLER t READ FIRST;
      

      Will crash ES 11.4 with:

      SIGSEGV|ha_spider::append_select_sql_part|spider_db_append_select|ha_spider::rnd_next_internal|ha_spider::rnd_next
      

      Full stack:

      ES 11.4.2-1 97f04821b26e5d6660c1a6401996b8eec51b131c (Debug)

      Core was generated by `/test/EMD230724-mariadb-11.4.2-1-linux-x86_64-dbg/bin/mariadbd --no-defaults --'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000153ee056aee2 in ha_spider::append_select_sql_part (this=this@entry=0x153e80050d90, sql_type=sql_type@entry=1)at /test/11.4-enterprise_dbg/storage/spider/ha_spider.cc:10415
      10415	    conns[roop_count]->db_conn->update_query_utility(share->dbton_share[dbton_id]);
      [Current thread is 1 (LWP 3336684)]
      (gdb) bt
      #0  0x0000153ee056aee2 in ha_spider::append_select_sql_part (this=this@entry=0x153e80050d90, sql_type=sql_type@entry=1)at /test/11.4-enterprise_dbg/storage/spider/ha_spider.cc:10415
      #1  0x0000153ee050d5d0 in spider_db_append_select (spider=spider@entry=0x153e80050d90)at /test/11.4-enterprise_dbg/storage/spider/spd_db_conn.cc:1353
      #2  0x0000153ee05709ea in ha_spider::rnd_next_internal (this=this@entry=0x153e80050d90, buf=buf@entry=0x153e80353348 "\377")at /test/11.4-enterprise_dbg/storage/spider/ha_spider.cc:5538
      #3  0x0000153ee0571652 in ha_spider::rnd_next (this=0x153e80050d90, buf=0x153e80353348 "\377")at /test/11.4-enterprise_dbg/storage/spider/ha_spider.cc:5827
      #4  0x00005612a2cd3ca1 in handler::ha_rnd_next (this=0x153e80050d90, buf=0x153e80353348 "\377") at /test/11.4-enterprise_dbg/sql/handler.cc:3695
      #5  0x00005612a296c3a8 in mysql_ha_read (thd=thd@entry=0x153e80000d58, tables=tables@entry=0x153e8001aaf0, mode=<optimized out>, keyname=0x0, key_expr=<optimized out>, ha_rkey_mode=HA_READ_KEY_EXACT, cond=0x0, select_limit_cnt=1, offset_limit_cnt=0)at /test/11.4-enterprise_dbg/sql/sql_handler.cc:924
      #6  0x00005612a29ba696 in mysql_execute_command (thd=thd@entry=0x153e80000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.4-enterprise_dbg/sql/sql_limit.h:94
      #7  0x00005612a29bcaa2 in mysql_parse (thd=thd@entry=0x153e80000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x153ee0b68240)at /test/11.4-enterprise_dbg/sql/sql_parse.cc:7890
      #8  0x00005612a29bef34 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153e80000d58, packet=packet@entry=0x153e8000b309 "", packet_length=packet_length@entry=20, blocking=blocking@entry=true)at /test/11.4-enterprise_dbg/sql/sql_class.h:262
      #9  0x00005612a29c1376 in do_command (thd=0x153e80000d58, blocking=blocking@entry=true)at /test/11.4-enterprise_dbg/sql/sql_parse.cc:1413
      #10 0x00005612a2b2aa75 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5612a67a9b18, put_in_cache=put_in_cache@entry=true)at /test/11.4-enterprise_dbg/sql/sql_connect.cc:1437
      #11 0x00005612a2b2ad6a in handle_one_connection (arg=arg@entry=0x5612a67a9b18)at /test/11.4-enterprise_dbg/sql/sql_connect.cc:1339
      #12 0x00005612a2f8bb7e in pfs_spawn_thread (arg=0x5612a672bda8)at /test/11.4-enterprise_dbg/storage/perfschema/pfs.cc:2201
      #13 0x0000153ee1a9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #14 0x0000153ee1b29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      However, on CS it yields:

      SIGSEGV|ha_spider::rnd_next_internal|ha_spider::rnd_next|handler::ha_rnd_next|mysql_ha_read
      

      Which does not look to be related to MENT-1519

      Bug confirmed present in CS:
      MariaDB: 10.11.9 (dbg), 11.1.6 (dbg), 11.1.6 (opt), 11.2.5 (dbg), 11.5.2 (dbg), 11.6.0 (dbg), 11.6.0 (opt)

      Bug (or feature/syntax) confirmed not present in CS:
      MariaDB: 10.5.26 (dbg), 10.5.26 (opt), 10.6.19 (dbg), 10.6.19 (opt), 10.11.9 (opt), 11.2.5 (opt), 11.4.3 (dbg), 11.4.3 (opt), 11.5.2 (opt)

      And confirmed in ES 11.4 as per above stack. regression-10.11 tag is related to CS.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              Roel Roel Van de Paar
              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.