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

Bug #1287098 reported by Raghavendra D Prabhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
High
Laurynas Biveinis
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
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

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
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-766

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.