Bug #119253 innodb.tablespace_encrypt_9 crashing the server with assertion failure
Submitted: 28 Oct 4:57 Modified: 28 Oct 4:58
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:9.5.0 OS:MacOS (26.0.1)
Assigned to: CPU Architecture:ARM

[28 Oct 4:57] Laurynas Biveinis
Description:
$ ./mtr innodb.tablespace_encrypt_9
...
Assertion failed: (owned_gtids.is_owned_by(thd->owned_gtid, thd->thread_id())), function update_gtids_impl_own_gtid, file rpl_gtid_state.cc, line 852.
2025-10-28T04:55:20Z UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x627000380100
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 = 16e81adc0 thread_stack 0x100000
0   mysqld                              0x00000001077f6900 my_print_stacktrace(unsigned char const*, unsigned long) + 224
1   mysqld                              0x00000001050a8948 print_fatal_signal(int, __siginfo*) + 1116
2   mysqld                              0x00000001050a843c handle_fatal_signal(int, __siginfo*, void*) + 144
3   libsystem_platform.dylib            0x000000019add6744 _sigtramp + 56
4   libsystem_pthread.dylib             0x000000019adcc888 pthread_kill + 296
5   libsystem_c.dylib                   0x000000019acd2808 abort + 124
6   libsystem_c.dylib                   0x000000019acd1a3c err + 0
7   mysqld                              0x0000000106aeda54 Gtid_state::update_gtids_impl_own_gtid(THD*, bool) + 2764
8   mysqld                              0x0000000106aeb908 Gtid_state::update_commit_group(THD*) + 1028
9   mysqld                              0x000000010687b804 MYSQL_BIN_LOG::process_commit_stage_queue(THD*, THD*) + 3976
10  mysqld                              0x0000000106840bfc MYSQL_BIN_LOG::ordered_commit(THD*, bool, bool) + 7932
11  mysqld                              0x000000010682b028 MYSQL_BIN_LOG::commit(THD*, bool) + 7568
12  mysqld                              0x0000000102ee31e0 ha_commit_trans(THD*, bool, bool) + 3812
13  mysqld                              0x0000000104e33118 trans_commit(THD*, bool) + 756
14  mysqld                              0x0000000104bd5a70 bool (anonymous namespace)::complete_stmt<Sql_cmd_alter_tablespace::execute(THD*)::$_0>(THD*, handlerton*, Sql_cmd_alter_tablespace::execute(THD*)::$_0&&, bool, bool) + 300
15  mysqld                              0x0000000104bd3070 Sql_cmd_alter_tablespace::execute(THD*) + 5200
16  mysqld                              0x00000001047961ac mysql_execute_command(THD*, bool) + 15020
17  mysqld                              0x00000001040d3e2c Statement_runnable::execute_server_code(THD*) + 2184
18  mysqld                              0x00000001048ba4dc Prepared_statement::execute_server_runnable(THD*, Server_runnable*) + 1232
19  mysqld                              0x000000010409f744 Ed_connection::execute_direct(Server_runnable*) + 608
20  mysqld                              0x000000010409f3dc Ed_connection::execute_direct(MYSQL_LEX_STRING) + 280
21  mysqld                              0x00000001070089f4 dd::execute_query(THD*, std::__1::basic_string<char, std::__1::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor>> const&) + 444
22  mysqld                              0x0000000106fc4a00 dd::alter_tablespace_encryption(THD*, char const*, bool) + 660
23  mysqld                              0x00000001081166e8 resume_alter_encrypt_tablespace(THD*) + 2596
24  mysqld                              0x0000000108115cb4 fsp_init_resume_alter_encrypt_tablespace() + 24
25  mysqld                              0x000000010799dc94 void Detached_thread::operator()<void (*)()>(void (*&&)()) + 160
26  mysqld                              0x000000010799d0d4 void* std::__1::__thread_proxy[abi:ne200100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, Detached_thread, void (*)()>>(void*) + 256
27  libclang_rt.asan_osx_dynamic.dylib  0x000000011d0fe3f8 asan_thread_start(void*) + 80
28  libsystem_pthread.dylib             0x000000019adccc08 _pthread_start + 136
29  libsystem_pthread.dylib             0x000000019adc7ba8 thread_start + 8

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (6080001740d0): ALTER TABLESPACE encrypt_ts ENCRYPTION = 'Y'
Connection ID (thread ID): 0
Status: NOT_KILLED

How to repeat:
CMake options -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DFORCE_UNSUPPORTED_COMPILER=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON -DMYSQL_MAINTAINER_MODE=ON -DWITH_SYSTEM_LIBS=ON -DWITH_NDBCLUSTER_STORAGE_ENGINE=OFF -DFORCE_COLORED_OUTPUT=ON -DCMAKE_CXX_FLAGS=-Wno-nonnull -g -DCMAKE_CXX_FLAGS_DEBUG=-Wno-nonnull -g -DCMAKE_CXX_FLAGS_RELEASE=-O2 -DNDEBUG -Wno-nonnull -g
[28 Oct 4:58] Laurynas Biveinis
Bug 117314 has been fixed, but now we have a different issue