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

Richard Wirth r.wirth at wirthware.de
Thu Feb 3 08:33:58 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.
>>>   in CSocketIO::accept() the select() statement seams to be buggy...

--- shnipp ---

RW> System is linux 2.6.8-24.11 x86_64

RW> So I've found a workaround for the problem:

RW> When sockets are only created for AF_INET or AF_INET6, all is going
RW> well. The problem only occures, when the listener sockets are created
RW> for both AF_INET and AF_INET6. Than accept() returns -1 and errno is
RW> 22 (INVALID PARAMETER) for the second listener socket created.

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?

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

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

There must be a bug in linux there.

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

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





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



More information about the cvsnt-dev mailing list