Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4
Description
10.6 535a38c4559160c7a4 |
Version: '10.6.13-MariaDB-debug-log' socket: '/dev/shm/alter/mysql.sock' port: 19300 Source distribution
|
mysqld: /home/angelique/dev/server/storage/innobase/row/row0mysql.cc:2691: dberr_t row_rename_table_for_mysql(const char*, const char*, trx_t*, bool): Assertion `err != DB_DUPLICATE_KEY' failed.
|
230320 14:19:51 [ERROR] mysqld got signal 6 ;
|
This could be because you hit a bug. It is also possible that this binary
|
or one of the libraries it was linked against is corrupt, improperly built,
|
or misconfigured. This error can also be caused by malfunctioning hardware.
|
|
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
|
|
We will try our best to scrape up some info that will hopefully help
|
diagnose the problem, but since we have already crashed,
|
something is definitely wrong and this may fail.
|
|
Server version: 10.6.13-MariaDB-debug-log source revision: 535a38c4559160c7a46f0d9ece52495b83718d45
|
key_buffer_size=134217728
|
read_buffer_size=131072
|
max_used_connections=3
|
max_threads=153
|
thread_count=3
|
It is possible that mysqld could use up to
|
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 468107 K bytes of memory
|
Hope that's ok; if not, decrease some variables in the equation.
|
|
Thread pointer: 0xffff34000dd8
|
Attempting backtrace. You can use the following information to find out
|
where mysqld died. If you see no messages after this, something went
|
terribly wrong...
|
stack_bottom = 0xffff98543508 thread_stack 0x49000
|
mysys/stacktrace.c:215(my_print_stacktrace)[0xaaaaebdcf9e4]
|
sql/signal_handler.cc:238(handle_fatal_signal)[0xaaaaeb48c8c4]
|
addr2line: 'linux-vdso.so.1': No such file
|
linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0xffffb14af7dc]
|
nptl/pthread_kill.c:44(__pthread_kill_implementation)[0xffffb082f200]
|
posix/raise.c:27(__GI_raise)[0xffffb07ea67c]
|
stdlib/abort.c:81(__GI_abort)[0xffffb07d7130]
|
assert/assert.c:89(__assert_fail_base)[0xffffb07e3fd0]
|
assert/assert-perr.c:31(__GI___assert_perror_fail)[0xffffb07e4040]
|
row/row0mysql.cc:2695(row_rename_table_for_mysql(char const*, char const*, trx_t*, bool))[0xaaaaebabd9bc]
|
handler/ha_innodb.cc:13763(innobase_rename_table(trx_t*, char const*, char const*, bool))[0xaaaaeb8e9130]
|
handler/ha_innodb.cc:14184(ha_innobase::rename_table(char const*, char const*))[0xaaaaeb8eaa44]
|
sql/handler.cc:5376(handler::ha_rename_table(char const*, char const*))[0xaaaaeb49f860]
|
sql/sql_table.cc:5007(mysql_rename_table(handlerton*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, st_mysql_const_unsigned_lex_string*, unsigned int))[0xaaaaeb1f5f34]
|
sql/sql_table.cc:9241(simple_rename_or_index_change(THD*, TABLE_LIST*, Alter_info::enum_enable_or_disable, TRIGGER_RENAME_PARAM*, Alter_table_ctx*))[0xaaaaeb2014d8]
|
sql/sql_table.cc:9945(mysql_alter_table(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, TABLE_LIST*, Recreate_info*, Alter_info*, unsigned int, st_order*, bool, bool))[0xaaaaeb2030f0]
|
sql/sql_alter.cc:553(Sql_cmd_alter_table::execute(THD*))[0xaaaaeb2bb9ec]
|
sql/sql_parse.cc:6002(mysql_execute_command(THD*, bool))[0xaaaaeb10b9c0]
|
sql/sql_parse.cc:8021(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0xaaaaeb1115f8]
|
sql/sql_parse.cc:1898(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0xaaaaeb0ff080]
|
sql/sql_parse.cc:1409(do_command(THD*, bool))[0xaaaaeb0fdce4]
|
sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0xaaaaeb2b0f18]
|
sql/sql_connect.cc:1320(handle_one_connection)[0xaaaaeb2b0c5c]
|
perfschema/pfs.cc:2203(pfs_spawn_thread)[0xaaaaeb7f2504]
|
nptl/pthread_create.c:442(start_thread)[0xffffb082d5c8]
|
aarch64/clone.S:82(thread_start)[0xffffb0895d1c]
|
|
Trying to get some variables.
|
Some pointers may be invalid and cause the dump to abort.
|
Query (0xffff340141f0): ALTER TABLE t1 /*!100301 WAIT 6 */ RENAME TO t6 /* QNO 5029 CON_ID 10 */
|
# 2023-03-20T14:20:03 [2792643] Core was generated by `/home/angelique/dev/build-10.6/build1/bin/mysqld --no-defaults --basedir=/home/'.
|
# 2023-03-20T14:20:03 [2792643] Program terminated with signal SIGABRT, Aborted.
|
# 2023-03-20T14:20:03 [2792643] #0 __pthread_kill_implementation (threadid=281473237401216, signo=6, no_tid=<optimized out>) at ./nptl/pthread_kill.c:44
|
# 2023-03-20T14:20:03 [2792643] [Current thread is 1 (Thread 0xffff98543e80 (LWP 2792715))]
|
# 2023-03-20T14:20:03 [2792643] #0 __pthread_kill_implementation (threadid=281473237401216, signo=6, no_tid=<optimized out>) at ./nptl/pthread_kill.c:44
|
# 2023-03-20T14:20:03 [2792643] #1 0x0000aaaaebdcfaa0 in my_write_core (sig=6) at /home/angelique/dev/server/mysys/stacktrace.c:424
|
# 2023-03-20T14:20:03 [2792643] #2 0x0000aaaaeb48cca4 in handle_fatal_signal (sig=6) at /home/angelique/dev/server/sql/signal_handler.cc:357
|
# 2023-03-20T14:20:03 [2792643] #3 <signal handler called>
|
# 2023-03-20T14:20:03 [2792643] #4 __pthread_kill_implementation (threadid=281473237401216, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
|
# 2023-03-20T14:20:03 [2792643] #5 0x0000ffffb082f254 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
|
# 2023-03-20T14:20:03 [2792643] #6 0x0000ffffb07ea67c in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
# 2023-03-20T14:20:03 [2792643] #7 0x0000ffffb07d7130 in __GI_abort () at ./stdlib/abort.c:79
|
# 2023-03-20T14:20:03 [2792643] #8 0x0000ffffb07e3fd0 in __assert_fail_base (fmt=0xffffb08fd3f8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xaaaaec286118 "err != DB_DUPLICATE_KEY", file=file@entry=0xaaaaec2847f8 "/home/angelique/dev/server/storage/innobase/row/row0mysql.cc", line=line@entry=2691, function=function@entry=0xaaaaec285fe0 "dberr_t row_rename_table_for_mysql(const char*, const char*, trx_t*, bool)") at ./assert/assert.c:92
|
# 2023-03-20T14:20:03 [2792643] #9 0x0000ffffb07e4040 in __GI___assert_fail (assertion=0xaaaaec286118 "err != DB_DUPLICATE_KEY", file=0xaaaaec2847f8 "/home/angelique/dev/server/storage/innobase/row/row0mysql.cc", line=2691, function=0xaaaaec285fe0 "dberr_t row_rename_table_for_mysql(const char*, const char*, trx_t*, bool)") at ./assert/assert.c:101
|
# 2023-03-20T14:20:03 [2792643] #10 0x0000aaaaebabd9bc in row_rename_table_for_mysql (old_name=0xffff9853e088 "test/t1", new_name=0xffff9853de88 "test/t6", trx=0xffffacf4a500, use_fk=true) at /home/angelique/dev/server/storage/innobase/row/row0mysql.cc:2691
|
# 2023-03-20T14:20:03 [2792643] #11 0x0000aaaaeb8e9130 in innobase_rename_table (trx=0xffffacf4a500, from=0xffff9853ec08 "./test/t1", to=0xffff9853ee08 "./test/t6", use_fk=true) at /home/angelique/dev/server/storage/innobase/handler/ha_innodb.cc:13763
|
# 2023-03-20T14:20:03 [2792643] #12 0x0000aaaaeb8eaa44 in ha_innobase::rename_table (this=0xffff34014de0, from=0xffff9853ec08 "./test/t1", to=0xffff9853ee08 "./test/t6") at /home/angelique/dev/server/storage/innobase/handler/ha_innodb.cc:14184
|
# 2023-03-20T14:20:03 [2792643] #13 0x0000aaaaeb49f860 in handler::ha_rename_table (this=0xffff34014de0, from=0xffff9853ec08 "./test/t1", to=0xffff9853ee08 "./test/t6") at /home/angelique/dev/server/sql/handler.cc:5375
|
# 2023-03-20T14:20:03 [2792643] #14 0x0000aaaaeb1f5f34 in mysql_rename_table (base=0xaaaaf6674398, old_db=0xffff98540cf8, old_name=0xffff98540d08, new_db=0xffff98540d38, new_name=0xffff98540d58, id=0xffff9853f4a0, flags=0) at /home/angelique/dev/server/sql/sql_table.cc:5007
|
# 2023-03-20T14:20:03 [2792643] #15 0x0000aaaaeb2014d8 in simple_rename_or_index_change (thd=0xffff34000dd8, table_list=0xffff340144c0, keys_onoff=Alter_info::LEAVE_AS_IS, trigger_param=0xffff9853fd28, alter_ctx=0xffff98540ce8) at /home/angelique/dev/server/sql/sql_table.cc:9241
|
# 2023-03-20T14:20:03 [2792643] #16 0x0000aaaaeb2030f0 in mysql_alter_table (thd=0xffff34000dd8, new_db=0xffff34005a40, new_name=0xffff34005e90, create_info=0xffff98541af0, table_list=0xffff340144c0, recreate_info=0xffff985419d0, alter_info=0xffff98541a08, order_num=0, order=0x0, ignore=false, if_exists=false) at /home/angelique/dev/server/sql/sql_table.cc:9945
|
# 2023-03-20T14:20:03 [2792643] #17 0x0000aaaaeb2bb9ec in Sql_cmd_alter_table::execute (this=0xffff34014c08, thd=0xffff34000dd8) at /home/angelique/dev/server/sql/sql_alter.cc:553
|
# 2023-03-20T14:20:03 [2792643] #18 0x0000aaaaeb10b9c0 in mysql_execute_command (thd=0xffff34000dd8, is_called_from_prepared_stmt=false) at /home/angelique/dev/server/sql/sql_parse.cc:6002
|
# 2023-03-20T14:20:03 [2792643] #19 0x0000aaaaeb1115f8 in mysql_parse (thd=0xffff34000dd8, rawbuf=0xffff340141f0 "ALTER TABLE t1 /*!100301 WAIT 6 */ RENAME TO t6 /* QNO 5029 CON_ID 10 */", length=72, parser_state=0xffff98542bf8) at /home/angelique/dev/server/sql/sql_parse.cc:8021
|
# 2023-03-20T14:20:03 [2792643] #20 0x0000aaaaeb0ff080 in dispatch_command (command=COM_QUERY, thd=0xffff34000dd8, packet=0xffff3400b849 "ALTER TABLE t1 /*!100301 WAIT 6 */ RENAME TO t6 /* QNO 5029 CON_ID 10 */ ", packet_length=73, blocking=true) at /home/angelique/dev/server/sql/sql_parse.cc:1896
|
# 2023-03-20T14:20:03 [2792643] #21 0x0000aaaaeb0fdce4 in do_command (thd=0xffff34000dd8, blocking=true) at /home/angelique/dev/server/sql/sql_parse.cc:1409
|
# 2023-03-20T14:20:03 [2792643] #22 0x0000aaaaeb2b0f18 in do_handle_one_connection (connect=0xaaaaf6c53658, put_in_cache=true) at /home/angelique/dev/server/sql/sql_connect.cc:1416
|
# 2023-03-20T14:20:03 [2792643] #23 0x0000aaaaeb2b0c5c in handle_one_connection (arg=0xaaaaf6c53658) at /home/angelique/dev/server/sql/sql_connect.cc:1318
|
# 2023-03-20T14:20:03 [2792643] #24 0x0000aaaaeb7f2504 in pfs_spawn_thread (arg=0xaaaaf6bc84a8) at /home/angelique/dev/server/storage/perfschema/pfs.cc:2201
|
# 2023-03-20T14:20:03 [2792643] #25 0x0000ffffb082d5c8 in start_thread (arg=0x0) at ./nptl/pthread_create.c:442
|
# 2023-03-20T14:20:03 [2792643] #26 0x0000ffffb0895d1c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:79
|
The crash only seems to happen with more than 1 thread. The actual ALTER TABLE command it fails on will differ among runs.
To recreate the crash
git clone https://github.com/MariaDB/randgen --branch mdev30883 mdev30883
|
cd mdev30883
|
./mdev30883.cmd <your basedir>
|
Attachments
Issue Links
- relates to
-
MDEV-14193 innodb.log_file_name failed in buildbot with exception
-
- Closed
-
-
MDEV-30105 ER_TABLE_EXISTS_ERROR or Assertion `err != DB_DUPLICATE_KEY' failed in row_rename_table_for_mysql
-
- Closed
-
--source include/have_innodb.inc
--source include/have_binlog_format_mixed.inc
Leads to:
10.6.16 6f091434f313996436b4f01d7e7d62a9f3786958 (Debug)
mariadbd: /test/10.6_dbg/storage/innobase/row/row0mysql.cc:2695: dberr_t row_rename_table_for_mysql(const char*, const char*, trx_t*, bool): Assertion `err != DB_DUPLICATE_KEY' failed.
10.6.16 6f091434f313996436b4f01d7e7d62a9f3786958 (Debug)
Core was generated by `/test/MD311023-mariadb-10.6.16-linux-x86_64-dbg/bin/mariadbd --no-defaults --co'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22694742533696)
at ./nptl/pthread_kill.c:44
[Current thread is 1 (Thread 0x14a408112640 (LWP 3954235))]
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22694742533696) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=22694742533696) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=22694742533696, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x000014a41ce42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x000014a41ce287f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x000014a41ce2871b in __assert_fail_base (fmt=0x14a41cfdd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55a2c6c07a94 "err != DB_DUPLICATE_KEY", file=0x55a2c6c05bc8 "/test/10.6_dbg/storage/innobase/row/row0mysql.cc", line=2695, function=<optimized out>) at ./assert/assert.c:92
#6 0x000014a41ce39e96 in __GI___assert_fail (assertion=0x55a2c6c07a94 "err != DB_DUPLICATE_KEY", file=0x55a2c6c05bc8 "/test/10.6_dbg/storage/innobase/row/row0mysql.cc", line=2695, function=0x55a2c6c06ab0 "dberr_t row_rename_table_for_mysql(const char*, const char*, trx_t*, bool)") at ./assert/assert.c:101
#7 0x000055a2c6561ed4 in row_rename_table_for_mysql (old_name=<optimized out>, old_name@entry=0x14a40810c6d0 "test/#sql-alter-3c52c8-5", new_name=new_name@entry=0x14a40810c4d0 "test/t1", trx=trx@entry=0x14a403c01c80, use_fk=use_fk@entry=true) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:2695
#8 0x000055a2c63e9990 in innobase_rename_table (trx=trx@entry=0x14a403c01c80, from=from@entry=0x14a40810d1e0 "./test/#sql-alter-3c52c8-5", to=to@entry=0x14a40810d3e0 "./test/t1", use_fk=use_fk@entry=true) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:13825
#9 0x000055a2c63f2ce9 in ha_innobase::rename_table (this=<optimized out>, from=<optimized out>, to=<optimized out>) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:14247
#10 0x000055a2c606f45c in handler::ha_rename_table (this=this@entry=0x14a3d00152a0, from=from@entry=0x14a40810d1e0 "./test/#sql-alter-3c52c8-5", to=to@entry=0x14a40810d3e0 "./test/t1") at /test/10.6_dbg/sql/handler.cc:5394
#11 0x000055a2c5e672f4 in mysql_rename_table (base=base@entry=0x55a2c963acc8, old_db=old_db@entry=0x14a40810f4a0, old_name=old_name@entry=0x14a40810f4d0, new_db=new_db@entry=0x14a40810f4a0, new_name=new_name@entry=0x14a40810f4c0, id=id@entry=0x14a40810f4f0, flags=1) at /test/10.6_dbg/sql/sql_table.cc:5007
#12 0x000055a2c5e7c999 in mysql_alter_table (thd=thd@entry=0x14a3d0000d58, new_db=new_db@entry=0x14a3d00059e0, new_name=new_name@entry=0x14a3d0005e38, create_info=create_info@entry=0x14a4081102e0, table_list=<optimized out>, table_list@entry=0x14a3d00134d0, recreate_info=recreate_info@entry=0x14a408110150, alter_info=<optimized out>, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>) at /test/10.6_dbg/sql/sql_table.cc:10791
#13 0x000055a2c5efe30e in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14a3d0000d58) at /test/10.6_dbg/sql/sql_alter.cc:672
#14 0x000055a2c5dad762 in mysql_execute_command (thd=thd@entry=0x14a3d0000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.6_dbg/sql/sql_parse.cc:6026
#15 0x000055a2c5daf30a in mysql_parse (thd=thd@entry=0x14a3d0000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14a4081111f0) at /test/10.6_dbg/sql/sql_parse.cc:8050
#16 0x000055a2c5db1680 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14a3d0000d58, packet=packet@entry=0x14a3d000b049 "", packet_length=packet_length@entry=28, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:241
#17 0x000055a2c5db379d in do_command (thd=0x14a3d0000d58, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1409
#18 0x000055a2c5ef71d9 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55a2c9a859a8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1416
#19 0x000055a2c5ef74ce in handle_one_connection (arg=arg@entry=0x55a2c9a859a8) at /test/10.6_dbg/sql/sql_connect.cc:1318
#20 0x000055a2c6344e16 in pfs_spawn_thread (arg=0x55a2c9b12a08) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
#21 0x000014a41ce94ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#22 0x000014a41cf26a40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Bug confirmed present in:
MariaDB: 10.6.16 (dbg), 10.9.8 (dbg), 10.10.7 (dbg), 10.11.6 (dbg), 11.0.4 (dbg), 11.1.3 (dbg), 11.2.2 (dbg), 11.3.0 (dbg), 11.4.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.4.32 (dbg), 10.4.32 (opt), 10.5.23 (dbg), 10.5.23 (opt), 10.6.16 (opt), 10.9.8 (opt), 10.10.7 (opt), 10.11.6 (opt), 11.0.4 (opt), 11.1.3 (opt), 11.2.2 (opt), 11.3.0 (opt), 11.4.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)
Additionally, the ALTER TABLE takes a long time (~50 sec) to complete:
10.6.16 6f091434f313996436b4f01d7e7d62a9f3786958 (Debug)
10.6.16-dbg>ALTER TABLE t1 ENGINE=MERGE UNION (t_not_exists,t2);
Query OK, 0 rows affected, 1 warning (50.013 sec)
Records: 0 Duplicates: 0 Warnings: 1
It should also be noted that MySQL 8.0 hang on the query even longer:
MySQL 8.0.33 ea7087d885006918ad54458e7aad215b1650312c (Optimized and Debug)
Command: Query
Time: 614
State: Waiting for table metadata lock
Info: ALTER TABLE t1 ENGINE=MERGE UNION (t_not_exists,t2)