From owner-freebsd-current@FreeBSD.ORG Sat Mar 9 09:24:01 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A0D0E592 for ; Sat, 9 Mar 2013 09:24:01 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 448D9711 for ; Sat, 9 Mar 2013 09:24:01 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.80.1) for freebsd-current@freebsd.org with esmtp (envelope-from ) id <1UEG0W-000jrj-EN>; Sat, 09 Mar 2013 10:24:00 +0100 Received: from e178025158.adsl.alicedsl.de ([85.178.25.158] helo=munin.geoinf.fu-berlin.de) by inpost2.zedat.fu-berlin.de (Exim 4.80.1) for freebsd-current@freebsd.org with esmtpsa (envelope-from ) id <1UEG0W-0034oK-9o>; Sat, 09 Mar 2013 10:24:00 +0100 Message-ID: <513AFFF0.6010500@zedat.fu-berlin.de> Date: Sat, 09 Mar 2013 10:25:04 +0100 From: "Hartmann, O." Organization: FU Berlin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130309 Thunderbird/17.0.4 MIME-Version: 1.0 To: FreeBSD Current Subject: Re: CURRENT (r248061):Thunderbird SIGNAL 11 with OpenLDAP / nscd(1) broken pipe/ References: <513AFBE3.8070506@zedat.fu-berlin.de> In-Reply-To: <513AFBE3.8070506@zedat.fu-berlin.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Originating-IP: 85.178.25.158 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2013 09:24:01 -0000 Am 03/09/13 10:07, schrieb Hartmann, O.: > For the introduction, I filed a PR for this at beginning of 2012 and > suffered from the very same problem close to two years before on ALL > FreeBSD versions and platforms using OpenLDAP as the user backend: > > ports/164239: [PATCH] mail/thunderbird: crash with nss_ldap > > Even with the suggested patch by the maintainer the problem stayed. > > With the introduction of bad code due to updates with > r247804 and the > following issues of SIGNAL 13/broken pipe, the problem now is even worse > in FreeBSD 10.0 r248061. > From my limited point of view I guess this long lasting unresolved > problem could have been revealed itself and I hope this could be fixed > along with fixing nscd(1). > > Again, Thunderbird in all flavours since 2010 crashes on FreeBSD 8/9 and > now 10.0-CURRENT when it is used on systems with user backend in > OpenLDAP or any LDAP (Thunderbird works on non-OpenLDAP backed systems > of the same OS revision). > > I was able to "solve" the problem by starting Firefox first and only > Firefox getting started prior to Thunderbird resolved the problem for a > while, but closing Firefox and waiting a bit left Thunderbird > unstarteable again until Firefox was closed and reopened again. > > I guess this strange behaviour reveals a deeper issue not necessarily > bound to nscd(1) (since the problem with Thunderbird also occurs without > nscd(1), BUT always bound to the use of OpenLDAP backend (with > security/pam_ldap and net/nss_ldap from ports). > > Now, on FreeBSD 10.0-CURRENT r248061/amd64, Thunderbird dies immediately > with SIGNAL 11 on those boxes with OpenLDAP backend and no "trick" makes > Thunderbird starting enymore. > > In my desperation, I did a truss, see below and it seems to me that > there is a problem getting the effective UID, since the SIGNAL 11 arises > after geteuid(). > > At the moment, I have switched off nscd(1) by default since it is broken > in CURRENT or doing very strange things (see list about broken pipe in > the system, sudo(1) or even the port's system (SIGNAL 13)). > > I think there is a major issue covered and I hope this could be solved > by the problems triggered. > > it is hard to believe that I'm the only one using FreeBSD for both > workstation and server environment in conjuction with OpenLDAP and > facing the problem with a popular software like Thunderbird. > > If it is a stupid configuation problem then this must be very, very > special since it is now sticky with me for years. > > Here comes the truss ...: > > open("/etc/pwd.db",O_RDONLY,00) = 4 (0x4) > fcntl(4,F_SETFD,FD_CLOEXEC) = 0 (0x0) > fstat(4,{ mode=-rw-r--r-- ,inode=117927,size=40960,blksize=16384 }) = 0 > (0x0) > read(4,"\0\^F\^Ua\0\0\0\^B\0\0\^D\M-R\0"...,260) = 260 (0x104) > pread(0x4,0x801bfc000,0x1000,0x6000,0x1,0x0) = 4096 (0x1000) > pread(0x4,0x813927000,0x1000,0x2000,0x1,0x0) = 4096 (0x1000) > close(4) = 0 (0x0) > socket(PF_LOCAL,SOCK_STREAM,0) = 4 (0x4) > connect(4,{ AF_UNIX "/var/run/nscd" },15) ERR#2 'No such file or > directory' > close(4) = 0 (0x0) > sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) > = 0 (0x0) > sigaction(SIGPIPE,{ SIG_IGN 0x0 ss_t },{ SIG_IGN SA_RESTART ss_t }) = 0 > (0x0) > sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) > getpid() = 3235 (0xca3) > geteuid() = 2002 (0x7d2) > open("/usr/local/etc/nss_ldap.conf",O_RDONLY,0666) = 4 (0x4) > fstat(4,{ mode=-rw-r--r-- ,inode=5818085,size=7997,blksize=16384 }) = 0 > (0x0) > fstat(4,{ mode=-rw-r--r-- ,inode=5818085,size=7997,blksize=16384 }) = 0 > (0x0) > read(4,"@(#)$Id: ldap.conf,v 2.47 2006/0"...,16384) = 7997 (0x1f3d) > read(4,0x813928000,16384) = 0 (0x0) > close(4) = 0 (0x0) > __sysctl(0x7fffffffb1f8,0x2,0x7fffffffb220,0x7fffffffb200,0x0,0x0) = 0 (0x0) > gettimeofday({1362819606.123684 },0x0) = 0 (0x0) > getpid() = 3235 (0xca3) > issetugid(0x35001c1c,0x80,0x801b1b600,0x10,0x2,0x1) = 0 (0x0) > open("/etc/resolv.conf",O_RDONLY,0666) = 4 (0x4) > fstat(4,{ mode=-rw-r--r-- ,inode=117845,size=101,blksize=16384 }) = 0 (0x0) > read(4,"# Generated by resolvconf\nnames"...,16384) = 101 (0x65) > read(4,0x813928000,16384) = 0 (0x0) > close(4) = 0 (0x0) > __sysctl(0x7fffffffab28,0x2,0x7fffffffad20,0x7fffffffab30,0x0,0x0) = 0 (0x0) > issetugid(0x801526ae8,0x2e,0x2e,0x2e,0x101010101010101,0x8080808080808080) > = 0 (0x0) > stat("/etc/nsswitch.conf",{ mode=-rw-r--r-- > ,inode=117790,size=991,blksize=16384 }) = 0 (0x0) > open("/etc/hosts",O_RDONLY,0666) = 4 (0x4) > fstat(4,{ mode=-rw-r--r-- ,inode=117862,size=2418,blksize=16384 }) = 0 (0x0) > read(4,"# $FreeBSD: head/etc/hosts 10999"...,16384) = 2418 (0x972) > close(4) = 0 (0x0) > open("/usr/local/etc/openldap/ldap.conf",O_RDONLY,0666) = 4 (0x4) > fstat(4,{ mode=-rw-r--r-- ,inode=5817420,size=410,blksize=16384 }) = 0 (0x0) > read(4,"#\n# LDAP Defaults\n#\n\n# See l"...,16384) = 410 (0x19a) > read(4,0x813928000,16384) = 0 (0x0) > close(4) = 0 (0x0) > geteuid() = 2002 (0x7d2) > getuid() = 2002 (0x7d2) > open("/home/ohartmann/ldaprc",O_RDONLY,0666) ERR#2 'No such file or > directory' > open("/home/ohartmann/.ldaprc",O_RDONLY,0666) ERR#2 'No such file or > directory' > open("ldaprc",O_RDONLY,0666) ERR#2 'No such file or > directory' > sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) > = 0 (0x0) > sigaction(SIGPIPE,{ SIG_IGN SA_RESTART ss_t },{ SIG_IGN 0x0 ss_t }) = 0 > (0x0) > sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) > getuid() = 2002 (0x7d2) > stat("/etc/nsswitch.conf",{ mode=-rw-r--r-- > ,inode=117790,size=991,blksize=16384 }) = 0 (0x0) > geteuid() = 2002 (0x7d2) > open("/etc/pwd.db",O_RDONLY,00) = 4 (0x4) > fcntl(4,F_SETFD,FD_CLOEXEC) = 0 (0x0) > fstat(4,{ mode=-rw-r--r-- ,inode=117927,size=40960,blksize=16384 }) = 0 > (0x0) > read(4,"\0\^F\^Ua\0\0\0\^B\0\0\^D\M-R\0"...,260) = 260 (0x104) > pread(0x4,0x813928000,0x1000,0x6000,0x1,0x0) = 4096 (0x1000) > pread(0x4,0x813929000,0x1000,0x5000,0x1,0x0) = 4096 (0x1000) > close(4) = 0 (0x0) > socket(PF_LOCAL,SOCK_STREAM,0) = 4 (0x4) > connect(4,{ AF_UNIX "/var/run/nscd" },15) ERR#2 'No such file or > directory' > close(4) = 0 (0x0) > sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) > = 0 (0x0) > sigaction(SIGPIPE,{ SIG_IGN 0x0 ss_t },{ SIG_IGN SA_RESTART ss_t }) = 0 > (0x0) > sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) > stat("/usr/local/etc/nss_ldap.conf",{ mode=-rw-r--r-- > ,inode=5818085,size=7997,blksize=16384 }) = 0 (0x0) > getpid() = 3235 (0xca3) > geteuid() = 2002 (0x7d2) > SIGNAL 11 (SIGSEGV) > process exit, rval = 0 Deleting /usr/local/etc/nss_ldap.conf, which is a link (hard or soft, doesn't matter the result) to /usr/local/etc/ldap.conf, makes Thunderbird start again as OpenLDAP backend wasn't configured/installed. But in that case, no OpenLDAP backed up users are available on the system.