Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 236514 - rpcbind won't start on bootup
Summary: rpcbind won't start on bootup
Status: CLOSED DUPLICATE of bug 236639
Alias: None
Product: Fedora
Classification: Fedora
Component: rpcbind
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Steve Dickson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-04-15 19:41 UTC by Saikat Guha
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-04-17 13:11:26 UTC

Attachments (Terms of Use)

Description Saikat Guha 2007-04-15 19:41:15 UTC
rpcbind doesn't start up, freezes during init.
Manually skipping all rpc services allows bootup.
Starting rpcbind manually after booting up freezes rpcbind

Problem seems to be that the AF_INET socket that rpcbind ends up
binding to is on a *random* port instead of the 111 portmapper
port. Later when rpcbind itself attempts to send a packet, it sends
it to port 111 which is not open.

Adding rpcbind to /etc/services as an alias of 111 fixes the problem
  sunrpc          111/tcp         portmapper rpcbind      # RPC 4.0 portmapper TCP
  sunrpc          111/udp         portmapper rpcbind      # RPC 4.0 portmapper UDP

Looking through the rpcbind code, it appears rpcbind is supposed to fallback to
using the portmapper port if it can't one in /etc/services for rpcbind.

Line 116: static char servname[] = "rpcbind";
Line 385: if ((aicode = getaddrinfo(hosts[nhostsbak],
                servname, &hints, &res)) != 0) {
              if ((aicode = getaddrinfo(hosts[nhostsbak],
                            "portmapper", &hints, &res)) != 0) {

However, it would appear that getaddrinfo is returning a 0 return value even
when it couldn't find a port for "rpcbind" in /etc/services. According to the
man page for getaddrinfo, it should return -1 with errno set to EAI_SERVICE or
EAI_NONAME when the service cannot be found.

Is this a glibc bug? Or is it a rpcbind bug?

Also, rpcbind should probably be listed explicitly in /etc/services which is
owned by the setup package.

Possible resolutions:
1. Add rpcbind to the port 111 line in /etc/services
2a. Fix getaddrinfo to return -1 when the service is not found; if that is not
considered a bug,
2b. Fix rpcbind to detect if getaddrinfo failed to find a suitable port some
other way.

Comment 1 Steve Dickson 2007-04-17 13:11:26 UTC

*** This bug has been marked as a duplicate of 236639 ***

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