Bug 28481 - NFS locking (rpc.statd) broken with kernel 2.2.17-14 (workaround included)
Summary: NFS locking (rpc.statd) broken with kernel 2.2.17-14 (workaround included)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: nfs-utils
Version: 7.0
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Pete Zaitcev
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-20 18:56 UTC by Philip Spencer
Modified: 2005-10-31 22:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-02-20 19:29:48 UTC
Embargoed:


Attachments (Terms of Use)

Description Philip Spencer 2001-02-20 18:56:05 UTC
With the current kernel and glibc combination (kernel 2.2.17 / glibc
2.2-12), rpc.statd does not work. It logs "gethostbyname error" messages
when looking up its own host name. The resolver appears to be trying to
look in /etc/hosts and fails when this inaccessible due to the chrooting of
rpc.statd. A second problem is that rpc.statd logs messages to systlog in
UTC instead of the local timezone, presumably due to the inaccessibility of
/etc/localtime.

There is a line in the statd.c source file which indicates that this was a
problem before
and a fix was attempted by calling sethostent(1) before chrooting:

  /* Arm the ****** resolver before chroot() so it doesn't fail
   * trying to open /etc/* for the dozenth time
   */
  sethostent(1);

However, this fix no longer works with the current kernel / glibc
combination (at least not on our systems). It also doesn't address the
problem with the incorrect times in the system log.

We have temporarily worked around the problem by creating a directory
/var/lib/nfs/statd/etc and putting copies of /etc/resolv.conf, /etc/hosts,
and /etc/localtime there. This fixes both of the above-mentioned problems.
However this is a suboptimal solution since it means maintaining two
separate copies of each of these files, and who knows what else rpc.statd
might be missing out on.

Comment 1 Bob Matthews 2001-02-26 17:48:04 UTC
Fixed in current version of nfs-utils (0.2.1).


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