Bug 150288
| Summary: | Outgoing mail stuck with "impossible h_errno(0)" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Tim Waugh <twaugh> | ||||
| Component: | bind | Assignee: | Adam Tkac <atkac> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Ben Levenson <benl> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | rawhide | CC: | notting, ovasik, tmokros, twoerner | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | i386 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2007-05-30 09:57:59 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Tim Waugh
2005-03-04 10:08:44 UTC
Created attachment 111657 [details]
sendmail.cf
FWIW, changing 'DSpobox.surrey.redhat.com' to 'DS[pobox.surrey.redhat.com]' in sendmail.cf made this work again, but I couldn't work out why res_search() was returning -1 but leaving h_errno=0. I think this is a bind problem, not a sendmail problem. The following
program prints h_errno=4 correctly when linked against the libresolv
that comes with glibc but prints h_errno when linked against the
libbind that comes with bind-libs-9.3.1rc1-3.
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
#include <netdb.h>
main()
{
int ret;
unsigned char answer[256] = {0};
res_init();
ret = res_search("105-10.202-68.tampabay.res.rr.com.", ns_c_in, ns_t_mx,
answer, sizeof answer);
printf("ret=%d, h_errno=%d, answer=%s\n", ret, h_errno, answer);
}
This problem is now fixed with bind-9.3.1rc1-5 .
Incorrect assumptions in the code about pthread
availability resulted in the wrong h_errno_location()
being used.
Note that the res_search function is deprecated, and the proper
way to write the above code would be:
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <netinet/in.h>
#include <bind/arpa/inet.h>
#include <bind/arpa/nameser.h>
#include <bind/resolv.h>
#include <bind/netdb.h>
#include <stdio.h>
static struct __res_state res;
main()
{
int ret;
unsigned char answer[256] = {0};
memset(&res, '\0', sizeof(res));
res_ninit(&res);
ret = res_nsearch(&res,"105-10.202-68.tampabay.res.rr.com.",
ns_c_in, ns_t_mx,
answer, sizeof answer);
printf("ret=%d, h_errno=%d\n", ret, h_errno);
if ( ret > 0 )
fp_nquery(answer,ret,stdout);
}
*** Bug 150703 has been marked as a duplicate of this bug. *** Looks like fixed. If still exists, please reopen. Regards, Adam Huh, after investigation about bug #245857 patch for this bug is completely wrong. About comment #3 : libbind uses different resolving mechanisms so if you want use libbind resolver you must bind/* headers instead glibc's headers (as Jason wrote in comment #4). Also I believe when sendmail was linked against libbind it includes wrong headers => NOTABUG Adam This problem needs more investigation especially with recently upstream changes.
Patch's idea is completely unusable
2205. [bug] libbind: change #2119 broke thread support. [RT #16982]
2119. [compat] libbind: allow res_init() to succeed enough to
return the default domain even if it was unable
to allocate memory.
*** This bug has been marked as a duplicate of 254501 ***
|