Bug#299051: marked as done (exim4+libnss-ldap: Loops infinitely on startup)

Debian Bug Tracking System owner@bugs.debian.org
Wed, 25 May 2005 16:33:06 -0700


Your message dated Thu, 26 May 2005 01:27:32 +0200
with message-id <20050525232732.GA26471@lefler.int.l21.ma.zugschlus.de>
and subject line Closing bugs aftger 4.50-6 has been approved for sarge
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 11 Mar 2005 12:37:17 +0000
>From solist@solistland.dnsalias.org Fri Mar 11 04:37:17 2005
Return-path: <solist@solistland.dnsalias.org>
Received: from ppp1-55.kta.forthnet.gr (planis.solistland.org) [213.16.203.55] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1D9jOD-0003nT-00; Fri, 11 Mar 2005 04:37:15 -0800
Received: from solist by planis.solistland.org with local (Exim 4.50)
	id 1D9jNn-00081Q-Og
	for submit@bugs.debian.org; Fri, 11 Mar 2005 14:36:48 +0200
Date: Fri, 11 Mar 2005 14:36:45 +0200
From: Antonio Kanouras <solist@solistland.dnsalias.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: exim4+libnss-ldap: Loops infinitely on startup
Message-ID: <20050311123645.GA30629@planis.dynalias.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 3.8
User-Agent: Mutt/1.5.6+20040907i
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: exim4
Version: 4.50-4
Severity: normal

Hi,

I've hit a weird bug when using libnss-ldap. It seems related to
#190072. Under some circumstances, Exim4 gets stuck in an infinite
loop. Everything else on the system works as usual in either case. I'm
just a beginner in C, but it seems that when using the first version of
nsswitch.conf, libnss-ldap (or libldap probably) tries to use Exim's
IPv6 listening socket for communicating with the LDAP server instead of
opening its own.

Although they are defined, I don't use Netgroups. System users and
groups except "staff" are in flat files. The rest are in LDAP.
Exim4 uses LDAP directly for SMTP AUTH.

The bug isn't hit if I run:
	exim4 -bdf
or:	exim4 -bdf -d
or:	exim4 -bdf -d+all
or:	exim4 -bd -d
or:	exim4 -bd -d+all
or:	exim4 -q30m

or if nscd is running.

Please let me know if there's anything else I can do/provide more info
about.


-- Package Versions --
libnss-ldap	220-1
libldap2	2.1.30-3
slapd		2.1.30-3
exim4-config	4.50-4


-- /etc/nsswitch.conf (Bug is hit) --
passwd:         ldap files
group:          ldap files
shadow:         ldap files

hosts:          files dns
networks:       files
protocols:      db
services:       db
ethers:         db
rpc:            db
netgroup:       ldap
-------------------

-- /etc/nsswitch.conf (OK) --
passwd:         files ldap
group:          files ldap
shadow:         files ldap

hosts:          files dns
networks:       files
protocols:      db
services:       db
ethers:         db
rpc:            db
netgroup:       ldap
-------------------


-- /etc/libnss-ldap.conf --
# Note: the bug is hit when using "host 127.0.0.1" too.
uri ldapi://%2fvar%2frun%2fldapi/
base dc=solistland,dc=org
ldap_version 3
rootbinddn cn=admin,dc=solistland,dc=org
nss_base_passwd         ou=People,dc=solistland,dc=org?one
nss_base_shadow         ou=People,dc=solistland,dc=org?one
nss_base_group          ou=Group,dc=solistland,dc=org?one
nss_base_netgroup       ou=Netgroup,dc=solistland,dc=org?one
----------------------

-- /var/log/exim4/mainlog --
2005-03-11 04:15:08 exim 4.50 daemon started: pid=28714, -q30m, listening for SMTP on port 25 (IPv6 and IPv4)
2005-03-11 04:15:08 50 select() failures: Bad file descriptor
2005-03-11 04:15:08 50 select() failures: Bad file descriptor
2005-03-11 04:15:08 50 select() failures: Bad file descriptor
2005-03-11 04:15:08 50 select() failures: Bad file descriptor
[and so on... (about 300 lines/sec)]
----------------------------

-- /var/log/syslog --
Mar 11 04:15:08 planis exim4: nss_ldap: reconnecting to LDAP server...
Mar 11 04:15:08 planis exim4: nss_ldap: reconnected to LDAP server after 1 attempt(s)
---------------------


-- strace -f exim4 -bd  --
[...]
dup2(0, 1)                              = 1
fstat64(2, 0xbffff1d0)                  = -1 EBADF (Bad file descriptor)
dup2(0, 2)                              = 2
getppid()                               = 27671
clone(Process 27674 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb78d96c8) = 27674
[pid 27674] setsid()                    = 27674
[pid 27674] socket(PF_INET6, SOCK_STREAM, IPPROTO_IP <unfinished ...>
[pid 27673] exit_group(0)               = ?
[pid 27674] <... socket resumed> )      = 3
[pid 27674] setsockopt(3, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
bind(3, {sa_family=AF_INET6, sin6_port=htons(25), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
listen(3, 20)                           = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
bind(4, {sa_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
listen(4, 20)                           = 0
open("/var/run/exim4/exim.pid", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 5
getpid()                                = 27674
fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fe8000
fchmod(5, 0644)                         = 0
write(5, "27674\n", 6)                  = 6
close(5)                                = 0
munmap(0xb7fe8000, 4096)                = 0
rt_sigaction(SIGHUP, {0x805c8d0, [HUP], SA_RESTART}, {SIG_IGN}, 8) = 0
geteuid32()                             = 0
geteuid32()                             = 0
getegid32()                             = 103
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
geteuid32()                             = 0
geteuid32()                             = 0
time(NULL)                              = 1110490993
write(3, "0\201\321\2\1\vc\201\313\4\36ou=People,dc=solistla"..., 212) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
time(NULL)                              = 1110490993
write(3, "0\5\2\1\fB\0", 7)             = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
close(3)                                = 0
time([1110490993])                      = 1110490993
open("/etc/localtime", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=823, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fe8000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\t\0\0\0\t\0"..., 4096) = 823
close(3)                                = 0
munmap(0xb7fe8000, 4096)                = 0
rt_sigaction(SIGPIPE, {0xb7c30530, [], 0}, {SIG_IGN}, 8) = 0
socket(PF_FILE, SOCK_DGRAM, 0)          = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = -1 EPROTOTYPE (Protocol wrong type for socket)
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0
send(3, "<14>Mar 10 23:43:13 exim4: nss_l"..., 68, 0) = 68
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
geteuid32()                             = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 5
fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(5, {sa_family=AF_FILE, path="/var/run/ldapi"}, 110) = 0
fcntl64(5, F_GETFL)                     = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl64(5, F_SETFL, O_RDWR)             = 0
getpeername(5, {sa_family=AF_FILE, path="/var/run/ldapi"}, [17]) = 0
uname({sys="Linux", node="planis", ...}) = 0
getegid32()                             = 103
geteuid32()                             = 0
time(NULL)                              = 1110490994
write(5, "01\2\1\1`,\2\1\3\4\35cn=admin,dc=solistla"..., 51) = 51
time(NULL)                              = 1110490994
select(1024, [5], [], NULL, {30, 0})    = 1 (in [5], left {29, 990000})
read(5, "0\f\2\1\1a\7\n", 8)            = 8
read(5, "\1\0\4\0\4\0", 6)              = 6
time(NULL)                              = 1110490994
setsockopt(5, SOL_SOCKET, SO_KEEPALIVE, [0], 4) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
getsockname(5, {sa_family=AF_FILE, path=@}, [2]) = 0
getpeername(5, {sa_family=AF_FILE, path="/var/run/ldapi"}, [17]) = 0
time([1110490994])                      = 1110490994
time(NULL)                              = 1110490994
write(5, "0\201\321\2\1\2c\201\313\4\36ou=People,dc=solistla"..., 212) = 212
select(1024, [5], [], NULL, NULL)       = 1 (in [5])
read(5, "0\f\2\1\2e\7\n", 8)            = 8
read(5, "\1\0\4\0\4\0", 6)              = 6
time(NULL)                              = 1110490994
time([1110490994])                      = 1110490994
rt_sigaction(SIGPIPE, {0xb7c30530, [], 0}, {SIG_IGN}, 8) = 0
send(3, "<14>Mar 10 23:43:14 exim4: nss_l"..., 83, 0) = 83
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
time([1110490994])                      = 1110490994
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
open("/etc/passwd", O_RDONLY)           = 6
fcntl64(6, F_GETFD)                     = 0
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
fstat64(6, {st_mode=S_IFREG|0644, st_size=1520, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fe8000
read(6, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1520
close(6)                                = 0
munmap(0xb7fe8000, 4096)                = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
geteuid32()                             = 0
geteuid32()                             = 0
geteuid32()                             = 0
time(NULL)                              = 1110490994
write(5, "0i\2\1\3cd\4\36ou=People,dc=solistland"..., 107) = 107
select(1024, [5], [], NULL, NULL)       = 1 (in [5])
read(5, "0\f\2\1\3e\7\n", 8)            = 8
read(5, "\1\0\4\0\4\0", 6)              = 6
time(NULL)                              = 1110490994
time([1110490994])                      = 1110490994
geteuid32()                             = 0
geteuid32()                             = 0
time(NULL)                              = 1110490994
write(5, "0w\2\1\4cr\4\35ou=Group,dc=solistland,"..., 121) = 121
time([1110490994])                      = 1110490994
select(1024, [5], [], NULL, NULL)       = 1 (in [5])
read(5, "0\f\2\1\4e\7\n", 8)            = 8
read(5, "\1\0\4\0\4\0", 6)              = 6
time(NULL)                              = 1110490994
geteuid32()                             = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
open("/etc/group", O_RDONLY)            = 6
fcntl64(6, F_GETFD)                     = 0
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
fstat64(6, {st_mode=S_IFREG|0644, st_size=736, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fe8000
_llseek(6, 0, [0], SEEK_CUR)            = 0
read(6, "root::0:\ndaemon::1:\nbin::2:\nsys:"..., 4096) = 736
read(6, "", 4096)                       = 0
close(6)                                = 0
munmap(0xb7fe8000, 4096)                = 0
setgroups32(2, [103, 45])               = 0
setgid32(103)                           = 0
setuid32(103)                           = 0
rt_sigaction(SIGCHLD, {0x805c900, [], 0}, NULL, 8) = 0
getpid()                                = 27674
time(NULL)                              = 1110490994
open("/var/log/exim4/mainlog", O_WRONLY|O_APPEND|O_LARGEFILE) = 6
fcntl64(6, F_GETFD)                     = 0
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
fstat64(6, {st_mode=S_IFREG|0640, st_size=302636174, ...}) = 0
write(6, "2005-03-10 23:43:14 exim 4.50 da"..., 118) = 118
getpid()                                = 27674
close(6)                                = 0
close(3)                                = 0
select(5, [3 4], NULL, NULL, NULL)      = -1 EBADF (Bad file descriptor)
waitpid(-1, 0xbffff238, WNOHANG)        = -1 ECHILD (No child processes)
select(5, [3 4], NULL, NULL, NULL)      = -1 EBADF (Bad file descriptor)
waitpid(-1, 0xbffff238, WNOHANG)        = -1 ECHILD (No child processes)
select(5, [3 4], NULL, NULL, NULL)      = -1 EBADF (Bad file descriptor)
waitpid(-1, 0xbffff238, WNOHANG)        = -1 ECHILD (No child processes)
[...]
select(5, [3 4], NULL, NULL, NULL)      = -1 EBADF (Bad file descriptor)
waitpid(-1, 0xbffff238, WNOHANG)        = -1 ECHILD (No child processes)
select(5, [3 4], NULL, NULL, NULL)      = -1 EBADF (Bad file descriptor)
waitpid(-1, 0xbffff238, WNOHANG)        = -1 ECHILD (No child processes)
select(5, [3 4], NULL, NULL, NULL)      = -1 EBADF (Bad file descriptor)
waitpid(-1, 0xbffff238, WNOHANG)        = -1 ECHILD (No child processes)
time(NULL)                              = 1110490994
time(NULL)                              = 1110490994
close(-1)                               = -1 EBADF (Bad file descriptor)
open("/var/log/exim4/mainlog", O_WRONLY|O_APPEND|O_LARGEFILE) = 3
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_mode=S_IFREG|0640, st_size=302636292, ...}) = 0
write(3, "2005-03-10 23:43:14 50 select() "..., 62) = 62
open("/var/log/exim4/paniclog", O_WRONLY|O_APPEND|O_LARGEFILE) = 6
fcntl64(6, F_GETFD)                     = 0
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
write(6, "2005-03-10 23:43:14 50 select() "..., 62) = 62
close(6)                                = 0
close(3)                                = 0
select(5, [3 4], NULL, NULL, NULL)      = -1 EBADF (Bad file descriptor)
waitpid(-1, 0xbffff238, WNOHANG)        = -1 ECHILD (No child processes)
select(5, [3 4], NULL, NULL, NULL)      = -1 EBADF (Bad file descriptor)
waitpid(-1, 0xbffff238, WNOHANG)        = -1 ECHILD (No child processes)
select(5, [3 4], NULL, NULL, NULL)      = -1 EBADF (Bad file descriptor)
waitpid(-1, 0xbffff238, WNOHANG)        = -1 ECHILD (No child processes)
[and so on...]





Thanks for your work,
Antonio


PS: The split conf files rock!



-- Package-specific info:
Exim version 4.50 #1 built 02-Mar-2005 07:42:40
Copyright (c) University of Cambridge 2004
Berkeley DB: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)
Support for: iconv() IPv6 PAM Perl GnuTLS Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql
Authenticators: cram_md5 cyrus_sasl plaintext spa
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Configuration file is /var/lib/exim4/config.autogenerated
# /etc/exim4/update-exim4.conf.conf
#
# Edit this file and /etc/mailname by hand and execute update-exim4.conf
# yourself or use 'dpkg-reconfigure exim4-config'

dc_eximconfig_configtype='internet'
dc_other_hostnames='planis.dynalias.net'
dc_local_interfaces=''
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='true'
dc_relay_nets='192.168.0.0/16'
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='true'
dc_hide_mailname=''

# Solist
# WARNING: This was not set by debconf
dc_localdelivery='maildir_home'

dc_mailname_in_oh='true'
mailname:planis.dynalias.net

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (70, 'experimental')
Architecture: i386 (i586)
Kernel: Linux 2.6.10
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages exim4 depends on:
ii  exim4-base                    4.50-4     support files for all exim MTA (v4
ii  exim4-daemon-heavy            4.50-4     exim MTA (v4) daemon with extended

-- no debconf information


---------------------------------------
Received: (at 299051-done) by bugs.debian.org; 25 May 2005 23:27:36 +0000
>From mh+debian-packages@zugschlus.de Wed May 25 16:27:35 2005
Return-path: <mh+debian-packages@zugschlus.de>
Received: from 5301d.unt0.torres.l21.ma.zugschlus.de (torres.int.l21.ma.zugschlus.de) [217.151.83.1] (Debian-exim)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Db5Hj-00074Q-00; Wed, 25 May 2005 16:27:35 -0700
Received: from lefler.int.l21.ma.zugschlus.de ([192.168.130.38])
	by torres.int.l21.ma.zugschlus.de with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32)
	(Exim 4.50)
	id 1Db5Hh-0005T0-R4; Thu, 26 May 2005 01:27:33 +0200
Received: from mh by lefler.int.l21.ma.zugschlus.de with local (Exim 4.50)
	id 1Db5Hg-0006xJ-TP; Thu, 26 May 2005 01:27:32 +0200
Date: Thu, 26 May 2005 01:27:32 +0200
From: Marc Haber <mh+debian-packages@zugschlus.de>
To: 307961-done@bugs.debian.org, 297670-done@bugs.debian.org,
	299051-done@bugs.debian.org, 302060-done@bugs.debian.org,
	303351-done@bugs.debian.org, 304033-done@bugs.debian.org,
	299732-done@bugs.debian.org, 296492-done@bugs.debian.org,
	299733-done@bugs.debian.org, 300967-done@bugs.debian.org
Cc: Marc Haber <mh+debian-packages@zugschlus.de>
Subject: Closing bugs aftger 4.50-6 has been approved for sarge
Message-ID: <20050525232732.GA26471@lefler.int.l21.ma.zugschlus.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
Delivered-To: 299051-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 
X-CrossAssassin-Score: 3

These bugs are now fixed in sarge as well.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835