[MDEV-27231] Spider: SIGSEGV in spider_db_bulk_insert on INSERT DELAYED Created: 2021-12-12  Updated: 2022-06-28  Resolved: 2022-06-28

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.5, 10.6, 10.7, 10.8
Fix Version/s: 10.5.17, 10.6.9, 10.7.5, 10.8.4, 10.9.2

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Nayuta Yanagisawa (Inactive)
Resolution: Fixed Votes: 0
Labels: not-10.2, not-10.3, not-10.4, regression-10.5, spider

Issue Links:
Relates
relates to MDEV-26582 SIGSEGV in spider_db_bulk_insert and ... Closed
relates to MDEV-28764 SIGSEGV in spider_db_set_names_intern... Open
relates to MDEV-26583 SIGSEGV's in spider_get_select_limit_... Closed

 Description   

Another INSERT DELAYED bug/stack in combination with Spider. This one is a regression in 10.5. Does not look to be sporadic, though could be due to the DELAYED.

INSTALL PLUGIN spider SONAME 'ha_spider.so';
SET sql_mode='';
CREATE TABLE t (a INT) ENGINE=SPIDER;
INSERT DELAYED INTO t VALUES (1);
INSERT DELAYED INTO t VALUES (1);
SELECT 1;  # Shows server is gone

Leads to:

10.7.2 06988bdcaa2d1af2c178c199b7f65dbafda45a2c (Debug)

Core was generated by `/test/MD121121-mariadb-10.7.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000148d7c81d1e3 in spider_db_bulk_insert (
    spider=spider@entry=0x148cf4004d70, table=0x148cf4004498, 
    copy_info=copy_info@entry=0x148cf4005160, bulk_end=bulk_end@entry=false)
    at /test/10.7_dbg/storage/spider/spd_db_conn.cc:6714
[Current thread is 1 (Thread 0x148d900ea700 (LWP 2786829))]
(gdb) bt
#0  0x0000148d7c81d1e3 in spider_db_bulk_insert (spider=spider@entry=0x148cf4004d70, table=0x148cf4004498, copy_info=copy_info@entry=0x148cf4005160, bulk_end=bulk_end@entry=false) at /test/10.7_dbg/storage/spider/spd_db_conn.cc:6714
#1  0x0000148d7c8aa51c in ha_spider::write_row (this=0x148cf4004d70, buf=0x148cf40048e8 "\375\001") at /test/10.7_dbg/storage/spider/ha_spider.cc:10039
#2  0x000055d4476d2559 in handler::ha_write_row (this=0x148cf4004d70, buf=0x148cf40048e8 "\375\001") at /test/10.7_dbg/sql/handler.cc:7516
#3  0x000055d447371eee in write_record (thd=thd@entry=0x148d4c07c768, table=0x148cf4004498, info=info@entry=0x148d4c083508, sink=sink@entry=0x0) at /test/10.7_dbg/sql/sql_insert.cc:2156
#4  0x000055d4473749c0 in Delayed_insert::handle_inserts (this=this@entry=0x148d4c07c748) at /test/10.7_dbg/sql/sql_insert.cc:3597
#5  0x000055d447376439 in handle_delayed_insert (arg=arg@entry=0x148d4c07c748) at /test/10.7_dbg/sql/sql_insert.cc:3337
#6  0x000055d4479bb4ca in pfs_spawn_thread (arg=0x55d44ad00a18) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
#7  0x0000148d92e22609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#8  0x0000148d92a10293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Bug confirmed present in:
MariaDB: 10.5.14 (dbg), 10.6.6 (dbg), 10.7.2 (dbg), 10.8.0 (dbg)

Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.2.42 (dbg), 10.2.42 (opt), 10.3.33 (dbg), 10.3.33 (opt), 10.4.23 (dbg), 10.4.23 (opt), 10.5.14 (opt), 10.6.6 (opt), 10.7.2 (opt), 10.8.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.36 (dbg), 5.7.36 (opt), 8.0.27 (dbg), 8.0.27 (opt)



 Comments   
Comment by Nayuta Yanagisawa (Inactive) [ 2022-06-28 ]

INSERT DELAYED is no longer allowed on Spider tables because of MDEV-28854.

Generated at Thu Feb 08 09:51:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.