Bug #107920 exception 0xc0000005
Submitted: 20 Jul 2022 7:45 Modified: 21 Jul 2022 8:46
Reporter: Luigi Cangiano Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Archive storage engine Severity:S2 (Serious)
Version:8.0.29 OS:Windows (Windows Server 2016 Datacenter)
Assigned to: CPU Architecture:Any

[20 Jul 2022 7:45] Luigi Cangiano
Description:
23:00:16 UTC - mysqld got exception 0xc0000005 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x2aed7a19e30
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...
7ff7ca493f60    mysqld.exe!?unpack_int64@Field@@IEBAPEBEPEAEPEBE@Z()
7ff7cb63d171    mysqld.exe!??$endl@DU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@@Z()
7ff7cb63ce4a    mysqld.exe!??$endl@DU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@@Z()
7ff7ca20bfd4    mysqld.exe!?ha_rnd_next@handler@@QEAAHPEAE@Z()
7ff7ca6a9fc1    mysqld.exe!?Read@TableScanIterator@@UEAAHXZ()
7ff7ca590acf    mysqld.exe!?ExecuteIteratorQuery@Query_expression@@QEAA_NPEAVTHD@@@Z()
7ff7ca592226    mysqld.exe!?execute@Query_expression@@QEAA_NPEAVTHD@@@Z()
7ff7ca49bd5e    mysqld.exe!?execute_inner@Sql_cmd_dml@@MEAA_NPEAVTHD@@@Z()
7ff7ca49bbdc    mysqld.exe!?execute@Sql_cmd_dml@@UEAA_NPEAVTHD@@@Z()
7ff7ca3f4013    mysqld.exe!?mysql_execute_command@@YAHPEAVTHD@@_N@Z()
7ff7ca3ef1b1    mysqld.exe!?dispatch_sql_command@@YAXPEAVTHD@@PEAVParser_state@@@Z()
7ff7ca3eded2    mysqld.exe!?dispatch_command@@YA_NPEAVTHD@@PEBTCOM_DATA@@W4enum_server_command@@@Z()
7ff7ca3ef4f0    mysqld.exe!?do_command@@YA_NPEAVTHD@@@Z()
7ff7ca201728    mysqld.exe!?modify_thread_cache_size@Per_thread_connection_handler@@SAXK@Z()
7ff7cb69b519    mysqld.exe!??$endl@DU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@@Z()
7ff7cb277fdc    mysqld.exe!?my_thread_self_setname@@YAXPEBD@Z()
7fff3e4bfb80    ucrtbase.dll!_o__realloc_base()
7fff3f5584d4    KERNEL32.DLL!BaseThreadInitThunk()
7fff41d91791    ntdll.dll!RtlUserThreadStart()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (2ae80b20030): SELECT /*!40001 SQL_NO_CACHE */ * FROM `audit_trail`
Connection ID (thread ID): 4486
Status: NOT_KILLED

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:
Honestly no idea.
[20 Jul 2022 7:47] Luigi Cangiano
Structure of the log schema

Attachment: log schema.sql (application/octet-stream, text), 15.82 KiB.

[20 Jul 2022 7:48] Luigi Cangiano
MySQL configuration file

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

[20 Jul 2022 12:48] MySQL Verification Team
Hi Mr. Cangiano,

Thank you for your bug report.

We have run your test case, including the mentioned SELECT. We have also adjusted our settings to you my.ini.

However , we were totally unable to repeat your problem or to get any exception.

We have also searched all bugs for the stacktrace like yours and we have found none.

Can't repeat.
[20 Jul 2022 14:58] Luigi Cangiano
backup script runs once per day

Attachment: backup.cmd (application/octet-stream, text), 944 bytes.

[20 Jul 2022 15:00] Luigi Cangiano
the problem occurs on average every 15-20 days, the mysql service is terminated and the only way to resume normal operation is to delete the 'log' schema and recreate it. This obviously results in data loss.
The server in question is both master and slave in a replication process and, in this case, the 'log' schema receives data from all currently configured slaves (19).
This means that the 'log' schema tables grow continuously.
I doubt that the problem can be related to the amount of data contained by the tables of the 'log' schema. But I have no idea what the trigger could be.
[21 Jul 2022 6:07] MySQL Verification Team
Good general rule of thumb is don't use the ARCHIVE engine for any valuable data.  It's not designed to be reliable and is hardly maintained anymore.  Probably some corruption on that table.
[21 Jul 2022 8:46] Luigi Cangiano
No words on the documentation about the fact the Archive storage engine is "hardly" mantained or "not reliable".

This storage engine seems perfect for managing logs or data that will never be modified and/or deleted.
I'll use a different engine (MyISAM maybe) but in any case I think the documentation needs updating.
Others may run into the same issue.