Possible regression from timeout commit for resolv.conf

Kevin Day thekevinday at gmail.com
Thu Apr 15 05:12:21 UTC 2010


On Fri, Apr 9, 2010 at 4:19 PM, Denys Vlasenko <vda.linux at googlemail.com> wrote:
> On Tuesday 06 April 2010 15:31, Kevin Day wrote:
>> On 4/6/10, Denys Vlasenko <vda.linux at googlemail.com> wrote:
>> > On Friday 02 April 2010 00:21, Kevin Day wrote:
>> >  > I am using the NPTL branch on x86, which works perfectly fine (in
>> >  > fact, better than any other stable release since 0.9.28)
>> >  > The commit number is: cca45baf8353d1e338d232f5bdb2d1d6b357f1da
>> >  > (http://git.uclibc.org/uClibc/commit/?h=nptl&id=cca45baf8353d1e338d232f5bdb2d1d6b357f1da)
>> >  >
>> >  > With the addition of the commit, the program claws-mail fails to
>> >  > respond to SMTP servers and throws an annoyingly useless error.
>> >  > At first glance I assumed that this to be a claws-mail problem.
>> >
>> >
>> > You did not provide any symptoms. *How* does it fail?
>>
>> Claws Mail returns the following message:
>> ** IMAP error on (null): connection refused
>>
>> This happens during any attempt to connect via domain name.
>
> Looks like DNS lookup failure.
>
> Can you try replacing
>
> uint8_t __resolv_timeout;
> uint8_t __resolv_attempts;
>
> by
>
> uint8_t __resolv_timeout = RES_TIMEOUT;
> uint8_t __resolv_attempts = RES_DFLRETRY;
>
> in uClibc/libc/inet/resolv.c ?
>

Before I get to testing that out, here is what I have learned thus far.

The configure script for claws-mail using a simple test program that
improperly assumes the presence of res_query() means that libresolv
does not exist.  I was able to confirm this back hacking out
(commented out) the res_query() references in the test script.
As a result, -lresolv would start showing up in the produced makefiles.

Which confuses me somewhat.
How exactly is claws-mail able to call libresolv functions without
linking to the library?
I can assume at this point is that they might provide their own
resolution functions when this test fails.
Alternatively, perhaps some of the project still links to libresolv
whereas the core and everything else does not.
This would suggest a linking bug would it not?

My bet is now leaning towards this being claws-mail and I will start
opening a bug report on their end.
However, I still intend to try out your suggestion.

Below is a short snippet of the relevant portion of the libresolv test
program found inside the configure script.

/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char res_query ();
int
main ()
{
return res_query ();
  ;
  return 0;
}


-- 
Kevin Day


More information about the uClibc mailing list