Merge lp:~laurynas-biveinis/percona-server/bug805805-1060136-1061118-5.1 into lp:percona-server/5.1
Status: | Superseded |
---|---|
Proposed branch: | lp:~laurynas-biveinis/percona-server/bug805805-1060136-1061118-5.1 |
Merge into: | lp:percona-server/5.1 |
Diff against target: |
134 lines (+39/-6) 6 files modified
Percona-Server/configure.in (+6/-0) Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.cc (+4/-1) Percona-Server/mysql-test/r/percona_signal_handling.result (+3/-0) Percona-Server/mysql-test/t/percona_signal_handling.test (+8/-0) Percona-Server/sql/net_serv.cc (+6/-2) Percona-Server/vio/viosocket.c (+12/-3) |
To merge this branch: | bzr merge lp:~laurynas-biveinis/percona-server/bug805805-1060136-1061118-5.1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Needs Fixing | ||
Review via email: mp+128054@code.launchpad.net |
This proposal has been superseded by a proposal from 2012-10-09.
Description of the change
Fix:
- bug 1060136 (safe_process.
mysqld on SIGSTOP/SIGCONT);
- bug 1061118 (Patch to remove excessive fcntl() calls was never
ported correctly to 5.1);
- bug 805805 (attaching to percona-server with gdb disconnects
clients).
These bugs are fixed together because fixing bug 1061118 exposes bug
805805, and the testcase for the latter requires bug 1060136 to be
fixed.
For bug 1060136, the issue is that safe_process.cc is setup to kill
the child on SIGCHLD signal. But this signal may be raised when child
receives non-killing signals too, such as SIGSTOP/SIGCONT, resulting
in safe_process killing the child on such signals too. Fixed by
limiting SIGCHLD only to killing signals, by specifying the
SA_NOCLDSTOP option.
For bug 1061118, the issue is that the fcntl()-removing patch is
dependant on NO_ALARM C preprocessor define being defined. But
nothing in the build defined it. Fixed by adding it to configure.in.
If Percona Server suppported more platforms, a better fix would be to
backport SO_SNDTIMEO/
5.1 lifecycle an unconditional define is enough. In addition to
NO_DEBUG, we also define SIGNAL_
latter is not defined, percona_
server returning query execution interrupted error instead of closing
the socket. To avoid regressing on upstream bug
http://
on Linux, wait_timeout is effective 10x longer), backport its
vio_should_retry() too. This same backport is used by the Facebook
5.1 branch.
For bug 805805, the issue is that mysqld (with fcntl()s removed,
i.e. the above fixed) will close the the connections upon receiving
SIGSTOP/SIGCONT. This is caused by network read from socket being
cancelled with errno = EINTR on these signals. Normally this is
handled by my_real_read() retrying the read on EINTR, but the
fcntl()-removal patch has disabled this inadvertently in
my_real_read() and my_real_write(). Added a testcase
percona_
http://
Unmerged revisions
- 484. By Laurynas Biveinis
-
Fix:
- bug 1060136 (safe_process.cc/safe_ process. pl should not kill
mysqld on SIGSTOP/SIGCONT);
- bug 1061118 (Patch to remove excessive fcntl() calls was never
ported correctly to 5.1);
- bug 805805 (attaching to percona-server with gdb disconnects
clients).These bugs are fixed together because fixing bug 1061118 exposes bug
805805, and the testcase for the latter requires bug 1060136 to be
fixed.For bug 1060136, the issue is that safe_process.cc is setup to kill
the child on SIGCHLD signal. But this signal may be raised when child
receives non-killing signals too, such as SIGSTOP/SIGCONT, resulting
in safe_process killing the child on such signals too. Fixed by
limiting SIGCHLD only to killing signals, by specifying the
SA_NOCLDSTOP option.For bug 1061118, the issue is that the fcntl()-removing patch is
dependant on NO_ALARM C preprocessor define being defined. But
nothing in the build defined it. Fixed by adding it to configure.in.
If Percona Server suppported more platforms, a better fix would be to
backport SO_SNDTIMEO/SO_RCVTIMEO checks from 5.5, but at this point in
5.1 lifecycle an unconditional define is enough. In addition to
NO_DEBUG, we also define SIGNAL_WITH_VIO_ CLOSE to follow 5.5. If the
latter is not defined, percona_innodb_ kill_idle_ trx* tests regress by
server returning query execution interrupted error instead of closing
the socket. To avoid regressing on upstream bug
http://bugs.mysql. com/bug. php?id= 52633 (When building with -DNO_ALARM
on Linux, wait_timeout is effective 10x longer), backport its
vio_should_retry() too. This same backport is used by the Facebook
5.1 branch.For bug 805805, the issue is that mysqld (with fcntl()s removed,
i.e. the above fixed) will close the the connections upon receiving
SIGSTOP/SIGCONT. This is caused by network read from socket being
cancelled with errno = EINTR on these signals. Normally this is
handled by my_real_read() retrying the read on EINTR, but the
fcntl()-removal patch has disabled this inadvertently in
my_real_read() and my_real_write(). Added a testcase
percona_signal_ handling.
Looks good except that
1) as I wrote in bug #1061118, I don't think we should bother enabling the feature in our 5.1 binaries and then backporting the fix for http:// bugs.mysql. com/bug. php?id= 52633 from 5.5
We can keep the fix (and the test case) though. The test case could reference the bug #.