[MDEV-13570] Assertion failure !srv_read_only_mode in --innodb-read-only shutdown when buf_resize_thread is active Created: 2017-08-17  Updated: 2023-11-29  Resolved: 2017-08-18

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Tests
Affects Version/s: 10.2
Fix Version/s: 10.2.9, 10.3.2

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-13276 innodb.innodb-get-fk failed in buildb... Closed
is duplicated by MDEV-13886 innodb.read_only_recovery failed in b... Closed

 Description   

http://buildbot.askmonty.org/buildbot/builders/win32-debug/builds/4971/steps/test/logs/stdio

innodb.101_compatibility '32k,innodb'    w1 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2017-08-14 11:59:35
line
170814 11:59:23 [ERROR] mysqld got exception 0x80000003 ;
 
Attempting backtrace. You can use the following information to find out
 
^ Found warnings in D:/win32-debug/build/mysql-test/var/1/log/mysqld.1.err
ok
 
 - saving 'D:/win32-debug/build/mysql-test/var/1/log/innodb.101_compatibility-32k,innodb/' to 'D:/win32-debug/build/mysql-test/var/log/innodb.101_compatibility-32k,innodb/'
 - found 'mysqld.dmp' (0/5)
 
Trying 'cdb' to get a backtrace
Output from cdb follows. Faulting thread is printed twice,with and without function parameters
Search for STACK_TEXT to see the stack trace of 
the faulting thread. Callstacks of other threads are printed after it.
 
Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
 
 
Loading Dump File [D:\win32-debug\build\mysql-test\var\log\innodb.101_compatibility-32k,innodb\mysqld.1\data\mysqld.dmp]
User Mini Dump File: Only registers, stack and portions of memory are available
 
 
Response                         Time (ms)     Location
OK                                             .
 
Response                         Time (ms)     Location
OK                                             .
Deferred                                       cache*C:\cdb_symbols
Symbol search path is: .;cache*C:\cdb_symbols
Executable search path is: .
Windows 8.1 Version 9600 MP (4 procs) Free x86 compatible
Product: Server, suite: TerminalServer DataCenter SingleUserTS
Built by: 6.3.9600.18217 (winblue_ltsb.160124-0053)
Machine Name:
Debug session time: Mon Aug 14 11:59:25.000 2017 (UTC + 0:00)
System Uptime: not available
Process Uptime: 0 days 0:00:08.000
.............................
This dump file has a breakpoint exception stored in it.
The stored exception information can be accessed via .ecxr.
eax=00000000 ebx=01131368 ecx=00000000 edx=00000000 esi=01131320 edi=01131330
eip=77bfd10c esp=0bfbde3c ebp=0bfbde48 iopl=0         nv up ei pl nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
ntdll:
         ret     8
0:007> cdb: Reading initial command '!sym prompts off; !analyze -v; .ecxr; !for_each_frame dv /t;!uniqstack -p;q'
quiet mode - symbol prompts off
 
 
Unable to load image C:\Windows\System32\KERNELBASE.dll, Win32 error 0n2
 
Module name            Error
KERNELBASE             PDB not found : .\symbols\dll\wkernelbase.pdb
                       PDB not found : cache*c:\cdb_symbols
 
You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the command that caused symbols to be loaded.
You should also verify that your symbol search path (.sympath) is correct.
 
DUMP_CLASS: 2
 
DUMP_QUALIFIER: 400
 
CONTEXT:  (.ecxr)
eax=00000000 ebx=00000000 ecx=01c0a3b0 edx=00000000 esi=00000016 edi=00000008
eip=01c0a3b3 esp=0bfbf21c ebp=0bfbf21c iopl=0         nv up ei pl nz ac po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000212
mysqld!my_sigabrt_handler:
             int     3
Resetting default scope
 
FAULTING_IP: 
mysqld!my_sigabrt_handler+3 [d:\win32-debug\build\src\mysys\my_thr_init.c @ 488]
             int     3
 
EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 01c0a3b3 (mysqld!my_sigabrt_handler)
   ExceptionCode: 80000003 (Break instruction exception)
  ExceptionFlags: 00000000
NumberParameters: 1
   Parameter[0]: 00000000
 
BUGCHECK_STR:  5915ECD6
 
WRONG_SYMBOLS_TIMESTAMP: 5915ecd6
 
WRONG_SYMBOLS_SIZE: 16f000
 
FAULTING_MODULE: 77bc0000 ntdll
 
DEBUG_FLR_IMAGE_TIMESTAMP:  5915ecd6
 
ADDITIONAL_DEBUG_TEXT:  
You can run '.symfix; .reload' to try to fix the symbol path and load symbols. ; Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]
 
LAST_CONTROL_TRANSFER:  from 00000000 to 00000000
 
ANALYSIS_SESSION_HOST:  MARIADB-02
 
ANALYSIS_SESSION_TIME:  08-14-2017 11:59:36.0689
 
ANALYSIS_VERSION: 10.0.10586.567 amd64fre
 
STACK_TEXT:  
wrong_symbols!WRONG_SYMBOLS
 
 
STACK_COMMAND:  .ecxr ; kb ; ** Pseudo Context ** ; kb
 
THREAD_SHA1_HASH_MOD_FUNC:  8b50e467776d7660ec74f0fcf6059a449f38bc9a
 
THREAD_SHA1_HASH_MOD_FUNC_OFFSET:  386be9b62a7535c96acfda43762924bd7c0bcb71
 
THREAD_SHA1_HASH_MOD:  1c9266d4d33f329668e953be351439450e48d114
 
SYMBOL_STACK_INDEX:  0
 
FOLLOWUP_NAME:  MachineOwner
 
EXCEPTION_CODE: (NTSTATUS) 0x5915ecd6 - <Unable to get error code text>
 
EXCEPTION_CODE_STR:  5915ECD6
 
FAILURE_EXCEPTION_CODE:  5915ECD6
 
EXCEPTION_STR:  PRIVATE_SYMBOLS
 
PROCESS_NAME:  ntdll.wrong.symbols.dll
 
IMAGE_NAME:  ntdll.wrong.symbols.dll
 
MODULE_NAME: ntdll_wrong_symbols
 
SYMBOL_NAME:  ntdll_wrong_symbols!5915ECD616F000
 
BUCKET_ID:  PRIVATE_SYMBOLS_X86_6.3.9600.18217_(winblue_ltsb.160124-0053)_TIMESTAMP_170512-171150
 
DEFAULT_BUCKET_ID:  PRIVATE_SYMBOLS_X86_6.3.9600.18217_(winblue_ltsb.160124-0053)_TIMESTAMP_170512-171150
 
PRIMARY_PROBLEM_CLASS:  PRIVATE_SYMBOLS
 
FAILURE_BUCKET_ID:  PRIVATE_SYMBOLS_X86_6.3.9600.18217_(winblue_ltsb.160124-0053)_TIMESTAMP_170512-171150_5915ECD6_ntdll.wrong.symbols.dll!5915ECD616F000
 
BUCKET_ID_OFFSET:  0
 
BUCKET_ID_MODULE_STR:  ntdll_wrong_symbols
 
BUCKET_ID_MODVER_STR:  
 
BUCKET_ID_PREFIX_STR:  PRIVATE_SYMBOLS_X86_6.3.9600.18217_(winblue_ltsb.160124-0053)_TIMESTAMP_170512-171150
 
FAILURE_PROBLEM_CLASS:  PRIVATE_SYMBOLS_X86_6.3.9600.18217_(winblue_ltsb.160124-0053)_TIMESTAMP_170512-171150
 
FAILURE_IMAGE_NAME:  ntdll.wrong.symbols.dll
 
FAILURE_FUNCTION_NAME:  5915ECD616F000
 
BUCKET_ID_FUNCTION_STR:  5915ECD616F000
 
FAILURE_SYMBOL_NAME:  ntdll.wrong.symbols.dll!5915ECD616F000
 
TARGET_TIME:  2017-08-14T11:59:25.000Z
 
OSBUILD:  9600
 
OSSERVICEPACK:  17415
 
SERVICEPACK_NUMBER: 0
 
OS_REVISION: 0
 
SUITE_MASK:  400
 
PRODUCT_TYPE:  3
 
OSPLATFORM_TYPE:  x86
 
OSNAME:  Windows 8.1
 
OSEDITION:  Windows 8.1 Server TerminalServer DataCenter SingleUserTS
 
OS_LOCALE:  
 
USER_LCID:  0
 
OSBUILD_TIMESTAMP:  2014-10-29 01:58:22
 
BUILDDATESTAMP_STR:  160124-0053
 
BUILDLAB_STR:  winblue_ltsb
 
BUILDOSVER_STR:  6.3.9600.18217
 
ANALYSIS_SESSION_ELAPSED_TIME: 908
 
ANALYSIS_SOURCE:  UM
 
FAILURE_ID_HASH_STRING:  um:private_symbols_x86_6.3.9600.18217_(winblue_ltsb.160124-0053)_timestamp_170512-171150_5915ecd6_ntdll.wrong.symbols.dll!5915ecd616f000
 
FAILURE_ID_HASH:  {d35c8c82-6c0c-d330-655e-2b36cd3b82f9}
 
Followup:     MachineOwner
---------
 
eax=00000000 ebx=00000000 ecx=01c0a3b0 edx=00000000 esi=00000016 edi=00000008
eip=01c0a3b3 esp=0bfbf21c ebp=0bfbf21c iopl=0         nv up ei pl nz ac po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000212
mysqld!my_sigabrt_handler:
             int     3
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!my_sigabrt_handler [d:\win32-debug\build\src\mysys\my_thr_init.c @ 488]
int sig = 0n22
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!raise [d:\th\minkernel\crts\ucrt\src\appcrt\misc\signal.cpp @ 516]
int signum = 0n22
int old_fpecode = 0n0
struct _EXCEPTION_POINTERS * old_pxcptinfoptrs = 0x00000000
bool return0 = false
bool action_is_global = true
<function> * action = 0x01c0a3b0
struct __acrt_ptd * ptd = 0x00000000
<function> ** action_pointer = 0x03db45a0
struct __crt_signal_action_t * local_action = <value unavailable>
int _Expr_val = <value unavailable>
struct __crt_signal_action_t * last = <value unavailable>
struct __crt_signal_action_t * first = <value unavailable>
struct __crt_signal_action_t * p = 0x01d652f0
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!abort [d:\th\minkernel\crts\ucrt\src\appcrt\startup\abort.cpp @ 64]
<function> * sigabrt_action = <value unavailable>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!common_assert_to_stderr<wchar_t> [d:\th\minkernel\crts\ucrt\src\appcrt\startup\assert.cpp @ 149]
wchar_t * expression = 0x02742b74 "!srv_read_only_mode"
wchar_t * file_name = 0x0274cb28 "D:\win32-debug\build\src\storage\innobase\log\log0log.cc"
unsigned int line_number = 0x7a4
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
(Inline) -------- mysqld!common_assert [d:\th\minkernel\crts\ucrt\src\appcrt\startup\assert.cpp @ 378]
void * return_address = <value unavailable>
int current_error_mode = <value unavailable>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!_wassert [d:\th\minkernel\crts\ucrt\src\appcrt\startup\assert.cpp @ 404]
wchar_t * expression = <value unavailable>
wchar_t * file_name = <value unavailable>
unsigned int line_number = <value unavailable>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!logs_empty_and_mark_files_at_shutdown [d:\win32-debug\build\src\storage\innobase\log\log0log.cc @ 1956]
bool freed = true
unsigned int count = 1
unsigned int64 lsn = 0xcccccccc`cccccccc
char * thread_name = 0x02741d84 "buf_resize_thread"
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!innodb_shutdown [d:\win32-debug\build\src\storage\innobase\srv\srv0start.cc @ 2818]
unsigned int n_threads = 0xcccccccc
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!innobase_end [d:\win32-debug\build\src\storage\innobase\handler\ha_innodb.cc @ 4535]
class THD * thd = 0x00000000
struct handlerton * __formal = 0x074ab910
ha_panic_function __formal = HA_PANIC_CLOSE (0n0)
struct _db_stack_frame_ _db_stack_frame_ = struct _db_stack_frame_
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!ha_finalize_handlerton [d:\win32-debug\build\src\sql\handler.cc @ 451]
struct st_plugin_int * plugin = 0x003f4878
struct handlerton * hton = 0x074ab910
struct _db_stack_frame_ _db_stack_frame_ = struct _db_stack_frame_
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!plugin_deinitialize [d:\win32-debug\build\src\sql\sql_plugin.cc @ 1215]
struct st_plugin_int * plugin = 0x003f4878
bool ref_check = true
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!reap_plugins [d:\win32-debug\build\src\sql\sql_plugin.cc @ 1292]
struct st_plugin_int ** list = 0x0bfbfbf8
struct st_plugin_int ** reap = 0x0bfbfc54
unsigned int count = 0x33
struct st_plugin_int * plugin = 0x003f4878
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!plugin_shutdown [d:\win32-debug\build\src\sql\sql_plugin.cc @ 1951]
unsigned int i = 0x33
unsigned int count = 0x33
struct _db_stack_frame_ _db_stack_frame_ = struct _db_stack_frame_
struct st_plugin_int ** plugins = 0xcccccccc
struct st_plugin_int * plugin = 0x003f54a8
struct st_plugin_dl ** dl = 0xcccccccc
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!clean_up [d:\win32-debug\build\src\sql\mysqld.cc @ 2209]
bool print_message = true
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!unireg_end [d:\win32-debug\build\src\sql\mysqld.cc @ 2083]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!kill_server [d:\win32-debug\build\src\sql\mysqld.cc @ 2013]
int sig_ptr = 0n15
int sig = 0n15
struct _db_stack_frame_ _db_stack_frame_ = struct _db_stack_frame_
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!handle_shutdown [d:\win32-debug\build\src\sql\mysqld.cc @ 3670]
void * arg = 0x00000000
struct tagMSG msg = {msg=0xcccccccc wp=0xcccccccc lp=0xcccccccc}
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!pfs_spawn_thread [d:\win32-debug\build\src\storage\perfschema\pfs.cc @ 1862]
void * arg = 0x0aaffe68
struct PFS_thread * pfs = 0x05248360
struct PFS_thread_class * klass = 0x00428da0
<function> * user_start_routine = 0x014576a0
void * user_arg = 0x00000000
struct PFS_spawn_thread_arg * typed_arg = 0x0aaffe68
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!pthread_start [d:\win32-debug\build\src\mysys\my_winthread.c @ 60]
void * p = 0x07530b10
void * arg = 0x0aaffe68
<function> * func = 0x01bbb790
struct thread_start_parameter * par = 0x07530b10
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
(Inline) -------- mysqld!invoke_thread_procedure [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 91]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!thread_start<unsigned int (__stdcall*)(void *)> [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
void * parameter = 0x0aba1bf8
<function> * procedure = 0x01c4f540
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
kernel32!BaseThreadInitThunk
Unable to enumerate locals, HRESULT 0x80004005
Private symbols (symbols.pri) are required for locals.
Type ".hh dbgerr005" for details.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ntdll
Unable to enumerate locals, Win32 error 0n318
Private symbols (symbols.pri) are required for locals.
Type ".hh dbgerr005" for details.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ntdll
Unable to enumerate locals, Win32 error 0n318
Private symbols (symbols.pri) are required for locals.
Type ".hh dbgerr005" for details.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!my_sigabrt_handler [d:\win32-debug\build\src\mysys\my_thr_init.c @ 488]
Processing 9 threads, please wait
 
.  0  Id: 958.11c4 Suspend: 0 Teb: fe5ab000 Unfrozen
      Priority: 0  Priority class: 32
  
WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll
KERNELBASE
mysqld!pthread_cond_timedwait(struct _RTL_CONDITION_VARIABLE * cond = 0x03549138, struct _RTL_CRITICAL_SECTION * mutex = 0x0354900c, struct timespec * abstime = 0x00000000) [d:\win32-debug\build\src\mysys\my_wincond.c @ 82]
mysqld!pthread_cond_wait(struct _RTL_CONDITION_VARIABLE * cond = 0x03549138, struct _RTL_CRITICAL_SECTION * mutex = 0x0354900c) [d:\win32-debug\build\src\mysys\my_wincond.c @ 90]
mysqld!inline_mysql_cond_wait(struct st_mysql_cond * that = 0x03549138, struct st_mysql_mutex * mutex = 0x0354900c, char * src_file = 0x01f47050 "D:\win32-debug\build\src\sql\mysqld.cc", unsigned int src_line = 0x17b1) [d:\win32-debug\build\src\include\mysql\psi\mysql_thread.h @ 1138]
mysqld!win_main(int argc = 0n149, char ** argv = 0x00414f58) [d:\win32-debug\build\src\sql\mysqld.cc @ 6065]
mysqld!mysql_service(void * p = 0x00000000) [d:\win32-debug\build\src\sql\mysqld.cc @ 6102]
mysqld!mysqld_main(int argc = 0n26, char ** argv = 0x00406708) [d:\win32-debug\build\src\sql\mysqld.cc @ 6296]
mysqld!main(int argc = 0n26, char ** argv = 0x00406708) [d:\win32-debug\build\src\sql\main.cc @ 25]
(Inline) -------- mysqld!invoke_main [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 64]
mysqld!__scrt_common_main_seh(void) [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 259]
kernel32!BaseThreadInitThunk
ntdll
ntdll
 
.  1  Id: 958.1008 Suspend: 0 Teb: fe5a8000 Unfrozen
      Priority: 0  Priority class: 32
  
WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll
KERNELBASE
mysqld!pthread_cond_timedwait(struct _RTL_CONDITION_VARIABLE * cond = 0x03da92d0, struct _RTL_CRITICAL_SECTION * mutex = 0x03da92b4, struct timespec * abstime = 0x07d5fd44) [d:\win32-debug\build\src\mysys\my_wincond.c @ 82]
mysqld!inline_mysql_cond_timedwait(struct st_mysql_cond * that = 0x03da92d0, struct st_mysql_mutex * mutex = 0x03da92b4, struct timespec * abstime = 0x07d5fd44, char * src_file = 0x03372bf8 "--- memory read error at address 0x03372bf8 ---", unsigned int src_line = 0x124) [d:\win32-debug\build\src\include\mysql\psi\mysql_thread.h @ 1175]
mysqld!timer_handler(void * arg = 0x00000000) [d:\win32-debug\build\src\mysys\thr_timer.c @ 293]
mysqld!pfs_spawn_thread(void * arg = 0x003f4308) [d:\win32-debug\build\src\storage\perfschema\pfs.cc @ 1862]
mysqld!pthread_start(void * p = 0x00412608) [d:\win32-debug\build\src\mysys\my_winthread.c @ 60]
(Inline) -------- mysqld!invoke_thread_procedure [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 91]
mysqld!thread_start<unsigned int (void * parameter = 0x00408688) [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
kernel32!BaseThreadInitThunk
ntdll
ntdll
 
.  2  Id: 958.1684 Suspend: 0 Teb: fe5a5000 Unfrozen
      Priority: 0  Priority class: 32
  
WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll
mysqld!os_aio_windows_handler(unsigned int segment = 0, unsigned int pos = 0, struct fil_node_t ** m1 = 0x0a01fcdc, void ** m2 = 0x0a01fcbc, class IORequest * type = 0x0a01fcc8) [d:\win32-debug\build\src\storage\innobase\os\os0file.cc @ 6453]
mysqld!os_aio_handler(unsigned int segment = 0, struct fil_node_t ** m1 = 0x0a01fcdc, void ** m2 = 0x0a01fcbc, class IORequest * request = 0x0a01fcc8) [d:\win32-debug\build\src\storage\innobase\os\os0file.cc @ 5648]
mysqld!fil_aio_wait(unsigned int segment = 0) [d:\win32-debug\build\src\storage\innobase\fil\fil0fil.cc @ 5443]
mysqld!io_handler_thread(void * arg = 0x0359bfd0) [d:\win32-debug\build\src\storage\innobase\srv\srv0start.cc @ 343]
kernel32!BaseThreadInitThunk
ntdll
ntdll
 
.  6  Id: 958.1108 Suspend: 0 Teb: fe470000 Unfrozen
      Priority: 0  Priority class: 32
  
WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll
kernel32!BaseThreadInitThunk
ntdll
ntdll
 
.  7  Id: 958.17f4 Suspend: 0 Teb: fe46d000 Unfrozen
      Priority: 0  Priority class: 32
  
WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll
0xbfbdf00
ntdll
 
Total threads: 9
Duplicate callstacks: 4 (windbg thread #s follow):
3, 4, 5, 8
quit:



 Comments   
Comment by Marko Mäkelä [ 2017-08-18 ]

The problem is a too strict debug assertion here in logs_empty_and_mark_files_at_shutdown():

	/* We need these threads to stop early in shutdown. */
	const char* thread_name;
 
	if (srv_error_monitor_active) {
		thread_name = "srv_error_monitor_thread";
	} else if (srv_monitor_active) {
		thread_name = "srv_monitor_thread";
	} else if (srv_buf_resize_thread_active) {
		thread_name = "buf_resize_thread";
	} else if (srv_dict_stats_thread_active) {
		thread_name = "dict_stats_thread";
	} else if (lock_sys && lock_sys->timeout_thread_active) {
		thread_name = "lock_wait_timeout_thread";
	} else if (srv_buf_dump_thread_active) {
		thread_name = "buf_dump_thread";
	} else if (btr_defragment_thread_active) {
		thread_name = "btr_defragment_thread";
	} else if (srv_fast_shutdown != 2 && trx_rollback_or_clean_is_active) {
		thread_name = "rollback of recovered transactions";
	} else {
		thread_name = NULL;
	}
 
	if (thread_name) {
		ut_ad(!srv_read_only_mode);

We have thread_name == "buf_resize_thread" here.
Of these threads, only buf_resize_thread is started also in srv_read_only_mode, at the end of innobase_start_or_create_for_mysql().
The debug assertion is bogus and needs to be relaxed.

Comment by Marko Mäkelä [ 2017-09-01 ]

In MariaDB 10.2 and later, two of the above threads are started up also in innodb_read_only mode: buf_resize_thread and buf_dump_thread.
In my first fix, I accidentally only skipped the debug assertion for buf_dump_thread, not for the above-mentioned buf_resize_thread. That fix was part of the MariaDB 10.3.1 release.
My second fix actually avoids the bogus debug assertion failure for buf_resize_thread.

This bogus debug assertion is not present in non-debug builds. As far as InnoDB is concerned, this debug assertion failure did not have any impact on subsequent restart, because in innodb_read_only shutdown, InnoDB files will need to be written.

Generated at Thu Feb 08 08:06:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.