The Samba-Bugzilla – Attachment 12581 Details for
Bug 12287
CTDB PID file handling is too weak
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Additional patch for 4.4
BZ12287_4.4_additional.patch (text/plain), 1.39 KB, created by
Martin Schwenke
on 2016-10-17 04:53:18 UTC
(
hide
)
Description:
Additional patch for 4.4
Filename:
MIME Type:
Creator:
Martin Schwenke
Created:
2016-10-17 04:53:18 UTC
Size:
1.39 KB
patch
obsolete
>From a0227fc6eb544cc10a158274d2675bcb4d6e916f Mon Sep 17 00:00:00 2001 >From: Martin Schwenke <martin@meltin.net> >Date: Mon, 10 Oct 2016 13:16:01 +1100 >Subject: [PATCH] ctdb-scripts: ctdbd_wrapper should never remove the PID file > >kill_ctdbd() kills the daemon and then removes the PID file. This is >racy because a new daemon could write a new PID file in between the >kill and the removal. Reversing these steps would be an improvement. > >However, none of the places where kill_ctdbd() is called is a safe >place to remove the PID file. There is always a chance that a new >daemon could start, write a new PID file and then kill_ctdbd() could >remove the new PID file. > >ctdbd is able to overwrite a stale PID file by checking to see if it >is locked. > >Therefore, entirely drop removal of the PID file from ctdbd_wrapper. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12287 > >Signed-off-by: Martin Schwenke <martin@meltin.net> >Reviewed-by: Volker Lendecke <vl@samba.org> >(cherry picked from commit 56d526c6ea3150a19dd0762b45d23a7c5f96d260) >--- > ctdb/config/ctdbd_wrapper | 1 - > 1 file changed, 1 deletion(-) > >diff --git a/ctdb/config/ctdbd_wrapper b/ctdb/config/ctdbd_wrapper >index be251e6..7d4304a 100755 >--- a/ctdb/config/ctdbd_wrapper >+++ b/ctdb/config/ctdbd_wrapper >@@ -181,7 +181,6 @@ kill_ctdbd () > > if [ -n "$_session" ] ; then > pkill -9 -s "$_session" 2>/dev/null >- rm -f "$pidfile" > fi > } > >-- >2.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
amitay
:
review+
Actions:
View
Attachments on
bug 12287
:
12506
|
12507
|
12580
| 12581