Bug 1279076 - rcpbind.sock removed when daemon is killed
Summary: rcpbind.sock removed when daemon is killed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpcbind
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-07 17:48 UTC by Laurent Bigonville
Modified: 2015-12-13 09:51 UTC (History)
2 users (show)

Fixed In Version: rpcbind-0.2.3-5.fc23 rpcbind-0.2.3-4.fc22
Clone Of:
Environment:
Last Closed: 2015-12-01 17:52:26 UTC
Type: Bug
Embargoed:


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

Description Laurent Bigonville 2015-11-07 17:48:16 UTC
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 15:41:47 UTC
The upstream post
   http://marc.info/?l=linux-nfs&m=144708364412358&w=2

Comment 2 Laurent Bigonville 2015-11-09 21:24:43 UTC
Created attachment 1091963 [details]
0001-Delete-the-unix-socket-only-if-we-have-created-it.patch

Comment 3 Laurent Bigonville 2015-11-10 12:07:55 UTC
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 19:31:28 UTC
(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.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 19:36:30 UTC
Upstream Commit:

commit 3a664b1b5a310df39bd0f325b0edb1deb31c2249
Author: Laurent Bigonville <bigon>
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 20:54:36 UTC
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 14:51:02 UTC
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 15:26:00 UTC
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 16:54:39 UTC
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 17:52:24 UTC
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 09:51:55 UTC
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.