Bug #68929 Crash injection site crash_commit_before_unlog either misplaced, either misnamed
Submitted: 11 Apr 2013 9:41 Modified: 28 Mar 2014 19:37
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.6.10 OS:Any
Assigned to: CPU Architecture:Any

[11 Apr 2013 9:41] Laurynas Biveinis
Description:
MYSQL_BIN_LOG::ordered_commit() has a crash injection site crash_commit_before_unlog near its end:
...
finish_commit(...);

if (do_rotate)
{
  DBUG_EXECUTE_IF("crash_commit_before_unlog", DBUG_SUICIDE(););
  ...
  rotate(...);
  ...
  purge(...);
  ...
}
DBUG_RETURN(...);

It looks as if this site ended up here by accident after the 5.6 group commit refactoring.

- The site is after finish_commit() call, so the commit is already completed at this point.

- The site is only hit if the binlog file needs rotating, thus a better name would be "crash_after_commit_before_binlog_rotate".

- Or, it can be moved to TC_LOG_MMAP::unlog() or TC_LOG_MMAP::commit() under its current name. But even there it'd be still a different crash site than in 5.5 where it was the last commit step for all transactions.

How to repeat:
Read the code

Suggested fix:
Rename, move, or remove it.
[10 Feb 2014 12:37] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Fixed in MySQL 5.6.17 and 5.7.4. Closed.
[28 Mar 2014 19:37] Laurynas Biveinis
5.6$ bzr log -r 5804 -n0
------------------------------------------------------------
revno: 5804
committer: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
branch nick: Bug17596226_mysql-5.6
timestamp: Mon 2014-02-10 11:07:38 +0530
message:
  Bug#17596226:CRASH INJECTION SITE CRASH_COMMIT_BEFORE_UNLOG
  EITHER MISPLACED, EITHER MISNAMED.
  
  Problem:
  ========
  MYSQL_BIN_LOG::ordered_commit() has a crash injection site
  crash_commit_before_unlog near its end:
   ...
   finish_commit(...);
  It looks as if this site ended up here by accident after the
  5.6 group commit refactoring. The site is after
  finish_commit() call, so the commit is already completed at
  this point. Hence either Rename, move, or remove it.
  
  Fix:
  ===
  Since there is no test code which tests this crash injection
  point the debug point is removed.