dccm misbehaving on Solaris 9

Andy Rudoff andy@rudoff.com
Wed Mar 1 23:16:48 UTC 2006


> Contrary to that web page, I don't see why it wouldn't be possible to
> maintain binary compatibility with old programs but also support new
> ones expecting reasonable (i.e. post PDP-11) behavior with any of the
> many kludges used to maintain binary compatibility as system calls changed,
> such as the change from 16-bit to 32-bit i-numbers for the stat()
> system call in various UNIX flavors.   Of course that question is moot
> and boring for anyone outside Sun Microsystems.

Not defending, just explaining, the issue has to do with poorly-designed
stdio macros that are compiled into existing binaries and which will cause
core dumps if stdio ever has file descriptors greater than 255.  The ugly
details have been weighed against promises of binary compatibility for
years inside Sun and caused lots of grief, but as you point out the
details are not that interesting here.

What would seem to be interesting here is what to do about it when
using dcc on Solaris.  Three ideas come to mind:

1. build dcc 64-bit on Solaris, so the problem goes away.

2. workaround the problem by changing the way dcc calls fdopen/fopen
    (i.e. play the trick of moving non-stdio descriptors higher to free
    up the lower descriptors, and/or handle the failure case in some
    new, interesting way)

3. workaround the problem by linking dcc against a different stdio.
    (sfio at http://www.research.att.com/sw/tools/sfio/ is a common
    choice for this exact issue)

> anyone who would write code that stuffs a file descriptor into a char
> after about 1975 cannot be relied on to set errno.  It's a wonder that
> amazing code bothers to check if the FD is >255.

I can't argue with that :-)

> Given that restriction on file descriptors for fopen() and fdopen(),
> I don't understand why it doesn't fail most times when
> /var/dcc/whiteclnt needs to be re-parsed.  
> whiteclnt must be re-parsed every time its mtime changes and every hour or
> two if it previous contained host names whose IP addresses might change.

Yea, I'm a little curious about that too.  I'm new to this list and
am just now installing dcc on several Solaris machines, so it will be
interesting to see if I run into this too.  It seems like it would
be useful to come up with instructions for option 1 or option 3 above
and supply them in a README.Solaris file or something.  I'm certainly
willing to contribute to that, but not until after I'd had a little
more experience using dcc...

-andy  (wondering if the fire in my canyon is headed Vernon's way...)




More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.