Package: libnss-ldap
Version: 220-1
Followup-For: Bug #277640

The stall happens because libnss-ldap is linked against the
non-reentrant version of the OpenLDAP library.  This causes an
application's call to gethostbyname() to lock up because another call to
gethostbyname() occurs within the non-reentrant version of the OpenLDAP
library.

The non-reentrant version of the OpenLDAP library intentionally avoids
using the reentrant functions such as gethostbyname_r() even though they
are available in the C library.

I believe libnss_ldap should link against the reentrant version of the
OpenLDAP library libldap_r.so.2 rather than against the non-reentrant
one libldap.so.2.  My simple test setting a symlink to the former and
using LD_LIBRARY_PATH showed that the stall disappeared.

=====================================================================
[EMAIL PROTECTED]:~$ su -  # LD_LIBRARY_PATH will work only for root
Password:
ibis:~# getent hosts
127.0.0.1       localhost.localdomain localhost
10.1.0.1        eivpn
10.1.0.2        ibisvpn

ibis:~# 
LD_LIBRARY_PATH=/home/ilatypov/openldap/pkg/ldap/libraries/libldap_r/.libs 
getent hosts
127.0.0.1       localhost.localdomain localhost
10.1.0.1        eivpn
10.1.0.2        ibisvpn
127.0.0.1       localhost.localdomain localhost
172.16.10.10    bigbird.dsrd bigbird ldap perforce snap-ds
172.16.10.14    ibis.dsrd ibis
172.16.10.15    kingfisher.dsrd kingfisher
172.16.10.21    kakadu.dsrd kakadu
ibis:~#
=====================================================================

A similar stall occured in /bin/ping even when I added the LDAP server's
and the local host's IP addresses to /etc/hosts.  This was due to the
OpenLDAP's library wanting to figure out the IP address of
gethostname().  Again, a recursive call to gethostbyname() in the
OpenLDAP's non-reentrant library caused a stall.

Thanks,

-- 
Ilguiz

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-rc3-bk2-p4-sata
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libnss-ldap depends on:
ii  debconf                     1.4.45       Debian configuration management sy
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libdb4.2                    4.2.52-18    Berkeley v4.2 Database Libraries [
ii  libkrb53                    1.3.6-1      MIT Kerberos runtime libraries
ii  libldap2                    2.1.30-3     OpenLDAP libraries

-- debconf information:
* libnss-ldap/dblogin: false
  libnss-ldap/override: true
* shared/ldapns/base-dn: dc=diskstream,dc=com
* shared/ldapns/ldap-server: 172.16.10.10
* libnss-ldap/confperm: false
* shared/ldapns/ldap_version: 3
  libnss-ldap/binddn: cn=proxyuser,dc=example,dc=net
* libnss-ldap/nsswitch:


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

Reply via email to