Double fil_system->mutex exit in fil_extend_space_to_desired_size if posix_fallocate is used

Bug #1287098 reported by Raghavendra D Prabhu on 2014-03-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server
Status tracked in 5.6
5.1
Undecided
Unassigned
5.5
Undecided
Unassigned
5.6
High
Laurynas Biveinis

Bug Description

Here:

 /* At this point it is safe to release fil_system mutex. No
other thread can rename, delete or close the file because
we have set the node->being_extended flag. */
mutex_exit(&fil_system->mutex);

start_page_no = space->size;
file_start_page_no = space->size - node->size;

#ifdef HAVE_POSIX_FALLOCATE
if (srv_use_posix_fallocate) {

mutex_exit(&fil_system->mutex);
success = os_file_set_size(node->name, node->handle,
(size_after_extend
- file_start_page_no) * page_size);
mutex_enter(&fil_system->mutex);
if (success) {
node->size += (size_after_extend - start_page_no);
space->size += (size_after_extend - start_page_no);
os_has_said_disk_full = FALSE;
}
node->being_extended = FALSE;
fil_node_complete_io(node, fil_system, OS_FILE_READ);
goto complete_io;
}
#endif

the mutex_exit and mutex_enter are reversed. (may be a merge regression etc.)

Related branches

lp:~laurynas-biveinis/percona-server/bug1287098
Merged into lp:percona-server at revision 553
Laurynas Biveinis: Approve on 2014-03-04
tags: added: merge-regression xtradb
summary: - fil_system->mutex order is reversed
+ Double fil_system->mutex exit in fil_extend_space_to_desired_size if
+ posix_fallocate is used
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers