-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CA-395554 Improve fairlocking reliability
Under some circumstances (when the listen queue is short enough) a process's blocking connect() to a UNIX-domain stream socket can return success even when the server side has not yet called accept(). To work around this, we have the server portion write a small fixed blob of data to each new connection and require the client to read it before it considers itself to have the lock; merely being connected successfully is no longer sufficient. Signed-off-by: Tim Smith <[email protected]>
- Loading branch information
Tim Smith
committed
Jul 23, 2024
1 parent
7d2b243
commit 25cd938
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -237,5 +237,14 @@ Manager and some other packages | |
%{_unitdir}/[email protected] | ||
%{_libexecdir}/fairlock | ||
|
||
%posttrans fairlock | ||
## On upgrade, shut down existing lock services so new ones will | ||
## be started. There should be no locks held during upgrade operations | ||
## so this is safe. | ||
if [ $1 -gt 1 ]; | ||
then | ||
systemctl stop $(systemctl list-units fairlock@* --all --no-legend | cut -d' ' -f1) | ||
fi | ||
|
||
%changelog | ||
|