xref: /netbsd-src/external/bsd/am-utils/dist/BUGS (revision a53f50b9b44dc9467ccc9c464999b1d1c509cb0c)
1*a53f50b9Schristos	    LIST OF KNOWN BUGS IN AM-UTILS OR OPERATING SYSTEMS
2*a53f50b9Schristos
3*a53f50b9SchristosNote: report am-utils bugs via Bugzilla to https://bugzilla.am-utils.org/ or
4*a53f50b9Schristosby email to the am-utils mailing list (see www.am-utils.org).
5*a53f50b9Schristos
6*a53f50b9Schristos
7*a53f50b9Schristos(1) mips-sgi-irix*
8*a53f50b9Schristos
9*a53f50b9Schristos[1A] known to have flaky NFS V.3 and TCP.  Amd tends to hang or spin
10*a53f50b9Schristosinfinitely after a few hours or days of use.  Users must install recommended
11*a53f50b9Schristospatches from vendor.  Patches help, but not all the time.  Otherwise avoid
12*a53f50b9Schristosusing NFS V.3 and TCP on these systems, by setting
13*a53f50b9Schristos
14*a53f50b9Schristos	/defaults opts:=vers=2,proto=udp
15*a53f50b9Schristos
16*a53f50b9Schristos[1B] yp_all() leaks a file descriptor.  Eventually amd runs out of file
17*a53f50b9Schristosdescriptors and hangs.  Am-utils circumvents this by using its own version
18*a53f50b9Schristosof yp_all which uses udp and iterates over NIS maps.  The latter isn't as
19*a53f50b9Schristosreliable as yp_all() which uses TCP, but it is better than hanging.
20*a53f50b9Schristos
21*a53f50b9Schristos(I have some reports that older version of hpux-9, with older libc, also
22*a53f50b9Schristosleak file descriptors.)
23*a53f50b9Schristos
24*a53f50b9Schristos[1C] SGI's MIPSpro C compiler on IRIX 6 has the unfortunate habit of
25*a53f50b9Schristoscreating code specificially for the machine it runs on.  The ABI and ISA
26*a53f50b9Schristosused depend very much on the OS version and compiler release used.  This
27*a53f50b9Schristosmeans that the resulting amd binary won't run on machines different from
28*a53f50b9Schristosthe build host, particularly older ones.  Older versions of am-utils
29*a53f50b9Schristosenforced the O32 ABI when compiling with cc to work around this, but this
30*a53f50b9SchristosABI is deprecated in favor of the N32 ABI now, so we use -n32 -mips3 to
31*a53f50b9Schristosensure that the binaries run on every host capable of running IRIX 6 at
32*a53f50b9Schristosall.  If this is not appropriate for you, configure with something like
33*a53f50b9SchristosCC='cc -64' instead to get the desired ABI and ISA.
34*a53f50b9Schristos
35*a53f50b9Schristos(2) alpha-unknown-linux-gnu (RedHat Linux 4.2)
36*a53f50b9Schristos
37*a53f50b9Schristoshasmntopt(mnt, opt) can go into an infinite loop if opt is any substring
38*a53f50b9Schristosof mnt->mnt_opts.  Redhat 5.0 does not have this libc bug.  Here is an
39*a53f50b9Schristosexample program:
40*a53f50b9Schristos
41*a53f50b9Schristos#include <stdio.h>
42*a53f50b9Schristos#include <mntent.h>
43*a53f50b9Schristosmain()
44*a53f50b9Schristos{
45*a53f50b9Schristos  struct mntent mnt;
46*a53f50b9Schristos  char *cp;
47*a53f50b9Schristos  mnt.mnt_opts = "intr,rw,port=1023,timeo=8,foo=br,retrans=110,indirect,map=/usr/local/AMD/etc/amd.proj,boo";
48*a53f50b9Schristos  cp = hasmntopt(&mnt, "ro");
49*a53f50b9Schristos  printf("cp = %s\n", cp);
50*a53f50b9Schristos  exit(0);
51*a53f50b9Schristos}
52*a53f50b9Schristos
53*a53f50b9SchristosIt is possible that sufficiently newer version of libc for RH4.2 fix this
54*a53f50b9Schristosproblem.
55*a53f50b9Schristos
56*a53f50b9Schristos
57*a53f50b9Schristos(3) mips-dec-ultrix4.3
58*a53f50b9Schristos
59*a53f50b9SchristosRainer Orth <ro@TechFak.Uni-Bielefeld.DE> reports
60*a53f50b9Schristos
61*a53f50b9Schristos[3A] One needs the Kernel Config Files (UDTBIN430) subset installed to
62*a53f50b9Schristoscompile am-utils, otherwise essential header files (net/if.h, net/route.h,
63*a53f50b9Schristosrpcsvc/mount.h, rpcsvc/yp_prot.h, rpcsvc/ypclnt.h, sys/proc.h) are
64*a53f50b9Schristosmissing.
65*a53f50b9Schristos
66*a53f50b9Schristos[3B] It's probably impossible to build am-utils with DEC C on Ultrix V4.3.
67*a53f50b9SchristosThis compiler is pseudo-ANSI only.  Maybe the new ANSI C compiler in V4.3A
68*a53f50b9Schristosand beyond will do.  I successfully used gcc 2.8.1.
69*a53f50b9Schristos
70*a53f50b9Schristos[3C] You need to build against a recent libhesiod (I used 3.0.2) and
71*a53f50b9Schristoslibresolv/lib44bsd (I used BIND 4.9.5-P1).  The resolver routines in
72*a53f50b9Schristoslibc seem to cause random memory corruption.  It is necessary to specify
73*a53f50b9SchristosLIBS=-l44bsd.  lib44bsd is a helper library of libresolv used to supply
74*a53f50b9Schristosfunctions like strdup which are missing on the host system.  This isn't
75*a53f50b9Schristoscurrently autoconfiscated.
76*a53f50b9Schristos
77*a53f50b9Schristos[3D] You need to configure with CONFIG_SHELL=/bin/sh5 /bin/sh5 buildall;
78*a53f50b9Schristos/bin/sh cannot handle the shell functions used in buildall and is both
79*a53f50b9Schristosbuggy and slow.
80*a53f50b9Schristos
81*a53f50b9Schristos[3E] At least the gcc 2.7.0 fixincludes-mangled <sys/utsname.h> needs a
82*a53f50b9Schristosforward declaration of struct utsname to avoid lots of gcc warnings:
83*a53f50b9Schristos
84*a53f50b9SchristosRCS file: RCS/utsname.h,v
85*a53f50b9Schristosretrieving revision 1.1
86*a53f50b9Schristosdiff -u -r1.1 utsname.h
87*a53f50b9Schristos--- utsname.h   1995/06/19 13:07:01     1.1
88*a53f50b9Schristos+++ utsname.h   1998/01/27 12:34:26
89*a53f50b9Schristos@@ -59,6 +59,7 @@
90*a53f50b9Schristos #ifdef KERNEL
91*a53f50b9Schristos #include "../h/limits.h"
92*a53f50b9Schristos #else /* user mode */
93*a53f50b9Schristos+struct utsname;
94*a53f50b9Schristos extern int     uname _PARAMS((struct utsname *));
95*a53f50b9Schristos #endif
96*a53f50b9Schristos #define __SYS_NMLN 32
97*a53f50b9Schristos
98*a53f50b9Schristos
99*a53f50b9Schristos(4) powerpc-ibm-aix4.2.1.0
100*a53f50b9Schristos
101*a53f50b9Schristos[4A] "Randall S. Winchester" <rsw AT Glue.umd.edu> reports that for amd to
102*a53f50b9Schristosstart, you need to kill and restart rpc.mountd and possibly also make sure
103*a53f50b9Schristosthat nfsd is running.  Normally these are not required.
104*a53f50b9Schristos
105*a53f50b9Schristos[4B] "Stefan Vogel" <vogel AT physik.unizh.ch> reports that if your amq
106*a53f50b9Schristosexecutable dump core unexpectedly, then it may be a bug in gcc 2.7.x.
107*a53f50b9SchristosUpgrade to gcc 2.8.x or use IBM's xlC compiler.
108*a53f50b9Schristos
109*a53f50b9Schristos[C] Do not link amd with libnsl.  It is buggy and causes amd to core dump
110*a53f50b9Schristosin strlen inside strdup inside svc_register().
111*a53f50b9Schristos
112*a53f50b9Schristos
113*a53f50b9Schristos(5) *-linux-rh51 (RedHat Linux 5.1)
114*a53f50b9Schristos
115*a53f50b9SchristosThere's a UDP file descriptor leak in libnsl in RedHat Linux 5.1.  This
116*a53f50b9Schristoslibrary part of glibc2.  Am-utils currently declares redhat 5.1 systems as
117*a53f50b9Schristoshaving a "broken yp_all" and using an internal, slower, leak-free version.
118*a53f50b9SchristosThe leak is known to the glibc maintainers and a fix from them is due soon,
119*a53f50b9Schristosbut it is not yet in the glibc-2.0.7-19 RPM.
120*a53f50b9Schristos
121*a53f50b9Schristos
122*a53f50b9Schristos(6) rs6000-ibm-aix4.1.x
123*a53f50b9Schristos
124*a53f50b9SchristosA bug in libc results in an amq binary that doesn't work; amq -v dumps core
125*a53f50b9Schristosin xdr_string.  There is no known fix (source code or vendor patch) at this
126*a53f50b9Schristostime.  (Please let us know if you have a fix; see www.am-utils.org.)
127*a53f50b9Schristos
128*a53f50b9Schristos
129*a53f50b9Schristos(7) *-aix4.3.2.0
130*a53f50b9Schristos
131*a53f50b9SchristosThe plock() function will pre-reserve all of the memory up to the maximum
132*a53f50b9Schristoslisted in the ulimit.  If the ulimit is infinite, plock() will try to take
133*a53f50b9Schristosall of the system's memory, and fail with ENOMEM (Not Enough Space).
134*a53f50b9SchristosNormally ulimit may be set to a few gigs of max memory usage, but even that
135*a53f50b9Schristosis too much; Amd doesn't need more than a few megs of resident memory size
136*a53f50b9Schristos(depending on the particular usage, number of maps, etc.)  Solution: lower
137*a53f50b9Schristosyour ulimit before starting amd.  This can be done inside the ctl-amd
138*a53f50b9Schristosscript, but be careful not to limit it too low.  Alternatively, don't use
139*a53f50b9Schristosplock on aix-4.3: set it to plock=no in amd.conf (which is the default if
140*a53f50b9Schristosyou do nothing).
141*a53f50b9Schristos
142*a53f50b9Schristos
143*a53f50b9Schristos(8) *-linux (systems using glibc 2.1, such as RedHat-6.x)
144*a53f50b9Schristos
145*a53f50b9SchristosThere's a UDP file descriptor leak in the NIS routines in glibc, especially
146*a53f50b9Schristosthose that do yp_bind.  Until this is bug fixed, do not set nis_domain in
147*a53f50b9Schristosamd.conf, but let the system pick up the default domain name as set by your
148*a53f50b9Schristossystem.  That would avoid using the buggy yp_bind routines in libc.
149*a53f50b9Schristos
150*a53f50b9Schristos
151*a53f50b9Schristos(9) *-linux (SuSE systems using unfsd)
152*a53f50b9Schristos
153*a53f50b9SchristosThe user-level nfsd (2.2beta44) on older SuSE Linux systems (and possibly
154*a53f50b9Schristosothers) dies with a SEGV when amd tries to contact it for access to a volume
155*a53f50b9Schristosthat does not exist, or one for which there is no permission to mount.
156*a53f50b9Schristos
157*a53f50b9Schristos
158*a53f50b9Schristos(10) *-*-hpux11
159*a53f50b9Schristos
160*a53f50b9SchristosIf you're using NFSv3, you must install HP patches PHNE_20344 and
161*a53f50b9SchristosPHNE_20371.  If you don't, and you try to use amd with NFSv3 over TCP, your
162*a53f50b9Schristoskernel will panic.
163*a53f50b9Schristos
164*a53f50b9Schristos
165*a53f50b9Schristos(11) *-linux* (any system using a 2.2.18+ kernel)
166*a53f50b9Schristos
167*a53f50b9SchristosThe Linux kernels don't support Amd's direct mounts very well, leading to
168*a53f50b9Schristoserratic behavior: shares that don't get remounted after the first timeout,
169*a53f50b9Schristosinability to restart Amd because its mount points cannot be unmounted, etc.
170*a53f50b9SchristosThere are some kernel patches on the am-utils Web site, which solve these
171*a53f50b9Schristosproblems.  See http://www.am-utils.org/patches/.
172*a53f50b9Schristos
173*a53f50b9SchristosLater 2.4.x kernels completely disallow the hack amd was using for direct
174*a53f50b9Schristosmounts, so another solution will have to be found.
175*a53f50b9Schristos
176*a53f50b9SchristosNote: the above is for the old-style amd mount_type = nfs. The autofs mounts
177*a53f50b9Schristosdon't support direct mounts at all (due to lack of kernel support).
178*a53f50b9Schristos
179*a53f50b9Schristos(12) *-aix5.1.0.0 and *-hpux9*
180*a53f50b9Schristos
181*a53f50b9Schristos/bin/sh is broken and fails to run the configure script properly. You need
182*a53f50b9Schristosto use /bin/ksh instead. The buildall script will do it for you; if for some
183*a53f50b9Schristosreason you need to run configure directly, run it using 'ksh configure'
184*a53f50b9Schristosinstead of just 'configure'.
185*a53f50b9Schristos
186*a53f50b9Schristos[12A] *-aix5.2.*
187*a53f50b9Schristos
188*a53f50b9SchristosApparently there is an NFS client side bug in vmount() which causes amd to
189*a53f50b9Schristoshang when it starts (and tries to NFS-mount itself).  According to IBM
190*a53f50b9Schristosengineers, this has to do with partial support code for IPv6: the NFS kernel
191*a53f50b9Schristoscode doesn't appear to recognize the sin_family of the amd vmount(),
192*a53f50b9Schristosalthough amd does the right thing.  The bug doesn't appear to be in 5.1 or
193*a53f50b9Schristos4.3.3.  A fix from IBM is available, APAR number IY41417.
194*a53f50b9Schristos
195*a53f50b9SchristosA binary built on 4.3.3 will not work on 5.2, because the kernel ABIs have
196*a53f50b9Schristoschanged.
197*a53f50b9Schristos
198*a53f50b9Schristos[12C] *-aix*
199*a53f50b9Schristos
200*a53f50b9SchristosIt is important that you install bos.net.nfs.adt before configuring and
201*a53f50b9Schristosbuilding am-utils.  If you don't, you will get compile-time or
202*a53f50b9Schristosconfigure-time errors, especially when configure tries to find AIX's
203*a53f50b9Schristosdefinition of struct nfs_args.
204*a53f50b9Schristos
205*a53f50b9Schristos(13) *-linux and *-darwin6.0
206*a53f50b9Schristos
207*a53f50b9SchristosCertain linux kernels (2.4.18+ are fine, 2.4.10- are probably bad, those in
208*a53f50b9Schristosbetween have not been tested) have a bug which causes them to reconnect
209*a53f50b9Schristosbroken NFS/TCP connections using unprivileged ports (greater than 1024),
210*a53f50b9Schristosunlike the initial connections which do originate from privileged
211*a53f50b9Schristosports.  This can upset quite a few NFS servers and causes accesses to the
212*a53f50b9Schristosmounted shares to fail with "Operation not permitted" (EPERM).
213*a53f50b9Schristos
214*a53f50b9SchristosThe darwin (MacOS X) kernel defaults to using unprivileged ports, but that
215*a53f50b9Schristoscan be changed by setting the resvport mount flag (which amd sets by
216*a53f50b9Schristosdefault).  Nonetheless, if a TCP connection breaks, under certain unclear
217*a53f50b9Schristoscircumstances the kernel might "forget" about that flag and start using
218*a53f50b9Schristosunprivileged ports, causing the same EPERM error above.
219*a53f50b9Schristos
220*a53f50b9Schristos(14) Solaris
221*a53f50b9Schristos
222*a53f50b9SchristosThe line "%option" in *.l files may cause Solaris /usr/ccs/bin/lex to abort
223*a53f50b9Schristoswith the error "missing translation value."  This is a bug in Solaris lex.
224*a53f50b9Schristos
225*a53f50b9SchristosMoreover, both Solaris yacc and lex produce code that does not pass strict
226*a53f50b9Schristoscompilation such as "gcc -Wall -Werror".
227*a53f50b9Schristos
228*a53f50b9SchristosUse GNU Flex and Bison instead.  You can download ready-made binaries from
229*a53f50b9Schristoswww.sunfreeware.com.  Note, however, that sometimes the binaries on
230*a53f50b9Schristossunfreeware.com don't seem to work, often because they are built against an
231*a53f50b9Schristosolder revision of Solaris or build tools.  In that case, build a fresh
232*a53f50b9Schristosversion of GNU flex and/or bison from the latest stable sources.  See
233*a53f50b9Schristoshttp://www.gnu.org/software/flex/ and http://www.gnu.org/software/bison/.
234*a53f50b9Schristos
235*a53f50b9Schristos(15) Solaris 8 + patch 10899[34]-xx (18 <= xx < 25) or patch 11260[56]-xx
236*a53f50b9Schristos
237*a53f50b9SchristosWith this patch, Sun updated the autofs kernel module and automountd
238*a53f50b9Schristosuserspace daemon from version 3 to version 4.  They also updated the
239*a53f50b9Schristos/usr/include/rpcsvc/autofs_prot.x file, but forgot to regenerate the
240*a53f50b9Schristosautofs_prot.h file.  Thus, when amd is compiled, it uses the old header and
241*a53f50b9Schristosthinks it should use autofs version 3, when in fact the kernel now supports
242*a53f50b9Schristos(and expects) only version 4.
243*a53f50b9Schristos
244*a53f50b9SchristosThe workaround is to run 'rpcgen -C -h /usr/include/rpcsvc/autofs_prot.x >
245*a53f50b9Schristos/usr/include/rpcsvc/autofs_prot.h' and completely reconfigure and rebuild
246*a53f50b9Schristosam-utils (removing config.cache before running configure).
247*a53f50b9Schristos
248*a53f50b9SchristosThe problem is fixed in patch revisions 10899[34]-25 and up.
249*a53f50b9Schristos
250*a53f50b9Schristos
251*a53f50b9Schristos(16) Linux kernel 2.4+ and lofs mounts
252*a53f50b9Schristos
253*a53f50b9SchristosLofs mounts are not supported by the linux kernel, at all, but since 2.4.0
254*a53f50b9Schristosthe kernel supports a similar type of mount called a bind mount.  Its
255*a53f50b9Schristossemantics are closer to those of a hardlink than to those of lofs, and one
256*a53f50b9Schristosof the results is that bind mounts ignore any mount options paseed to them.
257*a53f50b9Schristos
258*a53f50b9SchristosAmd uses bind mounts internally to emulate lofs mounts, which means that
259*a53f50b9Schristoslofs mounts on linux will effectively ignore their mount parameters and
260*a53f50b9Schristosinherit whatever options the original filesystem mounted upon had.
261*a53f50b9Schristos
262*a53f50b9Schristos
263*a53f50b9Schristos(17) autoconf 2.57
264*a53f50b9Schristos
265*a53f50b9SchristosIf you see configure warnings of the following kind:
266*a53f50b9Schristos
267*a53f50b9Schristosconfigure: WARNING: sys/proc.h: present but cannot be compiled
268*a53f50b9Schristosconfigure: WARNING: sys/proc.h: check for missing prerequisite headers?
269*a53f50b9Schristosconfigure: WARNING: sys/proc.h: proceeding with the preprocessor's result
270*a53f50b9Schristosconfigure: WARNING:     ## ------------------------------------ ##
271*a53f50b9Schristosconfigure: WARNING:     ## Report this to bug-autoconf@gnu.org. ##
272*a53f50b9Schristosconfigure: WARNING:     ## ------------------------------------ ##
273*a53f50b9Schristos
274*a53f50b9Schristosplease ignore them.  They are not real errors, and neither
275*a53f50b9Schristosbug-autoconf@gnu.org nor the am-utils maintainers are interested in hearing
276*a53f50b9Schristosabout them.  Autoconf simply tries to do more than we need and attempts to
277*a53f50b9Schristoscompile each header in isolation, which fails for many system headers.
278*a53f50b9SchristosThat's ok, because we only need to know if a header file exists -- we know
279*a53f50b9Schristoshow to use it properly ourselves.
280*a53f50b9Schristos
281*a53f50b9SchristosWhile autoconf does offer a way to specify other files to be included with
282*a53f50b9Schristosthe tested header, in order to avoid these warnings, using it would enlarge
283*a53f50b9Schristosthe resulting configure script by an order of magnitude, and for no real
284*a53f50b9Schristosgain.  Configure is big enough as it is, we don't need any more useless
285*a53f50b9Schristosbaggage in it.
286*a53f50b9Schristos
287*a53f50b9Schristos(18) NetBSD 2.0.2, FreeBSD 5.4, OpenBSD 3.7, and quite possibly most other
288*a53f50b9Schristos     BSDs and other OSs (as of September 2005)
289*a53f50b9Schristos
290*a53f50b9SchristosSome BSD kernels don't have a way to turn off the NFS attribute cache.  They
291*a53f50b9Schristosdon't have a 'noac' mount flag, and setting various cache timeout fields in
292*a53f50b9Schristosstruct nfs_args doesn't turn off the attribute cache; instead, it sets the
293*a53f50b9Schristosattribute cache timeout to some internal hard-coded default (usually
294*a53f50b9Schristosanywhere from 5-30 seconds).  If Amd cannot turn off the NFS attribute
295*a53f50b9Schristoscache, under heavy Amd usage, users could get ESTALE errors from automounted
296*a53f50b9Schristossymlinks, or find that those symlinks point to the wrong place.  One
297*a53f50b9Schristosworkaround which would minimize this effect is to set auto_attrcache=1 in
298*a53f50b9Schristosyour amd.conf, but it doesn't eliminate the problem!  The best solutions are
299*a53f50b9Schristos(1) to use Amd in Autofs mode, if it's supported in your OS, and (2) talk to
300*a53f50b9Schristosyour OS vendor to support a true "noac" flag.  See README.attrcache for more
301*a53f50b9Schristosdetails.
302*a53f50b9Schristos
303*a53f50b9SchristosErez & the am-utils team.
304