[cvsnt-dev] Re: bug in lockserver (unix build)

Richard Wirth r.wirth at wirthware.de
Thu Feb 3 10:27:53 GMT 2005

Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.

Hello Tony,

>>>>   there is a bug in cvslockd:
>>>>   It consumes 99% of cpu time.

RW> --- shnipp ---

RW>> It looks like the system can not listen on both AFs at the same time!
RW>> May be it is mapped internaly between the AFs?

RW> It is mapped from IPv4 to IPv6 and vice versa. So listening on only
RW> one PF is good (for linux).

RW> But it is a bug in the system, and it is not only on linux 2.6.
RW> x86_64. I can also see this on any 2.6 system with IPv6 enabled and
RW> also on linux 2.4.20 (ia32).
RW> While Solaris (with IPv6 enabled) works correctly.

RW> There must be a bug in linux there.

RW> getaddrinfo() returns one record for PF_INET and a second one for
RW> PF_INET6. In consequenze there are two sockets created. But on linux
RW> you can not listen on both, so one failes.

RW> So what to do? Remove the failing socket in CSocketIO::accept(), or
RW> not binding to both PFs at all on linux?

Took further investigations:

The docs for linux and Tru64 say it is not allowed to bind to the same
address && port for IPv4 and IPv6.

And as we can see from our (some what more instrumented) code
CSocketIO::bind() already failes when binding the socket with errno 98
(address already in use). So this is the place for closing and
removing the socket. It doesn't matter which one of the sockets is
used for binding, linux will route all connection attempts from IPv4
and IPv6 to our socket.

So the problem seems to be solved now (?). I'll commit my changes...

Best regards,
 Richard                            mailto:r.wirth at wirthware.de

More information about the cvsnt-dev mailing list