Bug 1279076 - rcpbind.sock removed when daemon is killed
rcpbind.sock removed when daemon is killed
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpcbind (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Steve Dickson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-07 12:48 EST by Laurent Bigonville
Modified: 2015-12-13 04:51 EST (History)
2 users (show)

See Also:
Fixed In Version: rpcbind-0.2.3-5.fc23 rpcbind-0.2.3-4.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-01 12:52:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
0001-Delete-the-unix-socket-only-if-we-have-created-it.patch (1.56 KB, patch)
2015-11-09 16:24 EST, Laurent Bigonville
no flags Details | Diff

  None (edit)
Description Laurent Bigonville 2015-11-07 12:48:16 EST
Hello,

When rpcbind is socket activated by systemd, it's not creating the rpcbind.sock socket itself but it is still trying to unlink() it in the terminate() function.

On Fedora, the socket is created as root by systemd but then the daemon is running as rpc user, this means that when the terminate function is called it has not the permission to remove the socket; on fedora strace shows me:

unlink("/var/run/rpcbind.lock")         = -1 EACCES (Permission denied)

But on other distribution, like debian, where rpcbind daemon is running as root (we could discuss whether it's a good idea or not), the rpcbind daemon has the permission to remove the socket and then the daemon is never respawned. The user needs to manually restart the rcpbind.socket unit.

I guess that the daemon should try to remember if it has created the socket, and if it's not the case it should leave it alone.
Comment 1 Steve Dickson 2015-11-09 10:41:47 EST
The upstream post
   http://marc.info/?l=linux-nfs&m=144708364412358&w=2
Comment 2 Laurent Bigonville 2015-11-09 16:24 EST
Created attachment 1091963 [details]
0001-Delete-the-unix-socket-only-if-we-have-created-it.patch
Comment 3 Laurent Bigonville 2015-11-10 07:07:55 EST
I can confirm that the attached patch fixed my issue where rpcbind daemon was taking the responsibility of removing the socket even if it didn't create it.

If rpcbind is not socket activated, it removes the socket on exit like it was doing before
Comment 4 Steve Dickson 2015-11-16 14:31:28 EST
(In reply to Laurent Bigonville from comment #3)
> I can confirm that the attached patch fixed my issue where rpcbind daemon
> was taking the responsibility of removing the socket even if it didn't
> create it.
> 
> If rpcbind is not socket activated, it removes the socket on exit like it
> was doing before

Would you mind posting the patch to the NFS upstream (linux-nfs@vger.kernel.org)
with the proper Subject, description and Signed-off-by: line?

I'll take it from there... TIA!
Comment 5 Steve Dickson 2015-11-18 14:36:30 EST
Upstream Commit:

commit 3a664b1b5a310df39bd0f325b0edb1deb31c2249
Author: Laurent Bigonville <bigon@bigon.be>
Date:   Wed Nov 18 14:34:26 2015 -0500

    Delete the unix socket only if we have created it
Comment 6 Fedora Update System 2015-11-18 15:54:36 EST
rpcbind-0.2.3-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-1d70b94342
Comment 7 Fedora Update System 2015-11-19 09:51:02 EST
rpcbind-0.2.3-4.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update rpcbind'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-c5f1daca43
Comment 8 Fedora Update System 2015-11-19 10:26:00 EST
rpcbind-0.2.3-5.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update rpcbind'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-1d70b94342
Comment 9 Fedora Update System 2015-11-19 11:54:39 EST
rpcbind-0.2.3-5.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update rpcbind'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-1d70b94342
Comment 10 Fedora Update System 2015-12-01 12:52:24 EST
rpcbind-0.2.3-5.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2015-12-13 04:51:55 EST
rpcbind-0.2.3-4.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.