serious bug in SunOS rpc.lockd with hostnames >= 20 chars

serious bug in SunOS rpc.lockd with hostnames >= 20 chars

Post by Erik E. Fa » Tue, 27 Nov 1990 18:43:50

        I have configured my Solbourne machine, named,
        as a primary name server.  Unfortunately, I found that NFS
        connection requests from client workstations denied by aladdin.
        I guess that the problem would be caused by the name server.

This may or may not be your problem; your description is not
sufficiently precise to tell.

There is an incredibly egregious bug in all the versions of rpc.lockd
that I was able to find and examine, including SunOS, UNICOS, Ultrix,
etc. Given this range, I would say that this bug is in the original
Sun NFS sources. The bug is that rpc.lockd doesn't use the MAXHOSTNAMELEN
definition from param.h when setting up the buffer for gethostname(2),
and does not use it as one of the arguments to gethostname(2), either.

They just define the buffer to be 20 characters long. Your host name is
precisely that long. The failure mode is that rpc.lockd can't find the
internet address from a truncated hostname, so rpc.lockd doesn't work,
and therefore, all lockf(2) system calls on files on the affected host
hang indefinitely. We found this the hard way.

The simple work around is to use the unqualified simple name of your
host for the {set,get}hostname(2) system calls, and spread around the
FQDN everywhere else that you need it (e.g. resolv.conf,,
etc). Of course, if you have sources, you can make the trivial change
to rpc.lockd, recompile, and be happy. Unfortunately, most people don't
seem to have sources these days.

I also suggest that you call your OS software vendor (be they the
manufacturer of the hardware, or whatever), and let them know that
this kind of dumb coding practice is not acceptable.


1. SunOS error msg: rpc.lockd: Cannot contact status monitor!

I am getting the above error msg coming up on my Sparc5 console on
SunOS4.1.3_U1.   I am running OpenWin windows and have multiple xterm
windows 'rlogin' into other Sun servers on my network.   I also have
multiple Perfmeter windows monitoring remote servers' status.

Where is this error message coming from  ?   Is it my local host server
or one of the remote servers I am  monitoring ?
How do I fix it so that the error msg stops.  It's a real pain because
each time it messes up my Openwin  windows and I have to "refresh".

2. VFAT, FAT32 and Linux on the same drive

3. SunOS rpc.lockd problem resolution

4. need help with ppp chat script

5. rpc.lockd (or lockd) on Linux ?

6. What happenned here?

7. Problem with rpc.lockd [lockd] process

8. PCI Problem with Graphics

9. <<< Job Opportunity Unix Support and Inventory/Purchasing £20-30k >>>

10. << Job Oppertunity Unix Support & Inventory/Purchasing £20-35k >>>

11. >>>SparcStation 20 with Solaris 4.1.3<<<

12. <<< Unix Support and Inventory/Purchasing £20-30k >>>