Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 11.1(EOL), 11.2(EOL), 11.4, 11.5(EOL), 11.6(EOL)
-
None
Description
Split from MDEV-32864 as it seems to be a different issue
Original testcase from Roel:
--source include/have_innodb.inc
|
--let $SOCKET= `SELECT @@global.socket`
|
INSTALL PLUGIN Spider SONAME 'ha_spider.so'; |
SET SESSION spider_same_server_link=1; |
CREATE USER spider@localhost IDENTIFIED BY 'pwd'; |
GRANT ALL ON test.* TO spider@localhost; |
eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$SOCKET",DATABASE 'test',USER 'spider',PASSWORD 'pwd'); |
 |
CREATE TABLE tm (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=InnoDB; |
CREATE TABLE t2 (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "tm"'; |
LOCK TABLE t2 READ; |
SHUTDOWN;
|
Leads to:
11.2.5 a21e49cbcc5f4adb1a1b4970ceead6a85e968063 (Debug) |
mariadbd: /test/11.2_dbg/sql/sql_error.cc:457: void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*): Assertion `! is_set() || m_can_overwrite_status' failed.
|
11.2.5 a21e49cbcc5f4adb1a1b4970ceead6a85e968063 (Debug) |
Core was generated by `/test/MD190624-mariadb-11.2.5-linux-x86_64-dbg/bin/mariadbd --defaults-group-su'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
|
Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
|
[Current thread is 1 (LWP 3410952)]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
|
#3 0x000014c61aa42866 in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
|
#4 0x000014c61aa268b7 in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x000014c61aa267db in __assert_fail_base (fmt=0x14c61abc5168 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55e5c6a4f650 "! is_set() || m_can_overwrite_status", file=file@entry=0x55e5c6a4f3c0 "/test/11.2_dbg/sql/sql_error.cc", line=line@entry=457, function=function@entry=0x55e5c6a4f5c8 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at ./assert/assert.c:92
|
#6 0x000014c61aa39186 in __assert_fail (assertion=0x55e5c6a4f650 "! is_set() || m_can_overwrite_status", file=0x55e5c6a4f3c0 "/test/11.2_dbg/sql/sql_error.cc", line=457, function=0x55e5c6a4f5c8 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at ./assert/assert.c:101
|
#7 0x000055e5c5ce32a2 in Diagnostics_area::set_error_status (this=this@entry=0x14c5e0006f40, sql_errno=sql_errno@entry=1160, message=message@entry=0x14c60f0a42a0 "Got an error writing communication packets", sqlstate=sqlstate@entry=0x55e5c6c00274 "08S01", ucid=@0x14c60f0a4090: {m_user_condition_value = 0x0}, error_condition=0x0)at /test/11.2_dbg/sql/sql_error.cc:457
|
#8 0x000055e5c5cc1a0f in THD::raise_condition (this=this@entry=0x14c5e0000d58, cond=cond@entry=0x14c60f0a4080)at /test/11.2_dbg/sql/sql_class.cc:1107
|
#9 0x000055e5c5c0ab04 in THD::raise_condition (this=this@entry=0x14c5e0000d58, sql_errno=sql_errno@entry=1160, sqlstate=sqlstate@entry=0x55e5c6c49888 "", level=<optimized out>, msg=msg@entry=0x14c60f0a42a0 "Got an error writing communication packets")at /test/11.2_dbg/sql/sql_class.h:5020
|
#10 0x000055e5c5bfcaa6 in my_message_sql (error=1160, str=0x14c60f0a42a0 "Got an error writing communication packets", MyFlags=0)at /test/11.2_dbg/sql/mysqld.cc:3393
|
#11 0x000055e5c6826c9e in my_error (nr=1160, MyFlags=0)at /test/11.2_dbg/mysys/my_error.c:124
|
#12 0x000055e5c61d3652 in MYSQL_SERVER_my_error (flags=0, error=1160)at /test/11.2_dbg/sql/net_serv.cc:80
|
#13 net_real_write (net=net@entry=0x14c5e0d17a38, packet=0x14c5e0c8efa8 "\016", len=<optimized out>)at /test/11.2_dbg/sql/net_serv.cc:790
|
#14 0x000055e5c61d3800 in net_flush (net=net@entry=0x14c5e0d17a38)at /test/11.2_dbg/sql/net_serv.cc:411
|
#15 0x000055e5c61d3ca4 in net_write_command (net=net@entry=0x14c5e0d17a38, command=command@entry=3 '\003', header=header@entry=0x0, head_len=head_len@entry=0, packet=packet@entry=0x14c5e0b95c58 "unlock tables", len=len@entry=13)at /test/11.2_dbg/sql/net_serv.cc:561
|
#16 0x000055e5c6003834 in cli_advanced_command (mysql=0x14c5e0d17a38, command=COM_QUERY, header=0x0, header_length=0, arg=0x14c5e0b95c58 "unlock tables", arg_length=13, skip_check=1 '\001', stmt=0x0) at /test/11.2_dbg/sql-common/client.c:503
|
#17 0x000055e5c600129a in server_mysql_send_query (mysql=mysql@entry=0x14c5e0d17a38, query=0x14c5e0b95c58 "unlock tables", length=13) at /test/11.2_dbg/sql-common/client.c:3548
|
#18 0x000055e5c60012e8 in server_mysql_real_query (mysql=0x14c5e0d17a38, query=<optimized out>, length=<optimized out>)at /test/11.2_dbg/sql-common/client.c:3558
|
#19 0x000014c60f0076ca in spider_db_mbase::exec_query (this=0x14c5e0bee0b0, query=0x14c5e0b95c58 "unlock tables", length=13, quick_mode=<optimized out>)at /test/11.2_dbg/storage/spider/spd_db_mysql.cc:2089
|
#20 0x000014c60ef8fd4a in spider_db_query (conn=conn@entry=0x14c5e0ca6248, query=0x14c5e0b95c58 "unlock tables", length=length@entry=13, quick_mode=quick_mode@entry=-1, need_mon=need_mon@entry=0x14c5e02312e8)at /test/11.2_dbg/storage/spider/spd_db_conn.cc:653
|
#21 0x000014c60f0058d1 in spider_mbase_handler::unlock_tables (this=0x14c5e0c75b00, link_idx=<optimized out>)at /test/11.2_dbg/storage/spider/spd_db_mysql.cc:13946
|
#22 0x000014c60ef8a0cf in spider_db_unlock_tables (spider=spider@entry=0x14c5e0bacdb0, link_idx=link_idx@entry=0)at /test/11.2_dbg/storage/spider/spd_db_conn.cc:1282
|
#23 0x000014c60eff2a19 in ha_spider::lock_tables (this=this@entry=0x14c5e0bacdb0)at /test/11.2_dbg/storage/spider/ha_spider.cc:11983
|
#24 0x000014c60eff2cd9 in ha_spider::external_lock (this=0x14c5e0bacdb0, thd=<optimized out>, lock_type=2)at /test/11.2_dbg/storage/spider/ha_spider.cc:919
|
#25 0x000055e5c604b807 in handler::ha_external_lock (this=0x14c5e0bacdb0, thd=thd@entry=0x14c5e0000d58, lock_type=lock_type@entry=2)at /test/11.2_dbg/sql/handler.cc:7427
|
#26 0x000055e5c61acd0e in handler::ha_external_unlock (thd=0x14c5e0000d58, this=<optimized out>) at /test/11.2_dbg/sql/handler.h:3527
|
#27 unlock_external (thd=thd@entry=0x14c5e0000d58, table=0x14c5e0d31a18, count=<optimized out>) at /test/11.2_dbg/sql/lock.cc:744
|
#28 0x000055e5c61acefe in mysql_unlock_tables (thd=0x14c5e0000d58, sql_lock=0x14c5e0d319e8, free_lock=<optimized out>)at /test/11.2_dbg/sql/lock.cc:435
|
#29 0x000055e5c61ad513 in mysql_unlock_tables (thd=thd@entry=0x14c5e0000d58, sql_lock=<optimized out>) at /test/11.2_dbg/sql/lock.cc:418
|
#30 0x000055e5c5ca937d in close_thread_tables (thd=thd@entry=0x14c5e0000d58)at /test/11.2_dbg/sql/sql_base.cc:976
|
#31 0x000055e5c5caa5d8 in Locked_tables_list::unlock_locked_tables (this=this@entry=0x14c5e00050a8, thd=thd@entry=0x14c5e0000d58)at /test/11.2_dbg/sql/sql_base.cc:2639
|
#32 0x000055e5c5cc7a19 in THD::cleanup (this=this@entry=0x14c5e0000d58)at /test/11.2_dbg/sql/sql_class.cc:1539
|
#33 0x000055e5c5bfd6e8 in unlink_thd (thd=0x14c5e0000d58)at /test/11.2_dbg/sql/mysqld.cc:2849
|
#34 0x000055e5c5ea1ca8 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e5c9337478, put_in_cache=put_in_cache@entry=true)at /test/11.2_dbg/sql/sql_connect.cc:1450
|
#35 0x000055e5c5ea1f3e in handle_one_connection (arg=arg@entry=0x55e5c9337478)at /test/11.2_dbg/sql/sql_connect.cc:1341
|
#36 0x000055e5c62f452c in pfs_spawn_thread (arg=0x55e5c92bc948)at /test/11.2_dbg/storage/perfschema/pfs.cc:2201
|
#37 0x000014c61aa97ada in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:444
|
#38 0x000014c61ab2847c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
|
Updated testcase by Yuchen:
--disable_query_log
|
--disable_result_log
|
--source ../../t/test_init.inc
|
--enable_result_log
|
--enable_query_log
|
|
--source include/have_innodb.inc
|
set spider_same_server_link= 1; |
evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql |
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); |
|
SET SESSION spider_same_server_link=1; |
|
CREATE TABLE tm (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=InnoDB; |
CREATE TABLE t2 (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "tm"'; |
LOCK TABLE t2 READ; |
|
# SHUTDOWN;
|
drop server srv; |
|
--disable_query_log
|
--disable_result_log
|
--source ../../t/test_deinit.inc
|
--enable_result_log
|
--enable_query_log |
When Yuchen tested locally using this last testcase (note drop server instead of shutdown), he got a different assertion failure (`!is_set() || (m_status == DA_OK_BULK && is_bulk_op())), happening at drop server. If doing shutdown instead of drop server, then the assertion failure actually does not occur. Tested at 10.5 e7bb9b7c556e91b9ac7ddedf279d5db75d5e3a03.
Attachments
Issue Links
- split from
-
MDEV-32864 Assertion failure during server shutdown after executing SHOW TABLE STATUS on a spider table
- Confirmed