[MDEV-31842] Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed on DROP SERVER Created: 2023-08-04  Updated: 2024-01-06

Status: Confirmed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.4, 10.5, 10.6, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Rucha Deodhar
Resolution: Unresolved Votes: 0
Labels: debug


 Description   

CREATE SERVER s FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET'');
BACKUP LOCK t;
DROP SERVER s;

Leads to:

11.1.2 adc13e2c167c90f4b287efa7b1165c68d441be8d (Debug)

mariadbd: /test/11.1_dbg/sql/sql_error.cc:335: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.

11.1.2 adc13e2c167c90f4b287efa7b1165c68d441be8d (Debug)

Core was generated by `/test/MD010823-mariadb-11.1.2-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22590521689664)
    at ./nptl/pthread_kill.c:44
[Current thread is 1 (Thread 0x148bc4054640 (LWP 2144100))]
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22590521689664) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=22590521689664) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=22590521689664, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x0000148bdc642476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x0000148bdc6287f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x0000148bdc62871b in __assert_fail_base (fmt=0x148bdc7dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x555b5ea05fb8 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x555b5ea05e98 "/test/11.1_dbg/sql/sql_error.cc", line=335, function=<optimized out>) at ./assert/assert.c:92
#6  0x0000148bdc639e96 in __GI___assert_fail (assertion=0x555b5ea05fb8 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x555b5ea05e98 "/test/11.1_dbg/sql/sql_error.cc", line=335, function=0x555b5ea05ff0 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at ./assert/assert.c:101
#7  0x0000555b5de93b7b in Diagnostics_area::set_ok_status (this=0x148b24006bb8, affected_rows=affected_rows@entry=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x0) at /test/11.1_dbg/sql/sql_error.cc:335
#8  0x0000555b5dee14f3 in my_ok (message=0x0, id=0, affected_rows_arg=0, thd=0x148b24000d58) at /test/11.1_dbg/sql/sql_class.h:4429
#9  mysql_execute_command (thd=thd@entry=0x148b24000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.1_dbg/sql/sql_parse.cc:5738
#10 0x0000555b5dee2e54 in mysql_parse (thd=thd@entry=0x148b24000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x148bc4053200) at /test/11.1_dbg/sql/sql_parse.cc:7774
#11 0x0000555b5dee4fe8 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x148b24000d58, packet=packet@entry=0x148b2400ae99 "DROP SERVER s", packet_length=packet_length@entry=13, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_class.h:243
#12 0x0000555b5dee6ec3 in do_command (thd=0x148b24000d58, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
#13 0x0000555b5e03ad82 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x555b61fbbf88, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1416
#14 0x0000555b5e03afe1 in handle_one_connection (arg=0x555b61fbbf88) at /test/11.1_dbg/sql/sql_connect.cc:1318
#15 0x0000148bdc694b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#16 0x0000148bdc726a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Bug confirmed present in:
MariaDB: 10.4.31 (dbg), 10.5.22 (dbg), 10.6.15 (dbg), 10.9.8 (dbg), 10.10.6 (dbg), 10.11.5 (dbg), 11.0.3 (dbg), 11.1.2 (dbg), 11.2.0 (dbg)

Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.4.31 (opt), 10.5.22 (opt), 10.6.15 (opt), 10.9.8 (opt), 10.10.6 (opt), 10.11.5 (opt), 11.0.3 (opt), 11.1.2 (opt), 11.2.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.40 (dbg), 8.0.33 (dbg), 8.0.33 (opt)



 Comments   
Comment by Roel Van de Paar [ 2023-11-14 ]

Please also try any patch with:

CREATE SERVER s FOREIGN DATA WRAPPER MYSQL OPTIONS (HOST'');
BACKUP STAGE START;
DROP SERVER s;

Generated at Thu Feb 08 10:26:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.