guy@auspex.auspex.com (Guy Harris) (10/24/89)
Bug number 110 says: Description: The calls to gethostbyname and getservbyname in atk/help/src/helpa.c turn into blocking, non-CPU-intensive calls that never return. Could libcx be corrupted? A small non-Andrew test program that calls gethostbyname executes fine. Mail from janssen: It seems that gethostbyname is not being linked into either runapp or helpa.do. How is this supposed to be linked in? The answer to the second question seems to be "it's linked into the '.do' file, although it's a bit hard to find it with vanilla debuggers". The problem seems to be that some bit of data that is, I think, "calloc"ed by the SunOS 4.x RPC code is somehow getting corrupted, so that part of an RPC call sent out by the Yellow Pages-based "getservbyname" call is garbage (the AUTH_NONE credentials, to be specific; AUTH_NONE credentials contain no data, but the claimed length seemed to be about 500K). This means that the portmapper (for it is he that is being called) doesn't respond, and just drops the message on the floor silently. I don't know *why* this is happening, but if you add some of the RPC stuff to the list of routines included into "runapp" rather than the ".do" files, the problem appears to go away, at least on the Sun-4 running 4.0.3 on which I tried it. (Given that the RPC routines are, in fact, *not* in "runapp", but in the shared C library that "runapp" attaches to, I suspect that in SunOS 4.x there's less of a win to moving routines not used by lots of applications into the ".do" files out of "runapp".) The following patch to "getlist.awk" in "overhead/class/machdep/sun_{68k,sparc}" seems to make the problem go away (tested for SPARC, the file is the same for 68K and SPARC, and the problem may be as well): *** getlist.awk.dist Fri Sep 22 08:09:31 1989 --- getlist.awk Fri Oct 20 18:08:59 1989 *************** *** 80,85 **** --- 80,89 ---- want[definer["_gcvt"]] = "Y"; want[definer["_getdtablesize"]] = "Y"; want[definer["_getpagesize"]] = "Y"; + want[definer["_getpwuid"]] = "Y"; + want[definer["_clntudp_create"]] = "Y"; + want[definer["_authnone_create"]] = "Y"; + want[definer["_authunix_create"]] = "Y"; want[definer["_ioctl"]] = "Y"; want[definer["_isatty"]] = "Y"; want[definer["_lseek"]] = "Y";