Percona Server with XtraDB

Race condition between checking status of and deleting a bitmap file

Reported by Laurynas Biveinis on 2013-05-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server
Status tracked in 5.6
5.1
Low
Laurynas Biveinis
5.5
Low
Laurynas Biveinis
5.6
Low
Laurynas Biveinis

Bug Description

Split from bug 1182793:

- a call to log_online_should_overwrite(bitmap file) finding a 0-sized file :

 /* Currently, it's OK to overwrite 0-sized files only */
 success = os_file_get_status(path, &file_info, false);
 return success && file_info.size == 0LL;

- then log_online_start_bitmap_file() trying to delete it and failing because the file is not found, and then aborting the file create.

 /* Check for an old file that should be deleted first */
 if (log_online_should_overwrite(log_bmp_sys->out.name)) {

  success = static_cast<ibool>(
   os_file_delete(innodb_file_bmp_key,
           log_bmp_sys->out.name));
 }

...

 if (UNIV_UNLIKELY(!success)) {

  /* The following call prints an error message */
  os_file_get_last_error(TRUE);
  ib_logf(IB_LOG_LEVEL_ERROR,
   "cannot create \'%s\'\n", log_bmp_sys->out.name);
  log_bmp_sys->out.file = -1;
  return FALSE;
 }

The fix is to ignore file-not-found for the delete attempt.

tags: added: bitmap xtradb
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers