rpcbind silently breaks when restarted
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@satwelltes
[1] 12244
root@satwelltes
portmap stop/waiting
[1]+ Done nc localhost sunrpc
root@satwelltes
portmap start/running, process 12252
root@satwelltes
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@satwelltes
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 |
tags: | removed: rls-mgr-p-tracking |
tags: | added: rls-mgr-p-tracking |
Changed in rpcbind (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
This seems to be fixed in upstream commit 68556dc51249386 8960b367406e04d 7169c003a8.