Bug#489357: undefined reference to __open_2 on non-linux architectures with -D_FORTIFY_SOURCE=2

2008-07-12 Thread Patrick Matthäi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Samuel Thibault schrieb:
 Hello,
 
 Petr Salinger, le Sun 06 Jul 2008 18:51:33 +0200, a écrit :
 In fact the bug is in glibc, the __open_2 is a new symbol in glibc 2.7,
 the fix should be made by appropriate porters. The fix for GNU/kFreeBSD
 is already in both debian glibc-bsd and pkg-glibc svn, it should appear
 in glibc 2.7-13.
 
 Now also fixed for hurd-i386, thanks for the investigation!
 
 Samuel
 

Any ETA for 2.7-13?

- --
/*
Mit freundlichem Gruß / With kind regards,
Patrick Matthäi

E-Mail: [EMAIL PROTECTED]

Comment:
Always if we think we are right,
we were maybe wrong.
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkh4iyEACgkQ2XA5inpabMdnbACgnd9Si9yCTRfGwTM4AO1hCrO9
jmoAmgPiHSAUkclNBNfEy0CJL7zfj8va
=QjAm
-END PGP SIGNATURE-



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#490530: libc6: gethostbyaddr() times out if reverse dns not found

2008-07-12 Thread Thue Janus Kristensen
Package: libc6
Version: 2.7-10
Severity: normal


I noticed that when I tried pinging kalus.dk (which does not have
reverse DNS at the time of writing), ping would only send a packet
every 5 seconds.

[EMAIL PROTECTED] ~ host kalus.dk
kalus.dk has address 89.233.27.15
kalus.dk mail is handled by 10 mail.kalus.dk.
[EMAIL PROTECTED] ~ host 89.233.27.15
Host 15.27.233.89.in-addr.arpa. not found: 3(NXDOMAIN)
[EMAIL PROTECTED] ~ ping kalus.dk
PING kalus.dk (89.233.27.15) 56(84) bytes of data.
[5 second pause]
64 bytes from 89.233.27.15: icmp_seq=1 ttl=56 time=6.21 ms
[5 second pause]
64 bytes from 89.233.27.15: icmp_seq=2 ttl=56 time=5.89 ms
[5 second pause]
64 bytes from 89.233.27.15: icmp_seq=3 ttl=56 time=5.98 ms
[5 second pause]
64 bytes from 89.233.27.15: icmp_seq=4 ttl=56 time=4.48 ms

I tracked it down to the function call char *pr_addr in ping.c, when calling 
gethostbyaddr() :
/*  pr_addr --  Return an ascii host address as a dotted quad and optionally 
with a hostname. */
char *pr_addr(__u32 addr) {
struct hostent *hp;
[...]
hp = gethostbyaddr((char *)addr, 4, AF_INET);
[...]
}

I see no reason why it should take 5 seconds to find out that reverse DNS is 
not available, when the host command returns the answer immediately.

Doing a strace I get (selected parts of trace):

stat(/etc/resolv.conf, {st_mode=S_IFREG|0644, st_size=131, ...}) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr(83.221.148.2)}, 28) = 0
fcntl(4, F_GETFL)   = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)= 0
poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
sendto(4, \t,\1\0\0\1\0\0\0\0\0\0\00215\00227\003233\00289\7in-a..., 43, 
MSG_NOSIGNAL, NULL, 0) = 43
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(4, FIONREAD, [103])   = 0
recvfrom(4, \t,\201\203\0\1\0\0\0\1\0\0\00215\00227\003233\00289\7..., 1024, 
0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(83.221.148.2)}, 
[16]) = 103
close(4)= 0
socket(PF_FILE, SOCK_STREAM, 0) = 4
fcntl(4, F_GETFD)   = 0
fcntl(4, F_SETFD, FD_CLOEXEC)   = 0
connect(4, {sa_family=AF_FILE, path=/var/run/avahi-daemon/socket}, 110) = 0
fcntl(4, F_GETFL)   = 0x2 (flags O_RDWR)
fstat(4, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2afcdfb72000
lseek(4, 0, SEEK_CUR)   = -1 ESPIPE (Illegal seek)
write(4, RESOLVE-ADDRESS 89.233.27.15\n, 29) = 29
read(4, 

[***Here there is a 5 second wait***]

-15 Timeout reached\n, 1024)  = 20
close(4)= 0


I noted the 
lseek(4, 0, SEEK_CUR)   = -1 ESPIPE (Illegal seek)
Which seems suspecious.

Regards, Thue

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libc6 depends on:
ii  libgcc1   1:4.3.1-2  GCC support library

libc6 recommends no packages.

-- debconf information:
* glibc/upgrade: true
  glibc/restart-failed:
* glibc/restart-services: openbsd-inetd exim4 cupsys cron atd



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#490530: libc6: gethostbyaddr() times out if reverse dns not found

2008-07-12 Thread Stephen Gran
This one time, at band camp, Thue Janus Kristensen said:
 I noticed that when I tried pinging kalus.dk (which does not have
 reverse DNS at the time of writing), ping would only send a packet
 every 5 seconds.
 
 connect(4, {sa_family=AF_FILE, path=/var/run/avahi-daemon/socket}, 110) = 0
 write(4, RESOLVE-ADDRESS 89.233.27.15\n, 29) = 29
 read(4, 
 
 [***Here there is a 5 second wait***]
 
 -15 Timeout reached\n, 1024)  = 20
 close(4)= 0

Not that glibc doesn't have similar problems, but surely that's an avahi
bug?
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


signature.asc
Description: Digital signature


Bug#490530: libc6: gethostbyaddr() times out if reverse dns not found

2008-07-12 Thread Thue Janus Kristensen
Yes - reading the trace closer it is obviously an avahi bug.

Regards, Thue

On Sat, Jul 12, 2008 at 3:12 PM, Stephen Gran [EMAIL PROTECTED] wrote:

 This one time, at band camp, Thue Janus Kristensen said:
  I noticed that when I tried pinging kalus.dk (which does not have
  reverse DNS at the time of writing), ping would only send a packet
  every 5 seconds.
 
  connect(4, {sa_family=AF_FILE, path=/var/run/avahi-daemon/socket}, 110)
 = 0
  write(4, RESOLVE-ADDRESS 89.233.27.15\n, 29) = 29
  read(4,
 
  [***Here there is a 5 second wait***]
 
  -15 Timeout reached\n, 1024)  = 20
  close(4)= 0

 Not that glibc doesn't have similar problems, but surely that's an avahi
 bug?
 --
  -
 |   ,''`.Stephen Gran |
 |  : :' :[EMAIL PROTECTED] |
 |  `. `'Debian user, admin, and developer |
 |`- http://www.debian.org |
  -

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.6 (GNU/Linux)

 iD8DBQFIeK3MSYIMHOpZA44RAi50AJ9zsnX17sRcT1inG92VuFXFAUebIQCgxP6A
 U47EBFj4aH7Fbt1Lofe4lQw=
 =Xkeg
 -END PGP SIGNATURE-




r2987 - in glibc-package/trunk/debian: . control.in patches patches/hurd-i386 sysdeps

2008-07-12 Thread sthibaul-guest
Author: sthibaul-guest
Date: 2008-07-12 15:26:56 + (Sat, 12 Jul 2008)
New Revision: 2987

Added:
   glibc-package/trunk/debian/patches/hurd-i386/local-pthread_types.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/control
   glibc-package/trunk/debian/control.in/main
   glibc-package/trunk/debian/patches/series.hurd-i386
   glibc-package/trunk/debian/sysdeps/depflags.pl
Log:
  * patches/hurd-i386/local-pthread_types.diff: New patch to drag pthread
types from hurd headers.  Bump the hurd-dev dependency version
accordingly.


Modified: glibc-package/trunk/debian/changelog
===
--- glibc-package/trunk/debian/changelog2008-07-08 16:27:47 UTC (rev 
2986)
+++ glibc-package/trunk/debian/changelog2008-07-12 15:26:56 UTC (rev 
2987)
@@ -25,6 +25,9 @@
   * Use gcc-4.3 on hurd-i386.
   * patches/hurd-i386/cvs-open_2.diff: New patch to implement __open_2
 and __openat_2. Together with kfreebsd update closes: #489357.
+  * patches/hurd-i386/local-pthread_types.diff: New patch to drag pthread
+types from hurd headers.  Bump the hurd-dev dependency version
+accordingly.
 
  -- Aurelien Jarno [EMAIL PROTECTED]  Tue, 08 Jul 2008 18:26:28 +0200
 

Modified: glibc-package/trunk/debian/control
===
--- glibc-package/trunk/debian/control  2008-07-08 16:27:47 UTC (rev 2986)
+++ glibc-package/trunk/debian/control  2008-07-12 15:26:56 UTC (rev 2987)
@@ -4,7 +4,7 @@
 Build-Depends: gettext, make (= 3.80), dpkg-dev (= 1.13.5), bzip2, lzma, 
file, quilt,
  autoconf, sed (= 4.0.5-4), gawk, debhelper (= 5.0),
  linux-libc-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64],
- mig (= 1.3-2) [hurd-i386], hurd-dev (= 20071119-2) [hurd-i386], gnumach-dev 
[hurd-i386], libpthread-stubs0-dev [hurd-i386],
+ mig (= 1.3-2) [hurd-i386], hurd-dev (= 20080607-3) [hurd-i386], gnumach-dev 
[hurd-i386], libpthread-stubs0-dev [hurd-i386],
  kfreebsd-kernel-headers [kfreebsd-i386 kfreebsd-amd64],
  binutils (= 2.17cvs20070426),
  g++-4.2 (= 4.2.1) [alpha],

Modified: glibc-package/trunk/debian/control.in/main
===
--- glibc-package/trunk/debian/control.in/main  2008-07-08 16:27:47 UTC (rev 
2986)
+++ glibc-package/trunk/debian/control.in/main  2008-07-12 15:26:56 UTC (rev 
2987)
@@ -4,7 +4,7 @@
 Build-Depends: gettext, make (= 3.80), dpkg-dev (= 1.13.5), bzip2, lzma, 
file, quilt,
  autoconf, sed (= 4.0.5-4), gawk, debhelper (= 5.0),
  linux-libc-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64],
- mig (= 1.3-2) [hurd-i386], hurd-dev (= 20071119-2) [hurd-i386], gnumach-dev 
[hurd-i386], libpthread-stubs0-dev [hurd-i386],
+ mig (= 1.3-2) [hurd-i386], hurd-dev (= 20080607-3) [hurd-i386], gnumach-dev 
[hurd-i386], libpthread-stubs0-dev [hurd-i386],
  kfreebsd-kernel-headers [kfreebsd-i386 kfreebsd-amd64],
  binutils (= 2.17cvs20070426),
  g++-4.2 (= 4.2.1) [alpha],

Added: glibc-package/trunk/debian/patches/hurd-i386/local-pthread_types.diff
===
--- glibc-package/trunk/debian/patches/hurd-i386/local-pthread_types.diff   
(rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/local-pthread_types.diff   
2008-07-12 15:26:56 UTC (rev 2987)
@@ -0,0 +1,10 @@
+Index: glibc/bits/pthreadtypes.h
+===
+RCS file: /cvs/glibc/libc/bits/pthreadtypes.h,v
+retrieving revision 1.1
+diff -u -p -r1.1 pthreadtypes.h
+--- glibc/bits/pthreadtypes.h  10 Nov 2002 23:22:34 -  1.1
 glibc/bits/pthreadtypes.h  28 Jun 2008 00:14:16 -
+@@ -1 +1 @@
+-/* No thread support.  */
++#include pthread/pthreadtypes.h

Modified: glibc-package/trunk/debian/patches/series.hurd-i386
===
--- glibc-package/trunk/debian/patches/series.hurd-i386 2008-07-08 16:27:47 UTC 
(rev 2986)
+++ glibc-package/trunk/debian/patches/series.hurd-i386 2008-07-12 15:26:56 UTC 
(rev 2987)
@@ -4,4 +4,5 @@
 hurd-i386/local-pthread_stubs.diff
 hurd-i386/local-pthread-unsupported-stubs.diff
 hurd-i386/local-unlockpt-chroot.diff
+hurd-i386/local-pthread_types.diff
 hurd-i386/local-msg-nosignal.diff -p0

Modified: glibc-package/trunk/debian/sysdeps/depflags.pl
===
--- glibc-package/trunk/debian/sysdeps/depflags.pl  2008-07-08 16:27:47 UTC 
(rev 2986)
+++ glibc-package/trunk/debian/sysdeps/depflags.pl  2008-07-12 15:26:56 UTC 
(rev 2987)
@@ -19,7 +19,7 @@
 
 # OS specific stuff
 if ($DEB_HOST_ARCH_OS eq hurd) {
-push @{$libc_dev_c{'Depends'}}, ('gnumach-dev', 'hurd-dev (= 
20071119-2)', 'libpthread-stubs0-dev');
+push @{$libc_dev_c{'Depends'}}, ('gnumach-dev', 'hurd-dev (= 
20080607-3)', 'libpthread-stubs0-dev');
 push @{$libc_dev_c{'Replaces'}}, 

Bug#490530: libc6: gethostbyaddr() times out if reverse dns not found

2008-07-12 Thread Thue Janus Kristensen
I investigated further, and this is arguably not a bug. Please close it.

Regards, Thue

On Sat, Jul 12, 2008 at 3:17 PM, Thue Janus Kristensen [EMAIL PROTECTED]
wrote:

 Yes - reading the trace closer it is obviously an avahi bug.

 Regards, Thue

 On Sat, Jul 12, 2008 at 3:12 PM, Stephen Gran [EMAIL PROTECTED] wrote:

 This one time, at band camp, Thue Janus Kristensen said:
  I noticed that when I tried pinging kalus.dk (which does not have
  reverse DNS at the time of writing), ping would only send a packet
  every 5 seconds.
 
  connect(4, {sa_family=AF_FILE, path=/var/run/avahi-daemon/socket},
 110) = 0
  write(4, RESOLVE-ADDRESS 89.233.27.15\n, 29) = 29
  read(4,
 
  [***Here there is a 5 second wait***]
 
  -15 Timeout reached\n, 1024)  = 20
  close(4)= 0

 Not that glibc doesn't have similar problems, but surely that's an avahi
 bug?
 --
  -
 |   ,''`.Stephen Gran |
 |  : :' :[EMAIL PROTECTED] |
 |  `. `'Debian user, admin, and developer |
 |`- http://www.debian.org |
  -

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.6 (GNU/Linux)

 iD8DBQFIeK3MSYIMHOpZA44RAi50AJ9zsnX17sRcT1inG92VuFXFAUebIQCgxP6A
 U47EBFj4aH7Fbt1Lofe4lQw=
 =Xkeg
 -END PGP SIGNATURE-





r2988 - in glibc-package/trunk/debian: . patches patches/all

2008-07-12 Thread sthibaul-guest
Author: sthibaul-guest
Date: 2008-07-13 01:18:55 + (Sun, 13 Jul 2008)
New Revision: 2988

Added:
   glibc-package/trunk/debian/patches/all/submitted-fcntl-types.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * patches/all/submitted-fcntl-types.diff: New patch to add mode_t, off_t and
pid_t definitions to fcntl.h.  Fixes a lot of FTBFS on hurd and freebsd.


Modified: glibc-package/trunk/debian/changelog
===
--- glibc-package/trunk/debian/changelog2008-07-12 15:26:56 UTC (rev 
2987)
+++ glibc-package/trunk/debian/changelog2008-07-13 01:18:55 UTC (rev 
2988)
@@ -28,6 +28,8 @@
   * patches/hurd-i386/local-pthread_types.diff: New patch to drag pthread
 types from hurd headers.  Bump the hurd-dev dependency version
 accordingly.
+  * patches/all/submitted-fcntl-types.diff: New patch to add mode_t, off_t and
+pid_t definitions to fcntl.h.  Fixes a lot of FTBFS on hurd and freebsd.
 
  -- Aurelien Jarno [EMAIL PROTECTED]  Tue, 08 Jul 2008 18:26:28 +0200
 

Added: glibc-package/trunk/debian/patches/all/submitted-fcntl-types.diff
===
--- glibc-package/trunk/debian/patches/all/submitted-fcntl-types.diff   
(rev 0)
+++ glibc-package/trunk/debian/patches/all/submitted-fcntl-types.diff   
2008-07-13 01:18:55 UTC (rev 2988)
@@ -0,0 +1,37 @@
+Index: glibc/io/fcntl.h
+===
+RCS file: /cvs/glibc/libc/io/fcntl.h,v
+retrieving revision 1.43
+diff -u -p -r1.43 fcntl.h
+--- glibc/io/fcntl.h   15 Sep 2007 22:34:56 -  1.43
 glibc/io/fcntl.h   13 Jul 2008 01:10:02 -
+@@ -33,6 +33,29 @@ __BEGIN_DECLS
+numbers and flag bits for `open', `fcntl', et al.  */
+ #include bits/fcntl.h
+ 
++#if defined __USE_XOPEN || defined __USE_XOPEN2K
++/* The Single Unix specification says that some more types are
++   available here.  */
++# ifndef __mode_t_defined
++typedef __mode_t mode_t;
++#  define __mode_t_defined
++# endif
++
++# ifndef __off_t_defined
++#  ifndef __USE_FILE_OFFSET64
++typedef __off_t off_t;
++#  else
++typedef __off64_t off_t;
++#  endif
++#  define __off_t_defined
++# endif
++
++# ifndef __pid_t_defined
++typedef __pid_t pid_t;
++#  define __pid_t_defined
++# endif
++#endif/* X/Open */
++
+ /* For XPG all symbols from sys/stat.h should also be available.  */
+ #ifdef __USE_XOPEN
+ # include sys/stat.h

Modified: glibc-package/trunk/debian/patches/series
===
--- glibc-package/trunk/debian/patches/series   2008-07-12 15:26:56 UTC (rev 
2987)
+++ glibc-package/trunk/debian/patches/series   2008-07-13 01:18:55 UTC (rev 
2988)
@@ -141,6 +141,7 @@
 all/local-pthread-manpages.diff 
 all/local-remove-manual.diff
 all/local-ru_RU.diff 
+all/submitted-fcntl-types.diff
 
 any/cvs-epoll_h.diff -p0
 any/cvs-ether_line.diff -p0


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]