Bug #110424 Tomcat App looses DB connection after MySQL crash
Submitted: 19 Mar 2023 0:11 Modified: 23 Apr 2023 14:12
Reporter: Jagadish M Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:8.0.32 OS:Red Hat (RHEL 8.7)
Assigned to: MySQL Verification Team CPU Architecture:x86 (AMD)

[19 Mar 2023 0:11] Jagadish M
Description:
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
BuildID[sha1]=64a1d52e8c241c89abf59dc7d461f945ce41974c
Thread pointer: 0x7f43a4021460
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...
stack_bottom = 7f438e5e3c50 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0x213f0a1]
/usr/sbin/mysqld(print_fatal_signal(int)+0x387) [0xfdfcd7]
/usr/sbin/mysqld(handle_fatal_signal+0xa5) [0xfdfd95]
/lib64/libpthread.so.0(+0x12cf0) [0x7f445aa4bcf0]
/lib64/libc.so.6(gsignal+0x10f) [0x7f4458dfaaff]
/lib64/libc.so.6(abort+0x127) [0x7f4458dcdea5]
/lib64/libc.so.6(+0x91097) [0x7f4458e3d097]
/lib64/libc.so.6(+0x984ec) [0x7f4458e444ec]
/lib64/libc.so.6(+0x99e88) [0x7f4458e45e88]
/usr/sbin/mysqld(MDL_context::release_lock(enum_mdl_duration, MDL_ticket*)+0x262) [0x12b98d2]
/usr/sbin/mysqld(MDL_context::release_locks_stored_before(enum_mdl_duration, MDL_ticket*)+0x53) [0x12b9ae3]
/usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0x289d) [0xe7343d]
/usr/sbin/mysqld(dispatch_sql_command(THD*, Parser_state*)+0x4de) [0xe7519e]
/usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0xd4c) [0xe7647c]
/usr/sbin/mysqld(do_command(THD*)+0x207) [0xe78727]
/usr/sbin/mysqld() [0xfcfc50]
/usr/sbin/mysqld() [0x290e4b9]
/lib64/libpthread.so.0(+0x81ca) [0x7f445aa411ca]
/lib64/libc.so.6(clone+0x43) [0x7f4458de5e73] Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f43a68f5790): commit
Connection ID (thread ID): 24
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.

Tomcat Application connected to MySQL DB looses communication and stops functioning

In Tomcat logs::Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure. The last packet successfully received from the server was 6,196 milliseconds ago. The last packet sent successfully to the server was 6,196 milliseconds ago.

Saw an similar issue which was supposed to be fixed in MySQL 8.0.32. We are the release MySQL 8.0.32. The crash has been seen several times in production systems. This issue can re-created.

How to repeat:
This issue can re-created

From The Tomcat Application, when report creation job is triggered this crash can be seen after a few attempts.

Suggested fix:
MySQL has to be restarted. Tomcat Application has to restarted.
[20 Mar 2023 13:47] MySQL Verification Team
Bogdan,

This looks exactly like:

https://bugs.mysql.com/bug.php?id=102801

but that one was fixed in 8.0.26.
[20 Mar 2023 14:48] MySQL Verification Team
Hi,

We need more data about how to reproduce this crash.

Thanks
[23 Mar 2023 12:35] Jagadish M
Thanks Bogdan,

I am not able to access the Bug 

https://bugs.mysql.com/bug.php?id=102801

Can you please provide the details.

We can get into a call & show you how we can reproduce this issue.

Regards
Jagadish
[23 Mar 2023 14:12] MySQL Verification Team
Hi,

This is not MySQL Support, but forum for bugs with fully repeatable test cases.

Hence, we can not enter into any calls .....

Regarding that bug, no you can not see it, as it is a Security Vulnerability bug with a full test case.

Test case is exactly what you are required to provide.
[24 Apr 2023 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".