[MDEV-14193] innodb.log_file_name failed in buildbot with exception Created: 2017-10-29  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Tests
Affects Version/s: 10.2
Fix Version/s: 10.6, 10.11, 11.0

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Thirunarayanan Balathandayuthapani
Resolution: Unresolved Votes: 0
Labels: crash, recovery

Issue Links:
Relates
relates to MDEV-30883 Assertion `err != DB_DUPLICATE_KEY' f... Confirmed

 Description   

Logs not available

innodb.log_file_name 'innodb'            w4 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2017-10-04 06:10:37
line
171004  6:09:56 [ERROR] mysqld got exception 0xc0000005 ;
Attempting backtrace. You can use the following information to find out
^ Found warnings in D:/winx64-debug/build/mysql-test/var/4/log/mysqld.1.err
ok
 
 - saving 'D:/winx64-debug/build/mysql-test/var/4/log/innodb.log_file_name-innodb/' to 'D:/winx64-debug/build/mysql-test/var/log/innodb.log_file_name-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:\winx64-debug\build\mysql-test\var\log\innodb.log_file_name-innodb\mysqld.1\data\mysqld.dmp]
User Mini Dump File: Only registers, stack and portions of memory are available
 
 
Response                         Time (ms)     Location
OK                                             C:\Windows\System32
OK                                             D:\winx64-debug\build\sql\Debug
OK                                             .
 
Response                         Time (ms)     Location
OK                                             C:\Windows\System32
OK                                             D:\winx64-debug\build\sql\Debug
OK                                             .
Deferred                                       cache*C:\cdb_symbols
Symbol search path is: C:\Windows\System32;D:\winx64-debug\build\sql\Debug;.;cache*C:\cdb_symbols
Executable search path is: C:\Windows\System32;D:\winx64-debug\build\sql\Debug;.
Windows 8.1 Version 9600 MP (4 procs) Free x64
Product: Server, suite: TerminalServer DataCenter SingleUserTS
Built by: 6.3.9600.18217 (winblue_ltsb.160124-0053)
Machine Name:
Debug session time: Wed Oct  4 06:09:59.000 2017 (UTC + 0:00)
System Uptime: not available
Process Uptime: 0 days 0:00:05.000
........................
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(fb0.1a58): Access violation - code c0000005 (first/second chance not available)
ntdll!NtGetContextThread:
             ret
0:001> cdb: Reading initial command '!sym prompts off; !analyze -v; .ecxr; !for_each_frame dv /t;!uniqstack -p;q'
quiet mode - symbol prompts off
 
GetUrlPageData2 (WinHttp) failed: 12002.
 
DUMP_CLASS: 2
 
DUMP_QUALIFIER: 400
 
CONTEXT:  (.ecxr)
rax=0000000000000000 rbx=00007ff6302ee258 rcx=00000000fffffffc
rdx=00000000000001ac rsi=00000000000001ac rdi=0000000000000000
rip=00007ffd01f5dd9e rsp=00000016718df050 rbp=00007ff62d767000
 r8=ffffffffffffffff  r9=00007ff62d767000 r10=0000000000000000
r11=0000000000000246 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0         nv up ei pl nz ac pe cy
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010213
ntdll!RtlpWaitOnCriticalSection:
         inc     dword ptr [rax+24h] ds:00000000`00000024=????????
Resetting default scope
 
FAULTING_IP: 
ntdll!RtlpWaitOnCriticalSection+b6
         inc     dword ptr [rax+24h]
 
EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ffd01f5dd9e (ntdll!RtlpWaitOnCriticalSection)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000001
   Parameter[1]: 0000000000000024
Attempt to write to address 0000000000000024
 
DEFAULT_BUCKET_ID:  NULL_CLASS_PTR_WRITE
 
PROCESS_NAME:  mysqld.exe
 
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
 
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
 
EXCEPTION_CODE_STR:  c0000005
 
EXCEPTION_PARAMETER1:  0000000000000001
 
EXCEPTION_PARAMETER2:  0000000000000024
 
WRITE_ADDRESS:  0000000000000024 
 
FOLLOWUP_IP: 
mysqld!inline_mysql_mutex_lock+c4 [d:\winx64-debug\build\src\include\mysql\psi\mysql_thread.h @ 683]
mov     dword ptr [rsp+30h],0
 
BUGCHECK_STR:  NULL_CLASS_PTR_WRITE
 
WATSON_BKT_PROCSTAMP:  59d47126
 
WATSON_BKT_PROCVER:  10.2.10.0
 
WATSON_BKT_MODULE:  ntdll.dll
 
WATSON_BKT_MODSTAMP:  598d24e0
 
WATSON_BKT_MODOFFSET:  3dd9e
 
WATSON_BKT_MODVER:  6.3.9600.18790
 
MODULE_VER_PRODUCT:  Microsoft® Windows® Operating System
 
BUILD_VERSION_STRING:  6.3.9600.17415 (winblue_r4.141028-1500)
 
MODLIST_WITH_TSCHKSUM_HASH:  d0b2b026e4f2d55d12991de5372ac7f57f4b6e30
 
MODLIST_SHA1_HASH:  914eb96580bce2e8da0195543b0a230bdd8fcb50
 
DUMP_FLAGS:  0
 
DUMP_TYPE:  2
 
APP:  mysqld.exe
 
ANALYSIS_SESSION_HOST:  MARIADB-02
 
ANALYSIS_SESSION_TIME:  10-04-2017 06:10:38.0995
 
ANALYSIS_VERSION: 10.0.10586.567 amd64fre
 
THREAD_ATTRIBUTES: 
OS_LOCALE:  ENU
 
PROBLEM_CLASSES: 
 
 
 
NULL_CLASS_PTR_WRITE
    Tid    [0x1a58]
    Frame  [0x00]: ntdll!RtlpWaitOnCriticalSection
 
 
LAST_CONTROL_TRANSFER:  from 00007ffd01f5b794 to 00007ffd01f5dd9e
 
STACK_TEXT:  
ntdll!RtlpWaitOnCriticalSection
ntdll!RtlpEnterCriticalSectionContended
mysqld!inline_mysql_mutex_lock
mysqld!Statement_map::~Statement_map
mysqld!THD::~THD
mysqld!THD::`scalar deleting destructor'
mysqld!threadpool_remove_connection
mysqld!tp_callback
mysqld!tp_callback
mysqld!work_callback
ntdll!TppWorkpExecuteCallback
ntdll!TppWorkerThread
kernel32!BaseThreadInitThunk
ntdll!RtlUserThreadStart
 
 
THREAD_SHA1_HASH_MOD_FUNC:  0eb069748a9218e66e662f478da6cd04b0791753
 
THREAD_SHA1_HASH_MOD_FUNC_OFFSET:  3073a2ee054d205add7bc9e88550ba5837316852
 
THREAD_SHA1_HASH_MOD:  b44c6413472d33e69f5ae8adb4f1734694da8fba
 
FAULT_INSTR_CODE:  302444c7
 
FAULTING_SOURCE_LINE:  d:\winx64-debug\build\src\include\mysql\psi\mysql_thread.h
 
FAULTING_SOURCE_FILE:  d:\winx64-debug\build\src\include\mysql\psi\mysql_thread.h
 
FAULTING_SOURCE_LINE_NUMBER:  683
 
FAULTING_SOURCE_CODE:  
   679:   /* Non instrumented code */
   680: #ifdef SAFE_MUTEX
   681:   result= safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line);
   682: #else
>  683:   result= pthread_mutex_lock(&that->m_mutex);
   684: #endif
   685: 
   686:   return result;
   687: }
   688: 
 
 
SYMBOL_STACK_INDEX:  2
 
SYMBOL_NAME:  mysqld!inline_mysql_mutex_lock+c4
 
FOLLOWUP_NAME:  MachineOwner
 
MODULE_NAME: mysqld
 
IMAGE_NAME:  mysqld.exe
 
DEBUG_FLR_IMAGE_TIMESTAMP:  59d47126
 
STACK_COMMAND:  .ecxr ; kb
 
BUCKET_ID:  NULL_CLASS_PTR_WRITE_mysqld!inline_mysql_mutex_lock+c4
 
PRIMARY_PROBLEM_CLASS:  NULL_CLASS_PTR_WRITE_mysqld!inline_mysql_mutex_lock+c4
 
BUCKET_ID_OFFSET:  c4
 
BUCKET_ID_MODULE_STR:  mysqld
 
BUCKET_ID_MODTIMEDATESTAMP:  59d47126
 
BUCKET_ID_MODCHECKSUM:  0
 
BUCKET_ID_MODVER_STR:  10.2.10.0
 
BUCKET_ID_PREFIX_STR:  NULL_CLASS_PTR_WRITE_
 
FAILURE_PROBLEM_CLASS:  NULL_CLASS_PTR_WRITE
 
FAILURE_EXCEPTION_CODE:  c0000005
 
FAILURE_IMAGE_NAME:  mysqld.exe
 
FAILURE_FUNCTION_NAME:  inline_mysql_mutex_lock
 
BUCKET_ID_FUNCTION_STR:  inline_mysql_mutex_lock
 
FAILURE_SYMBOL_NAME:  mysqld.exe!inline_mysql_mutex_lock
 
FAILURE_BUCKET_ID:  NULL_CLASS_PTR_WRITE_c0000005_mysqld.exe!inline_mysql_mutex_lock
 
WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/mysqld.exe/10.2.10.0/59d47126/ntdll.dll/6.3.9600.18790/598d24e0/c0000005/0003dd9e.htm?Retriage=1
 
TARGET_TIME:  2017-10-04T06:09:59.000Z
 
OSBUILD:  9600
 
OSSERVICEPACK:  17415
 
SERVICEPACK_NUMBER: 0
 
OS_REVISION: 0
 
SUITE_MASK:  400
 
PRODUCT_TYPE:  3
 
OSPLATFORM_TYPE:  x64
 
OSNAME:  Windows 8.1
 
OSEDITION:  Windows 8.1 Server TerminalServer DataCenter SingleUserTS
 
USER_LCID:  0
 
OSBUILD_TIMESTAMP:  2014-10-29 02:45:30
 
BUILDDATESTAMP_STR:  141028-1500
 
BUILDLAB_STR:  winblue_r4
 
BUILDOSVER_STR:  6.3.9600.17415
 
ANALYSIS_SESSION_ELAPSED_TIME: 64a5
 
ANALYSIS_SOURCE:  UM
 
FAILURE_ID_HASH_STRING:  um:null_class_ptr_write_c0000005_mysqld.exe!inline_mysql_mutex_lock
 
FAILURE_ID_HASH:  {cb7c3076-34ad-73be-6660-f62d39f932c4}
 
Followup:     MachineOwner
---------
 
rax=0000000000000000 rbx=00007ff6302ee258 rcx=00000000fffffffc
rdx=00000000000001ac rsi=00000000000001ac rdi=0000000000000000
rip=00007ffd01f5dd9e rsp=00000016718df050 rbp=00007ff62d767000
 r8=ffffffffffffffff  r9=00007ff62d767000 r10=0000000000000000
r11=0000000000000246 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0         nv up ei pl nz ac pe cy
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010213
ntdll!RtlpWaitOnCriticalSection:
         inc     dword ptr [rax+24h] ds:00000000`00000024=????????
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ntdll!RtlpWaitOnCriticalSection
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ntdll!RtlpEnterCriticalSectionContended
Unable to enumerate locals, HRESULT 0x80004005
Private symbols (symbols.pri) are required for locals.
Type ".hh dbgerr005" for details.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!inline_mysql_mutex_lock [d:\winx64-debug\build\src\include\mysql\psi\mysql_thread.h @ 683]
struct st_mysql_mutex * that = 0x00007ff6`302ee258
char * src_file = 0x00007ff6`2e898b20 "D:\winx64-debug\build\src\sql\sql_class.cc"
unsigned int src_line = 0xeee
int result = 0n-858993460
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!Statement_map::~Statement_map [d:\winx64-debug\build\src\sql\sql_class.cc @ 3823]
class Statement_map * this = 0x00000016`708cddf8
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!THD::~THD [d:\winx64-debug\build\src\sql\sql_class.cc @ 1650]
class THD * this = 0x00000016`708ccd38
struct _db_stack_frame_ _db_stack_frame_ = struct _db_stack_frame_
class THD * orig_thd = 0x00000016`708ccd38
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!THD::`scalar deleting destructor'
class THD * this = 0x00000016`708ccd38
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!threadpool_remove_connection [d:\winx64-debug\build\src\sql\threadpool_common.cc @ 302]
class THD * thd = 0x00000016`708ccd38
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!tp_callback [d:\winx64-debug\build\src\sql\threadpool_common.cc @ 218]
struct TP_connection * c = 0x00000016`708ee780
struct Worker_thread_context worker_context = struct Worker_thread_context
class THD * thd = 0x00000016`708ccd38
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!tp_callback [d:\winx64-debug\build\src\sql\threadpool_win.cc @ 378]
struct _TP_CALLBACK_INSTANCE * instance = 0x00000016`718df638
void * context = 0x00000016`708ee780
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mysqld!work_callback [d:\winx64-debug\build\src\sql\threadpool_win.cc @ 452]
struct _TP_CALLBACK_INSTANCE * instance = 0x00000016`718df638
void * context = 0x00000016`708ee780
struct _TP_WORK * work = 0x00000016`7053b5c0
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ntdll!TppWorkpExecuteCallback
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ntdll!TppWorkerThread
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
kernel32!BaseThreadInitThunk
Unable to enumerate locals, HRESULT 0x80004005
Private symbols (symbols.pri) are required for locals.
Type ".hh dbgerr005" for details.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ntdll!RtlUserThreadStart
Unable to enumerate locals, HRESULT 0x80004005
Private symbols (symbols.pri) are required for locals.
Type ".hh dbgerr005" for details.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ntdll!RtlpWaitOnCriticalSection
Processing 2 threads, please wait
 
.  0  Id: fb0.1290 Suspend: 0 Teb: 00007ff6`2d76e000 Unfrozen
      Priority: 0  Priority class: 32
 
ntdll!NtWaitForAlertByThreadId
ntdll!RtlSleepConditionVariableCS
KERNELBASE!SleepConditionVariableCS
mysqld!pthread_cond_timedwait(struct _RTL_CONDITION_VARIABLE * cond = 0x00007ff6`30bec4b0, struct _RTL_CRITICAL_SECTION * mutex = 0x00007ff6`30bec500, struct timespec * abstime = 0x00000016`6badf638) [d:\winx64-debug\build\src\mysys\my_wincond.c @ 82]
mysqld!inline_mysql_cond_timedwait(struct st_mysql_cond * that = 0x00007ff6`30bec4b0, struct st_mysql_mutex * mutex = 0x00007ff6`30bec500, struct timespec * abstime = 0x00000016`6badf638, char * src_file = 0x00007ff6`300e7058 "--- memory read error at address 0x00007ff6`300e7058 ---", unsigned int src_line = 0xd7) [d:\winx64-debug\build\src\include\mysql\psi\mysql_thread.h @ 1175]
mysqld!my_thread_global_end(void) [d:\winx64-debug\build\src\mysys\my_thr_init.c @ 214]
mysqld!my_end(int infoflag = 0n0) [d:\winx64-debug\build\src\mysys\my_init.c @ 209]
mysqld!mysqld_exit(int exit_code = 0n0) [d:\winx64-debug\build\src\sql\mysqld.cc @ 2161]
mysqld!win_main(int argc = 0n145, char ** argv = 0x00000016`6bc11438) [d:\winx64-debug\build\src\sql\mysqld.cc @ 6106]
mysqld!mysql_service(void * p = 0x00000000`00000000) [d:\winx64-debug\build\src\sql\mysqld.cc @ 6128]
mysqld!mysqld_main(int argc = 0n22, char ** argv = 0x00000016`6bc021e0) [d:\winx64-debug\build\src\sql\mysqld.cc @ 6321]
mysqld!main(int argc = 0n22, char ** argv = 0x00000016`6bc021e0) [d:\winx64-debug\build\src\sql\main.cc @ 26]
(Inline Function) --------`-------- 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!RtlUserThreadStart
 
.  1  Id: fb0.1a58 Suspend: 0 Teb: 00007ff6`2d767000 Unfrozen
      Priority: 0  Priority class: 32
 
ntdll!NtGetContextThread
ntdll!RtlpAllocateHeap
ntdll!RtlAllocateHeap
kernel32!MakeSortNode
 
Total threads: 2
quit:



 Comments   
Comment by Marko Mäkelä [ 2023-02-16 ]

I do not think that the originally reported crash in THD::~THD() is there any more, but I failed to find the change that I suspect could have fixed it. That crash reminds me of MDEV-12749, but that is something else, related to the test driver for ./mtr --embedded.

However, this test fails for other reasons. Starting with 10.6 where DDL is supposed to be crash safe, we really would not want to see this type of failure:

10.6 82b18a83618bc1bf8b31a8d9a5f0a01bc91b552a

CURRENT_TEST: innodb.log_file_name
mysqltest: At line 22: query 'RENAME TABLE t1 TO t2' failed: <Unknown> (2013): Lost connection to server during query
Version: '10.6.12-MariaDB-debug-log'  socket: ''  port: 16340  Source distribution
Assertion failed: err != DB_DUPLICATE_KEY, file D:\Buildbot\amd64-windows\build\storage\innobase\row\row0mysql.cc, line 2691
230125 10:42:42 [ERROR] mysqld got exception 0x80000003 ;
ucrtbase.dll!_wassert()
server.dll!row_rename_table_for_mysql()[row0mysql.cc:2691]
server.dll!innobase_rename_table()[ha_innodb.cc:13771]
server.dll!ha_innobase::rename_table()[ha_innodb.cc:14192]

The reason why I post this update is that I got this assertion failure on a 10.10 based branch on Debian GNU/Linux, in the same line of the test.

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