Bug #108985 mysqld got exception 0xc0000005
Submitted: 3 Nov 2022 13:11 Modified: 8 Nov 2022 18:30
Reporter: Tuhinanshu Mr Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.30 OS:Windows (Server 2019)
Assigned to: CPU Architecture:Other (x64)
Tags: exception 0xc0000005, jemalloc, mysql 8.0.30

[3 Nov 2022 13:11] Tuhinanshu Mr
Description:
We have a windows server 2019 VM running with MySQL 8.0.30 and today while running, mysql crashed automatically with below error log. Need help in rectifying this issue and if any modifications required, please suggest: -

08:02:18 UTC - mysqld got exception 0xc0000005 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x0
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...
7ffb77d0b496    jemalloc.dll!???
7ffb77d0b918    jemalloc.dll!???
7ffb77d0ef91    jemalloc.dll!je_realloc()
7ffb399de833    libcrypto-1_1-x64.dll!CRYPTO_memcmp()
7ffb399a956d    libcrypto-1_1-x64.dll!CRYPTO_memcmp()
7ffb398b263c    libcrypto-1_1-x64.dll!CRYPTO_memcmp()
7ffb39a592ff    libcrypto-1_1-x64.dll!CRYPTO_memcmp()
7ffb8bb550e7    ntdll.dll!RtlAnsiStringToUnicodeString()
7ffb8bb527a4    ntdll.dll!LdrShutdownThread()
7ffb8bb77b3e    ntdll.dll!RtlExitUserThread()
7ffb87d6728a    KERNELBASE.dll!FreeLibraryAndExitThread()
7ffb881604c4    ucrtbase.dll!_o_exp()
7ffb881b1119    ucrtbase.dll!_endthreadex()
7ff684ea4605    mysqld.exe!?modify_thread_cache_size@Per_thread_connection_handler@@SAXK@Z()
7ff6863787a9    mysqld.exe!?deallocate@?$allocator@V?$sub_match@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@@std@@@std@@QEAAXQEAV?$sub_match@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@@2@_K@Z()
7ff685f3139c    mysqld.exe!?my_thread_self_setname@@YAXPEBD@Z()
7ffb881603ba    ucrtbase.dll!_o_exp()
7ffb88d57e94    KERNEL32.DLL!BaseThreadInitThunk()
7ffb8bb77ad1    ntdll.dll!RtlUserThreadStart()
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

How to repeat:
Not sure how to repeat this.
[3 Nov 2022 13:12] Tuhinanshu Mr
MySql Error Log file

Attachment: WIN-961OQ4PTC15.err (application/octet-stream, text), 136.19 KiB.

[3 Nov 2022 13:13] Tuhinanshu Mr
My.ini file for MySQL

Attachment: my.ini (application/octet-stream, text), 14.63 KiB.

[4 Nov 2022 6:35] Tuhinanshu Mr
Waiting for a revert on this as this is impacting all servers installed at our end
[4 Nov 2022 12:49] MySQL Verification Team
Hi MR. Mr,

Thank you for your bug report.

However, we have not been able to repeat it, since you have not supplied us with a test case.

Also, if you are using our Thread Pool Plugin, then you run our Enterprise version, so you can raise a ticket in MySQL Support portal.
[5 Nov 2022 5:30] Tuhinanshu Mr
How to check and confirm if I am using Thread Pool Plugin? Please suggest what information you require from my end to recreate case at your end.
Also if you feel this should be raised on some other portal, can you transfer this bug to that portal. 
Please assist as this is leading to high downtimes in all systems where we have used MySQL 8.0
[7 Nov 2022 13:22] MySQL Verification Team
Hi Mr. Mr,

Please, try using our community build, for Windows, from http://dev.mysql.com.

Then , let us know if you have problems .....
[7 Nov 2022 18:18] Tuhinanshu Mr
I had downloaded windows setup from below link: -

https://dev.mysql.com/downloads/windows/installer/8.0.html

Facing issue in the community version only. If there is any other link please share.
[8 Nov 2022 12:48] MySQL Verification Team
Hi Mr. Mr,

Thank you for the feedback.

If you analyse closely that stacktrace, you will see that a crash happens in the malloc library for Windows. We do not maintain that library, so you should create a bug with the company that delivers jemalloc library.

It could also be OS error, but the crash does not happen in our code. Hence, there is not our bug.
[8 Nov 2022 16:10] MySQL Verification Team
this is actually a duplicate of:
 https://bugs.mysql.com/bug.php?id=108341

which is fixed in 8.0.32.
Workaround is to rename jemalloc.dll to avoid loading it.
[8 Nov 2022 18:30] Tuhinanshu Mr
Thank you very much for the detailed explanation. When can we expect the stable release of 8.0.32 so that I can upgrade all current mysql 8.0.31 database instances to 8.0.32