Bug #74821 DETECTED DEADLOCK are not shown in error log
Submitted: 12 Nov 2014 14:48 Modified: 10 Dec 2014 8:40
Reporter: Naheem Munir Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.6.18-enterprise-commercial-advanced-lo OS:Linux (Red Hat Enterprise Linux Server release 6.3)
Assigned to: CPU Architecture:Any
Tags: Deadlock not shown in error log but shows in show engine innodb status

[12 Nov 2014 14:48] Naheem Munir
Description:
We are getting deadlock reported when execute "show engine innodb status" but they do not appear in mysqld.log error log.

Here is an example

when did show engine innodb status

the result:

------------------------
LATEST DETECTED DEADLOCK
------------------------
2014-11-12 13:03:10 7f1ae404b700
*** (1) TRANSACTION:
TRANSACTION 617392430, ACTIVE 0 sec starting index read
mysql tables in use 3, locked 3

----Text Removed ----

*** (2) TRANSACTION:
TRANSACTION 617392429, ACTIVE 0 sec fetching rows
mysql tables in use 1, locked 1

----Text Removed ----

*** (2) WAITING FOR THIS LOCK TO BE GRANTED:

----Text Removed ----

*** WE ROLL BACK TRANSACTION (1)

When I checked mysqld.log the last reported deadlock error was different time. no mention of the above time.

2014-11-12 10:29:08 16874 [ERROR] /usr/sbin/mysqld: Deadlock found when trying to get lock; try restarting transaction
2014-11-12 10:29:08 16874 [ERROR] /usr/sbin/mysqld: Sort aborted: Deadlock found when trying to get lock; try restarting transaction

How to repeat:
Just check when there is a deadlock if it is also appearing in error log.
[10 Dec 2014 8:40] MySQL Verification Team
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ 

Also, Please see http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_print_all_dead...
- http://dev.mysql.com/doc/refman/5.6/en/innodb-monitors.html
- http://dev.mysql.com/doc/refman/5.6/en/innodb-i_s-tables.html
[14 Jan 2020 16:07] Stephen McCants
The documentation referenced here does not explain the behavior seen or how to fix it.

Sounds like a bug to me.