rpcbind silently breaks when restarted

Bug #924593 reported by Steve Atwell
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rpcbind (Ubuntu)
Expired
High
Unassigned

Bug Description

Under certain conditions, a restart of rpcbind can prevent it from listening on the ports it's supposed to listen on.

If there are open connections to rpcbind when it shuts down, those connections will end up in TIME_WAIT. Because rpcbind doesn't use the SO_REUSEADDR socket option, those TIME_WAIT connections prevent it from binding to the same port before those connections have timed out.

To reproduce:

root@satwelltest1:~# nc localhost sunrpc &
[1] 12244
root@satwelltest1:~# stop portmap
portmap stop/waiting
[1]+ Done nc localhost sunrpc
root@satwelltest1:~# start portmap
portmap start/running, process 12252
root@satwelltest1:~# rpcinfo -p localhost
rpcinfo: can't contact portmapper: RPC: Remote system error - Connection refused

/var/log/daemon.log contains:

Jan 31 16:03:53 satwelltest1 rpcbind: cannot bind tcp: Address already in use

And notice that rpcbind is actually running, but is only bound to the TCP sunrpc port on IPv6, not IPv4:

root@satwelltest1:~# lsof -p 12252 | grep :sunrpc
rpcbind 12252 root 6u IPv4 32182 0t0 UDP *:sunrpc
rpcbind 12252 root 10u IPv6 32190 0t0 UDP *:sunrpc
rpcbind 12252 root 12u IPv6 32194 0t0 TCP *:sunrpc (LISTEN)

This is on Precise with rpcbind 0.2.0-7ubuntu1.

tags: added: css-sponsored-p rls-mgr-p-tracking
Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :

This seems to be fixed in upstream commit 68556dc512493868960b367406e04d7169c003a8.

tags: removed: rls-mgr-p-tracking
tags: added: rls-mgr-p-tracking
Steve Langasek (vorlon)
Changed in rpcbind (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Laurent Bigonville (bigon) wrote :

Is this still an issue with recent versions?

Changed in rpcbind (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for rpcbind (Ubuntu) because there has been no activity for 60 days.]

Changed in rpcbind (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.