Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
Notice: | Welcome to the Digital UNIX Conference |
Moderator: | SMURF::DENHAM |
Created: | Thu Mar 16 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 10068 |
Total number of notes: | 35879 |
A customer writes: I have run across a very peculiar situation in a program I am writing using Digital Unix 4.0A. The situation is a follows: My program must connect to over 1024 processes via sockets. The config files for the program list the processes to connect to by machine name. My program then goes through the lists specified in the config files and performs a gethostbyname() call on each machine name to obtain the value required for a connect(). If I allocate the file descriptor for each "remote" process as I go, then once I have used up 1024 file descriptors gethostbyname() becomes unstable and causes the program to core dump. If I bypass the gethostbyname() call by pre-looking up all the machine names and using their dotted quad equivalents, the program executes correctly. Unfortunately, the "pre-lookup" work-around does not work for processes that need to be added dynamically (see below). I have checked the kernel and it is currently set to allow 4096 active file descriptor per process. My select mask width is set to 2048. The test machine is an Alpha 333Mhz, with 256MB ram running 4.0A. Does anyone have any suggestions? Joel McClung
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
9718.1 | might be a bug? | SMURF::DUSTIN | Mon May 05 1997 18:23 | 9 | |
This sounds to me like it might be a bug in gethostbyname(), maybe it's not closing auxilary file descriptors used for remote name lookups (NIS, Bind)? I'd file a QAR, especially since it works one way and not the other (ie. it sounds like it may be a bug in the library code). John |