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

Spider: SIGSEGV in ha_spider::index_last_internal on INSERT DELAYED

    XMLWordPrintable

    Details

      Description

      INSTALL PLUGIN spider SONAME 'ha_spider.so';
      CREATE TABLE t (a INT AUTO_INCREMENT KEY,b CHAR(1),c CHAR(1)) ENGINE=Spider;
      INSERT DELAYED IGNORE INTO t VALUES (1);
      INSERT DELAYED INTO t SET b=1;   # Repeat till crash is observed
      

      Leads to:

      10.9.0 ef930dcad58ae6c3f334a32bd63e26c65fd66fa6 (Optimized)

      Core was generated by `/test/MD050422-mariadb-10.9.0-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x000014655010b842 in ha_spider::index_last_internal (
          buf=0x1464040032b0 "", this=0x1464040036c0)
          at /test/10.9_opt/storage/spider/ha_spider.cc:2659
      [Current thread is 1 (Thread 0x14655004e700 (LWP 2439516))]
      (gdb) bt
      #0  0x000014655010b842 in ha_spider::index_last_internal (buf=0x1464040032b0 "", this=0x1464040036c0) at /test/10.9_opt/storage/spider/ha_spider.cc:2659
      #1  ha_spider::index_last_internal (this=0x1464040036c0, buf=0x1464040032b0 "") at /test/10.9_opt/storage/spider/ha_spider.cc:2484
      #2  0x00001465501145a5 in ha_spider::get_auto_increment (this=0x1464040036c0, offset=<optimized out>, increment=1, nb_desired_values=1, first_value=0x14655004dac0, nb_reserved_values=0x14655004dac8) at /test/10.9_opt/storage/spider/ha_spider.cc:8100
      #3  0x000055ba0035a878 in handler::update_auto_increment (this=this@entry=0x1464040036c0) at /test/10.9_opt/sql/handler.cc:3956
      #4  0x00001465501038a6 in ha_spider::update_auto_increment (this=0x1464040036c0) at /test/10.9_opt/storage/spider/ha_spider.cc:8038
      #5  0x0000146550115745 in ha_spider::write_row (this=0x1464040036c0, buf=0x1464040032a8 <incomplete sequence \375>) at /test/10.9_opt/storage/spider/ha_spider.cc:8258
      #6  0x000055ba00360250 in handler::ha_write_row (this=0x1464040036c0, buf=0x1464040032a8 <incomplete sequence \375>) at /test/10.9_opt/sql/handler.cc:7527
      #7  0x000055ba000c650d in write_record (thd=thd@entry=0x14647c05a108, table=0x146404002ec8, info=info@entry=0x14647c060ae8, sink=sink@entry=0x0) at /test/10.9_opt/sql/sql_insert.cc:2156
      #8  0x000055ba000c8f3d in Delayed_insert::handle_inserts (this=0x14647c05a0e8) at /test/10.9_opt/sql/sql_insert.cc:3605
      #9  0x000055ba000d0565 in handle_delayed_insert (arg=arg@entry=0x14647c05a0e8) at /test/10.9_opt/sql/sql_insert.cc:3345
      #10 0x000055ba005a2181 in pfs_spawn_thread (arg=0x55ba02c8aa68) at /test/10.9_opt/storage/perfschema/pfs.cc:2201
      #11 0x000014656f542609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #12 0x000014656f12e163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.9.0 ef930dcad58ae6c3f334a32bd63e26c65fd66fa6 (Debug)

      Core was generated by `/test/MD050422-mariadb-10.9.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000146f37d4e7db in ha_spider::index_last_internal (
          this=this@entry=0x146e60005270, 
          buf=buf@entry=0x146e60004df0 "\245\245\245\245\245\245\245\245@N")
          at /test/10.9_dbg/storage/spider/ha_spider.cc:2657
      [Current thread is 1 (Thread 0x146f3c10c700 (LWP 2440275))]
      (gdb) bt
      #0  0x0000146f37d4e7db in ha_spider::index_last_internal (this=this@entry=0x146e60005270, buf=buf@entry=0x146e60004df0 "\245\245\245\245\245\245\245\245@N") at /test/10.9_dbg/storage/spider/ha_spider.cc:2657
      #1  0x0000146f37d4eae7 in ha_spider::index_last (this=this@entry=0x146e60005270, buf=0x146e60004df0 "\245\245\245\245\245\245\245\245@N") at /test/10.9_dbg/storage/spider/ha_spider.cc:2846
      #2  0x0000146f37d5af64 in ha_spider::get_auto_increment (this=0x146e60005270, offset=<optimized out>, increment=1, nb_desired_values=1, first_value=0x146f3c10b990, nb_reserved_values=0x146f3c10b998) at /test/10.9_dbg/storage/spider/ha_spider.cc:8100
      #3  0x000056158a28e86f in handler::update_auto_increment (this=this@entry=0x146e60005270) at /test/10.9_dbg/sql/handler.cc:3956
      #4  0x0000146f37d41044 in ha_spider::update_auto_increment (this=this@entry=0x146e60005270) at /test/10.9_dbg/storage/spider/ha_spider.cc:8038
      #5  0x0000146f37d5cda9 in ha_spider::write_row (this=0x146e60005270, buf=0x146e60004de8 <incomplete sequence \375>) at /test/10.9_dbg/storage/spider/ha_spider.cc:8258
      #6  0x000056158a29672f in handler::ha_write_row (this=0x146e60005270, buf=0x146e60004de8 <incomplete sequence \375>) at /test/10.9_dbg/sql/handler.cc:7527
      #7  0x0000561589f26728 in write_record (thd=thd@entry=0x146eb807ccf8, table=0x146e60004998, info=info@entry=0x146eb8083aa0, sink=sink@entry=0x0) at /test/10.9_dbg/sql/sql_insert.cc:2156
      #8  0x0000561589f291fa in Delayed_insert::handle_inserts (this=this@entry=0x146eb807ccd8) at /test/10.9_dbg/sql/sql_insert.cc:3605
      #9  0x0000561589f2ad4e in handle_delayed_insert (arg=arg@entry=0x146eb807ccd8) at /test/10.9_dbg/sql/sql_insert.cc:3345
      #10 0x000056158a57d7a5 in pfs_spawn_thread (arg=0x56158ccfc488) at /test/10.9_dbg/storage/perfschema/pfs.cc:2201
      #11 0x0000146f5bedb609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #12 0x0000146f5bac7163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.16 (dbg), 10.5.16 (opt), 10.6.8 (dbg), 10.6.8 (opt), 10.7.4 (dbg), 10.7.4 (opt), 10.8.3 (dbg), 10.8.3 (opt), 10.9.0 (dbg), 10.9.0 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (dbg), 10.3.35 (opt), 10.4.25 (dbg), 10.4.25 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.37 (dbg), 5.7.37 (opt), 8.0.28 (dbg), 8.0.28 (opt)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nayuta-yanagisawa Nayuta Yanagisawa
              Reporter:
              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.