RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2112941 - rpcbind.socket dies upon try-restart, causing related services (e.g. ypbind) to become unavailable
Summary: rpcbind.socket dies upon try-restart, causing related services (e.g. ypbind) ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nfs-utils
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-01 14:54 UTC by Dave Wysochanski
Modified: 2022-11-15 13:19 UTC (History)
3 users (show)

Fixed In Version: nfs-utils-2.5.4-15.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 11:22:03 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-129798 0 None None None 2022-08-01 14:59:55 UTC
Red Hat Product Errata RHBA-2022:8376 0 None None None 2022-11-15 11:22:11 UTC

Description Dave Wysochanski 2022-08-01 14:54:33 UTC
This bug was initially created as a copy of Bug #2100395

I am copying this bug because: 



Description of problem:

Upon rpcbind package update the following command is issued from rpm scriptlet:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
systemctl try-restart rpcbind.service rpcbind.socket
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

This ends up having the rpcbind.socket fail to start, because rpcbind.service is already active and also hijacked the sockets.

The journal shows some kind of race condition between the service and the socket:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# journalctl -b -u rpcbind.service -u rpcbind.socket -o short-precise
-- Logs begin at Thu 2022-06-23 10:59:56 CEST, end at Thu 2022-06-23 11:01:01 CEST. --
Jun 23 11:00:00.387955 vm-rhel8 systemd[1]: Starting RPC Bind...
Jun 23 11:00:00.454849 vm-rhel8 systemd[1]: Started RPC Bind.
Jun 23 11:00:35.378595 vm-rhel8 systemd[1]: Stopping RPC Bind...
Jun 23 11:00:35.380285 vm-rhel8 systemd[1]: rpcbind.service: Succeeded.
Jun 23 11:00:35.380591 vm-rhel8 systemd[1]: Stopped RPC Bind.

Jun 23 11:00:35.381691 vm-rhel8 systemd[1]: Starting RPC Bind...

--> This is rpcbind.service restart

Jun 23 11:00:35.384161 vm-rhel8 systemd[1]: rpcbind.socket: Succeeded.
Jun 23 11:00:35.384504 vm-rhel8 systemd[1]: Closed RPCbind Server Activation Socket.
Jun 23 11:00:35.384525 vm-rhel8 systemd[1]: Stopping RPCbind Server Activation Socket.

--> This is rpcbind.socket restart, only the stop happens due to rpcbind.service hijacking the sockets

Jun 23 11:00:35.384595 vm-rhel8 systemd[1]: rpcbind.socket: Socket service rpcbind.service already active, refusing.
Jun 23 11:00:35.384618 vm-rhel8 systemd[1]: Failed to listen on RPCbind Server Activation Socket.
Jun 23 11:00:35.384656 vm-rhel8 systemd[1]: Dependency failed for RPC Bind.
Jun 23 11:00:35.384673 vm-rhel8 systemd[1]: rpcbind.service: Job rpcbind.service/start failed with result 'dependency>

# netstat -anlp | egrep -w "rpcbind|111"
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1559/rpcbind        
tcp6       0      0 :::111                  :::*                    LISTEN      1559/rpcbind        
udp        0      0 0.0.0.0:111             0.0.0.0:*                           1559/rpcbind        
udp6       0      0 :::111                  :::*                                1559/rpcbind        
unix  2      [ ACC ]     STREAM     LISTENING     20232    1559/rpcbind         /run/rpcbind.sock

--> everything held by "rpcbind" instead of "systemd"
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Interestingly, when stracing *systemd*, I'm not able to reproduce, which seems to indicate there is some race.

Version-Release number of selected component (if applicable):

Up to rpcbind-1.2.5-8.el8.x86_64 included

How reproducible:

Always

Steps to Reproduce:
1. Execute "systemctl try-restart rpcbind.service rpcbind.socket"

Actual results:

Job for rpcbind.socket failed.
See "systemctl status rpcbind.socket" and "journalctl -xe" for details.
A dependency job for rpcbind.service failed. See 'journalctl -xe' for details.

Expected results:

No error

Comment 1 Dave Wysochanski 2022-08-01 15:02:22 UTC
SteveD and QE please set milestones as needed - jsut setting to match the RHEL8 bug milestones.

Comment 2 Steve Dickson 2022-08-01 17:22:00 UTC
commit 8a835cebb149ba2a54b6518722c79019cf8e3da4 (HEAD -> master, origin/master, origin/HEAD)
Author: Benjamin Coddington <bcodding>
Date:   Mon Aug 1 13:19:04 2022 -0400

    rpc-statd.service: Stop rpcbind and rpc.stat in an exit race

Comment 3 Yongcheng Yang 2022-08-19 09:20:16 UTC
Verified in nfs-utils-2.5.4-15.el9

[root@fsqe-r430-02 ~]# rpm -q nfs-utils rpcbind
nfs-utils-2.5.4-15.el9.x86_64
rpcbind-1.2.6-2.el9.x86_64
[root@fsqe-r430-02 ~]# time systemctl try-restart rpcbind.service rpcbind.socket

real    0m0.014s
user    0m0.002s
sys     0m0.004s
[root@fsqe-r430-02 ~]# time systemctl try-restart rpcbind.service rpcbind.socket

real    0m0.012s
user    0m0.003s
sys     0m0.002s
[root@fsqe-r430-02 ~]# time systemctl try-restart rpcbind.service rpcbind.socket

real    0m0.013s
user    0m0.002s
sys     0m0.006s
[root@fsqe-r430-02 ~]# time systemctl restart rpcbind.socket

real    0m0.012s
user    0m0.005s
sys     0m0.003s
[root@fsqe-r430-02 ~]# time systemctl restart rpcbind.socket

real    0m0.012s
user    0m0.003s
sys     0m0.005s
[root@fsqe-r430-02 ~]# time systemctl restart rpcbind.socket

real    0m0.012s
user    0m0.005s
sys     0m0.003s

Comment 7 errata-xmlrpc 2022-11-15 11:22:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (nfs-utils bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8376


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