Subject: Re: NetBSD getaddrinfo not reentrant
To: None <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 05/03/2005 14:22:38
In article <20050503161804.GA2201@netbsd.org>,
Bill Studenmund <firstname.lastname@example.org> wrote:
>On Tue, May 03, 2005 at 12:16:18PM -0000, email@example.com wrote:
>> "We're now thinking it has to do with the fact that your platform has
>> no gethostbyname_r functions, and the getaddrinfo function on netbsd,
>> while claiming to be reentrant, actually isn't."
>The getaddrinfo manpage indicates that the current implementation is not
>thread safe. This indication has been in the manpage since revision 1.
>> My questions:
>> 1) Do these statements make sense?
>> 2) Is this a known issue?
>> 3) Has this been addressed in the 3 branch?
>Yes, yes, and AFAIK no.
This is not entirely true. getaddrinfo() is re-entrant for dns queries
and service lookups. Java works fine with it, and there is a test in
regress/lib/libpthread/resolv.c that works. It is when you use NIS, and
other non-reentrant methods where it might break. In fact, reentrant
getaddrinfo was one of the prerequisits to get java working.