libthread_xu and getaddrinfo problem
Johannes Hofmann
Johannes.Hofmann at gmx.de
Tue Apr 22 10:22:49 PDT 2008
After reading the thread on kernel I switched from libc_r to libthread_xu.
Now I have sporadic problems with a program that creates a thread to call
getaddrinfo(3). From time to time I get EAI_NODATA even though the address
is resolvable. It seems to be some timing issue as additional printfs make
the problem go away.
Below is a ktrace output that shows a problematic getaddrinfo() call. I
wonder if
40645:27 dillo-fltk RET kevent -1 errno 9 Bad file descriptor
is ok?
Cheers,
Johannes
40645 dillo-fltk CALL lwp_create(0xbfbfd1b0)
40645:0 dillo-fltk RET lwp_create 0
40645:0 dillo-fltk CALL sigprocmask(SIG_SETMASK,0xbfbfd190,0)
40645:0 dillo-fltk RET sigprocmask 0
40645:0 dillo-fltk CALL mmap(0,0x3000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0xffffffff,0,0,0)
40645:0 dillo-fltk RET mmap 677752832/0x2865b000
40645:0 dillo-fltk CALL close(0x4)
40645:27 dillo-fltk RET fork 0
40645:0 dillo-fltk RET close 0
40645:27 dillo-fltk CALL set_tls_area(0,0xbf6fbfdc,0x8)
40645:27 dillo-fltk RET set_tls_area 123/0x7b
40645:27 dillo-fltk CALL sigprocmask(SIG_SETMASK,0x28685d74,0)
40645:27 dillo-fltk RET sigprocmask 0
40645:27 dillo-fltk CALL open(0x2843b727,O_RDONLY,<unused>0x1b6)
40645:27 dillo-fltk NAMI "/etc/hosts"
40645:27 dillo-fltk RET open 4
40645:27 dillo-fltk CALL fstat(0x4,0xbf6f9cbc)
40645:27 dillo-fltk RET fstat 0
40645:27 dillo-fltk CALL read(0x4,0x28771000,0x2000)
40645:27 dillo-fltk GIO fd 4 read 1792 bytes
"# $FreeBSD: src/etc/hosts,v 1.11.2.4 2003/02/06 20:36:58 dbaker "
40645:27 dillo-fltk RET read 1792/0x700
40645:27 dillo-fltk CALL read(0x4,0x28771000,0x2000)
40645:27 dillo-fltk GIO fd 4 read 0 bytes
""
40645:27 dillo-fltk RET read 0
40645:27 dillo-fltk CALL close(0x4)
40645:27 dillo-fltk RET close 0
40645:27 dillo-fltk CALL mmap(0,0x10000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0xffffffff,0,0,0)
40645:27 dillo-fltk RET mmap 686235648/0x28e72000
40645:27 dillo-fltk CALL mmap(0,0x10000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0xffffffff,0,0,0)
40645:27 dillo-fltk RET mmap 686563328/0x28ec2000
40645:27 dillo-fltk CALL mmap(0,0x10000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0xffffffff,0,0,0)
40645:27 dillo-fltk RET mmap 689078272/0x29128000
40645:27 dillo-fltk CALL kqueue
40645:27 dillo-fltk RET kqueue 4
40645:27 dillo-fltk CALL socket(PF_INET,SOCK_DGRAM,0)
40645:27 dillo-fltk RET socket 5
40645:0 dillo-fltk CALL munmap(0x28888000,0x3000)
40645:0 dillo-fltk RET munmap 0
40645:0 dillo-fltk CALL munmap(0x288c7000,0x3000)
40645:0 dillo-fltk RET munmap 0
40645:0 dillo-fltk CALL close(0x4)
40645:0 dillo-fltk RET close 0
40645:0 dillo-fltk CALL munmap(0x288ca000,0x3000)
40645:0 dillo-fltk RET munmap 0
40645:0 dillo-fltk CALL gettimeofday(0xbfbff4c0,0)
40645:0 dillo-fltk RET gettimeofday 0
40645:0 dillo-fltk CALL write(0x3,0x28542000,0xda8)
40645:0 dillo-fltk GIO fd 3 wrote 3496 bytes
";\^C\^E\0\^N\0@\^A\0\0\0\0\^B\0\^B\0\^\\0\^X\0\M^\\^F\^E\0Ä\^D@\^A\0\0\0\0\^B\0\^B\0\^\\0\^X\0\
8\0\^D\0\^N\0@\^A\^D\0\0\0iii\0B\0\a\0\^C\0@\^A"
40645:0 dillo-fltk RET write 3496/0xda8
40645:27 dillo-fltk CALL connect(0x5,0x28456a30,0x10)
40645:27 dillo-fltk RET connect 0
40645:0 dillo-fltk CALL gettimeofday(0xbfbff4c0,0)
40645:0 dillo-fltk RET gettimeofday 0
40645:0 dillo-fltk CALL select(0x4,0xbfbff504,0xbfbff584,0xbfbff604,0xbfbff684)
40645:27 dillo-fltk CALL sendto(0x5,0x29128000,0x2c,0,0,0)
40645:27 dillo-fltk GIO fd 5 wrote 44 bytes
"8f\^A\0\0\^A\0\0\0\0\0\0\bpartners\rwebmasterplan\^Ccom\0\0\^A\0\^A"
40645:27 dillo-fltk RET sendto 44/0x2c
40645:27 dillo-fltk CALL gettimeofday(0xbf6fb64c,0)
40645:27 dillo-fltk RET gettimeofday 0
40645:27 dillo-fltk CALL kevent(0x4,0xbf6fb68c,0x1,0xbf6fb68c,0x1,0xbf6fb654)
40645:27 dillo-fltk RET kevent -1 errno 9 Bad file descriptor
40645:27 dillo-fltk CALL close(0x5)
40645:27 dillo-fltk RET close 0
40645:27 dillo-fltk CALL socket(PF_INET,SOCK_DGRAM,0)
40645:27 dillo-fltk RET socket 4
40645:27 dillo-fltk CALL connect(0x4,0x28456a30,0x10)
40645:27 dillo-fltk RET connect 0
40645:27 dillo-fltk CALL sendto(0x4,0x29128000,0x2c,0,0,0)
40645:27 dillo-fltk GIO fd 4 wrote 44 bytes
"8f\^A\0\0\^A\0\0\0\0\0\0\bpartners\rwebmasterplan\^Ccom\0\0\^A\0\^A"
40645:27 dillo-fltk RET sendto 44/0x2c
40645:27 dillo-fltk CALL gettimeofday(0xbf6fb64c,0)
40645:27 dillo-fltk RET gettimeofday 0
40645:27 dillo-fltk CALL kevent(0x4,0xbf6fb68c,0x1,0xbf6fb68c,0x1,0xbf6fb654)
40645:27 dillo-fltk RET kevent -1 errno 9 Bad file descriptor
40645:27 dillo-fltk CALL close(0x4)
40645:27 dillo-fltk RET close 0
40645:27 dillo-fltk CALL socket(PF_INET,SOCK_DGRAM,0)
40645:27 dillo-fltk RET socket 4
40645:27 dillo-fltk CALL connect(0x4,0x28456a30,0x10)
40645:27 dillo-fltk RET connect 0
40645:27 dillo-fltk CALL sendto(0x4,0x29128000,0x2c,0,0,0)
40645:27 dillo-fltk GIO fd 4 wrote 44 bytes
"8f\^A\0\0\^A\0\0\0\0\0\0\bpartners\rwebmasterplan\^Ccom\0\0\^A\0\^A"
40645:27 dillo-fltk RET sendto 44/0x2c
40645:27 dillo-fltk CALL gettimeofday(0xbf6fb64c,0)
40645:27 dillo-fltk RET gettimeofday 0
40645:27 dillo-fltk CALL kevent(0x4,0xbf6fb68c,0x1,0xbf6fb68c,0x1,0xbf6fb654)
40645:27 dillo-fltk RET kevent -1 errno 9 Bad file descriptor
40645:27 dillo-fltk CALL close(0x4)
40645:27 dillo-fltk RET close 0
40645:27 dillo-fltk CALL socket(PF_INET,SOCK_DGRAM,0)
40645:27 dillo-fltk RET socket 4
40645:27 dillo-fltk CALL connect(0x4,0x28456a30,0x10)
40645:27 dillo-fltk RET connect 0
40645:27 dillo-fltk CALL sendto(0x4,0x29128000,0x2c,0,0,0)
40645:27 dillo-fltk GIO fd 4 wrote 44 bytes
"8f\^A\0\0\^A\0\0\0\0\0\0\bpartners\rwebmasterplan\^Ccom\0\0\^A\0\^A"
40645:27 dillo-fltk RET sendto 44/0x2c
40645:27 dillo-fltk CALL gettimeofday(0xbf6fb64c,0)
40645:27 dillo-fltk RET gettimeofday 0
40645:27 dillo-fltk CALL kevent(0x4,0xbf6fb68c,0x1,0xbf6fb68c,0x1,0xbf6fb654)
40645:27 dillo-fltk RET kevent -1 errno 9 Bad file descriptor
40645:27 dillo-fltk CALL close(0x4)
40645:27 dillo-fltk RET close 0
40645:27 dillo-fltk CALL close(0x4)
40645:27 dillo-fltk RET close -1 errno 9 Bad file descriptor
40645:27 dillo-fltk CALL munmap(0x29128000,0x10000)
40645:27 dillo-fltk RET munmap 0
40645:27 dillo-fltk CALL mmap(0,0x10000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0xffffffff,0,0,0)
40645:27 dillo-fltk RET mmap 689078272/0x29128000
40645:27 dillo-fltk CALL kqueue
40645:27 dillo-fltk RET kqueue 4
40645:27 dillo-fltk CALL socket(PF_INET,SOCK_DGRAM,0)
40645:27 dillo-fltk RET socket 5
40645:27 dillo-fltk CALL connect(0x5,0x28456a30,0x10)
40645:27 dillo-fltk RET connect 0
40645:27 dillo-fltk CALL sendto(0x5,0x29128000,0x30,0,0,0)
40645:27 dillo-fltk GIO fd 5 wrote 48 bytes
"8g\^A\0\0\^A\0\0\0\0\0\0\bpartners\rwebmasterplan\^Ccom\^Clan\0\0\^A\0\^A"
40645:27 dillo-fltk RET sendto 48/0x30
40645:27 dillo-fltk CALL gettimeofday(0xbf6fb64c,0)
40645:27 dillo-fltk RET gettimeofday 0
40645:27 dillo-fltk CALL kevent(0x4,0xbf6fb68c,0x1,0xbf6fb68c,0x1,0xbf6fb654)
40645:27 dillo-fltk RET kevent 1
40645:27 dillo-fltk CALL recvfrom(0x5,0x28e72000,0x10000,0,0xbf6fb6ac,0xbf6fb648)
40645:27 dillo-fltk GIO fd 5 read 48 bytes
"8g\M^A\M^C\0\^A\0\0\0\0\0\0\bpartners\rwebmasterplan\^Ccom\^Clan\0\0\^A\0\^A"
40645:27 dillo-fltk RET recvfrom 48/0x30
40645:27 dillo-fltk CALL close(0x5)
40645:27 dillo-fltk RET close 0
40645:27 dillo-fltk CALL close(0x4)
40645:27 dillo-fltk RET close 0
40645:27 dillo-fltk CALL munmap(0x29128000,0x10000)
40645:27 dillo-fltk RET munmap 0
40645:27 dillo-fltk CALL munmap(0x28e72000,0x10000)
40645:27 dillo-fltk RET munmap 0
40645:27 dillo-fltk CALL munmap(0x28ec2000,0x10000)
40645:27 dillo-fltk RET munmap 0
40645:27 dillo-fltk CALL write(0x1,0x28537000,0x16)
40645:27 dillo-fltk GIO fd 1 wrote 22 bytes
"DNS error: NO_ADDRESS
"
40645:27 dillo-fltk RET write 22/0x16
40645:27 dillo-fltk CALL write(0x1,0x28537000,0x32)
40645:27 dillo-fltk GIO fd 1 wrote 50 bytes
"Dns_server [0]: partners.webmasterplan.com is 0x0
"
More information about the Users
mailing list