Bug #93715 MySQL Server Crash (Access Violation) whilst reading from Information_schema
Submitted: 21 Dec 2018 10:26 Modified: 23 Apr 13:29
Reporter: Pete Dishman Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.7.24 OS:Microsoft Windows
Assigned to: CPU Architecture:x86

[21 Dec 2018 10:26] Pete Dishman
Description:
On two completely separate servers, both running MySQL 5.7.24, we've seen identical server crashs.
In both instances the same query is listed in the error report.
This is a query that runs every few seconds on the server using the c client library.

In one of the crashes, a backup process would have just started (using mysqldump) but nothing like that in the other instance.

Server Version is:
mysqld  Ver 5.7.24-enterprise-commercial-advanced for Win32 on AMD64 (MySQL Enterprise Server - Advanced Edition (Commercial))

Error report / Backtrace:

00:15:32 UTC - mysqld got exception 0xc0000005 ;
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.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=58
max_threads=400
thread_count=41
connection_count=40
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 390659 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x255dd300
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...
b49c74    mysqld.exe!my_strnxfrmlen_unicode_full_bin()
b48e9a    mysqld.exe!my_strnxfrmlen_unicode_full_bin()
22be15    mysqld.exe!?well_formed_copy_nchars@@YAIPBUcharset_info_st@@PADI0PBDIIPAPBD33@Z()
386115    mysqld.exe!?field_well_formed_copy_nchars@@YAIPBUcharset_info_st@@PADI0PBDIIPAPBD33@Z()
38f43b    mysqld.exe!?store@Field_varstring@@UAE?AW4type_conversion_status@@PBDIPBUcharset_info_st@@@Z()
2bc0d1    mysqld.exe!??RFill_process_list@@UAEXPAVTHD@@@Z()
271caa    mysqld.exe!?do_for_all_thd_copy@Global_THD_manager@@QAEXPAVDo_THD_Impl@@@Z()
2b7e67    mysqld.exe!?fill_schema_processlist@@YAHPAVTHD@@PAUTABLE_LIST@@PAVItem@@@Z()
2bdf8a    mysqld.exe!?deallocate@?$allocator@Ust_mysql_show_var@@@std@@QAEXPAUst_mysql_show_var@@I@Z()
2bfff7    mysqld.exe!?get_schema_tables_result@@YA_NPAVJOIN@@W4enum_schema_table_state@@@Z()
3ee066    mysqld.exe!?prepare_result@JOIN@@QAE_NXZ()
3ec235    mysqld.exe!?handle_query@@YA_NPAVTHD@@PAULEX@@PAVQuery_result@@_K3@Z()
283d3e    mysqld.exe!?execute_init_command@@YAXPAVTHD@@PAUst_mysql_lex_string@@PAUst_mysql_rwlock@@@Z()
285c23    mysqld.exe!?mysql_execute_command@@YAHPAVTHD@@_N@Z()
2894bf    mysqld.exe!?mysql_parse@@YAXPAVTHD@@PAVParser_state@@@Z()
282bf1    mysqld.exe!?dispatch_command@@YA_NPAVTHD@@PBTCOM_DATA@@W4enum_server_command@@@Z()
2838e4    mysqld.exe!?do_command@@YA_NPAVTHD@@@Z()
22e156    mysqld.exe!handle_connection()
aec001    mysqld.exe!?reserve@?$vector@EV?$allocator@E@std@@@std@@QAEXI@Z()
858a86    mysqld.exe!my_thread_once()
b6c1cf    mysqld.exe!my_wildcmp_mb()
b6c316    mysqld.exe!my_wildcmp_mb()
75307c04    KERNEL32.DLL!BaseThreadInitThunk()
7734ad8f    ntdll.dll!RtlInitializeExceptionChain()
7734ad5a    ntdll.dll!RtlInitializeExceptionChain()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (34730d08): SELECT Id, User, Host, db, Command, Time, State, SUBSTRING(Info, 1, 200) AS Info FROM information_schema.PROCESSLIST WHERE Command NOT IN('Sleep', 'Daemon', 'Binlog Dump')  AND User NOT IN('event_scheduler', 'system user')  AND Id <> CONNECTION_ID()  AND Time >= 3
Connection ID (thread ID): 126938
Status: NOT_KILLED

How to repeat:
Unknown?
[12 Mar 14:49] Sinisa Milivojevic
Hi,

Thank you for your bug report.

However, in order to verify the bug, we need to be able to repeat it.

So, see if you can repeat the bug by manually running the following query:

SELECT Id, User, Host, db, Command, Time, State, SUBSTRING(Info, 1, 200) AS Info FROM information_schema.PROCESSLIST WHERE Command NOT IN('Sleep', 'Daemon', 'Binlog Dump')  AND User  NOT IN('event_scheduler', 'system user')  AND Id <> CONNECTION_ID()  AND Time >= 3;

If you are able to repeat the bug by crashing the above query, can you then send us just the output from :

SELECT * FROM information_schema.processlist;

So, that we can try to repeat it.

Thanks in advance.
[13 Mar 8:51] Pete Dishman
That query is running every few seconds on the server(s) in question so it's not causing the crash on it's own.

We've had some more reports of this crash on a couple of other servers, but I haven't seen the details for those yet.

Will update here when I do
[13 Mar 14:39] Sinisa Milivojevic
Hi,

We will be grateful if you manage to catch the processlist that causes the crash.
[14 Apr 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".