~akopytov/percona-xtrabackup/bug1294782-2.1

  • Committer: Alexey Kopytov
  • Date: 2014-04-29 13:56:43 UTC
  • Revision ID: akopytov@gmail.com-20140429135643-oam4se6xby3n27xp
Bug #1294782: Innobackupex hangs on fatal error in some cases

The problem was that the code in both innobackupex and xtrabackup, that
was supposed to make sure no child processes are left running in case
innobackupex got killed or failed with an error, relied on the fact the
SIGTERM and SIGINT signals were not blocked by the xtrabackup process
(or any other child processes spawned by innobackupex).

When innobackupex terminates gracefully, it calls kill_child_processes()
to send SIGTERM to its children.

There’s also (Linux-specific) auto-termination logic in xtrabackup for
cases when innobackupex is killed or terminates ungracefully. It worked
as follows: the xtrabackup process called prctl(PR_SET_PDEATHSIG,
SIGINT) on start, so that SIGINT is sent automatically in case the parent
process (innobackupex) dies.

However, both SIGTERM and SIGINT might be blocked by the
process that had invoked innobackupex, for example, by the PXC server
processes doing an SST, in which case they were also blocked by the
xtrabackup process, since the signal mask is inherited by child
processes.

Fixed by replacing SIGTERM in innobackupex and SIGINT in xtrabackup
auto-termination with SIGKILL.

Also removed some ancient code around FTWRL. It has been unnecessary for
a long time, which has been reported in duplicate bug #1311120.

No test case, as it is impossible in Bash to create a signal mask that
would be inherited by child processes. Signal masks created by ‘trap’
are only inherited by built-in commands according to the manual.
Filename Latest Rev Last Changed Committer Comment Size
..
contrib 241.3.1 13 years ago Daniël van Eeden Add contrib directory with an backup script exampl Diff
doc 213.3.1 13 years ago Aleksandr Kuzminsky Added XtraBackup manual page Diff
patches 228.1.2 13 years ago Alexey Kopytov Port XtraBackup to Percona Server 5.5.9-beta20.1 c Diff
src 385.1.1 12 years ago Alexey Kopytov Rebase of the parallel compression patch on new tr Diff
test 134.1.1 13 years ago Aleksandr Kuzminsky Added the XtraBackup test framework Diff
utils 30.1.2 15 years ago Vadim Tkachenko directory restructure Diff
.bzrignore 733 10 years ago Hrvoje Matijakovic - PXB-2.1.8 release notes - removed the percona-th 222 bytes Diff Download File
BUILD-WIN.txt 244.4.1 13 years ago Alexey Kopytov Added initial support for Windows builds: - remov 2.9 KB Diff Download File
BUILD.txt 610.1.1 10 years ago Hrvoje Matijakovic - bugs fixed: Bug #1190663 and Bug #1181317 - re 2.2 KB Diff Download File
CMakeLists.txt 244.4.1 13 years ago Alexey Kopytov Added initial support for Windows builds: - remov 1.6 KB Diff Download File
COPYING 174.1.1 13 years ago Stewart Smith add COPYING file with GPLv2 license. xtrabackup is 18.6 KB Diff Download File
innobackupex.pl 740 9 years ago Alexey Kopytov Bug #1294782: Innobackupex hangs on fatal error in 164 KB Diff Download File
Makefile 737.2.1 9 years ago Alexey Kopytov Implementation of https://blueprints.launchpad.net 2.9 KB Diff Download File
VERSION 732.1.1 10 years ago Alexey Bychko xtrabackup release 2.1.8 25 bytes Diff Download File