Re: [exim] exim 4.70 on NetBSD 5.0.1 failure

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Ted Cooper
Data:  
Para: exim-users
Asunto: Re: [exim] exim 4.70 on NetBSD 5.0.1 failure
On Tue, 2009-11-17 at 08:51 +0100, J.R. wrote:
> > Looks like a resolver library problem. Exim isn't multi-threaded,
> > however. Who is generating that message? Dig up that code and check the
> > prerequisites for it to appear.
>
> Got some hints on the netbsd mailing list:
> ---
> _res is a structure used by resolver(3) to resolve domain name queries. As
> it is used as a global variable, access to it cannot be thread-safe (the
> old API does not define a lock that permits the access of this struct in a
> thread-safe manner).
>
> Fix:
> There should be some piece of code in exim 4.70 that uses _res directly.
> It should be rewritten with the res_n*() (res_ninit, res_nsend, ...)
> functions, which are thread-safe.
>
> See also http://netbsd.gw.com/cgi-bin/man-cgi?res_nsend++NetBSD-current
> ---
>
> It seems exim implemented the use of the resolver library the wrong way.
>
> (I'm the only one who wants to use exim on netbsd in the whole world?)


Well it is an issue, but again I think you've missed the key point here:
Exim doesn't use threads, thus it does not access _res in an unsafe
manner.

It's entirely fork() based so each new process will have its own copy of
_res which is can with as it pleases.

Even so, if Exim has access to _res implemented incorrectly, we should
probably look at fixing that. Does anyone know of a good reference
program for whatever resolver library we're talking about?


--
The Exim manual - http://docs.exim.org