From owner-freebsd-current@FreeBSD.ORG Thu Mar 7 06:38:07 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AEFC9229; Thu, 7 Mar 2013 06:38:07 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id 5956D204; Thu, 7 Mar 2013 06:38:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1UDUSq-0005WK-D4; Thu, 07 Mar 2013 09:38:05 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=Kh2cNLevTcjxA0SWiTcFPsqHC6Gkp4yyoNk04B8ZF4o=; b=ZvXNZC4LGMFNEBDmiFHJRMi4N3pXzb/khUWMIBDOFUsoeM6kj2idkRmR4+SgCSoUkUfgGnPQZEFtHcE0v2tSavvpL9FZJ/Mwb9xvO4Og8YhA6zTc8XL0odNPgR3bzOW37Gbu4LJQOVITBKhHm4j0GGN6HniRDSztt9IfGqtWCY8=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1UDUQ3-0009HU-83; Thu, 07 Mar 2013 06:35:13 +0000 From: Jan Beich To: Jilles Tjoelker Subject: Re: r247839: broken pipe - for top, sudo and ports In-Reply-To: <20130306212408.GA15814@stack.nl> (Jilles Tjoelker's message of "Wed, 6 Mar 2013 22:24:08 +0100") Date: Thu, 07 Mar 2013 04:54:01 -0100 References: <5135B7E1.3050002@zedat.fu-berlin.de> <5135BBD9.9090009@FreeBSD.org> <51364914.2010104@zedat.fu-berlin.de> <51364E8D.5020608@zedat.fu-berlin.de> <20130306212408.GA15814@stack.nl> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1UDUQ3-0009HU-83@internal.tormail.org> Cc: Davide Italiano , Dimitry Andric , FreeBSD Current , "Hartmann, O." 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: Thu, 07 Mar 2013 06:38:07 -0000 Jilles Tjoelker writes: > On Tue, Mar 05, 2013 at 08:59:09PM +0100, Hartmann, O. wrote: > >> A "truss top" reveals this, is this of help? > >> [...] >> stat("/etc/nsswitch.conf",{ mode=-rw-r--r-- >> ,inode=162310,size=1007,blksize=32768 }) = 0 (0x0) >> stat("/etc/nsswitch.conf",{ mode=-rw-r--r-- >> ,inode=162310,size=1007,blksize=32768 }) = 0 (0x0) >> stat("/etc/nsswitch.conf",{ mode=-rw-r--r-- >> ,inode=162310,size=1007,blksize=32768 }) = 0 (0x0) >> stat("/etc/nsswitch.conf",{ mode=-rw-r--r-- >> ,inode=162310,size=1007,blksize=32768 }) = 0 (0x0) >> stat("/etc/nsswitch.conf",{ mode=-rw-r--r-- >> ,inode=162310,size=1007,blksize=32768 }) = 0 (0x0) >> socket(PF_LOCAL,SOCK_STREAM,0) = 4 (0x4) >> connect(4,{ AF_UNIX "/var/run/nscd" },15) = 0 (0x0) >> fcntl(4,F_SETFL,O_NONBLOCK) = 0 (0x0) >> kqueue(0x80183b000,0x80122fc58,0x10,0x80062b308,0x80183b010,0x2) = 5 (0x5) >> kevent(5,{0x4,EVFILT_WRITE,EV_ADD,0,0x0,0x0},1,0x0,0,0x0) = 0 (0x0) >> kqueue(0x5,0x7fffffffd2e0,0x1,0x0,0x0,0x0) = 6 (0x6) >> kevent(6,{0x4,EVFILT_READ,EV_ADD,0,0x0,0x0},1,0x0,0,0x0) = 0 (0x0) >> kevent(5,{0x4,EVFILT_WRITE,EV_ADD,1,0x4,0x0},1,0x0,0,0x0) = 0 (0x0) >> kevent(5,0x0,0,{0x4,EVFILT_WRITE,EV_EOF,0,0x2000,0x0},1,0x0) = 1 (0x1) >> sendmsg(0x4,0x7fffffffd290,0x0,0x1,0x1,0x0) ERR#32 'Broken pipe' >> SIGNAL 13 (SIGPIPE) >> process exit, rval = 0 > > Apparently there is a bug that causes nscd to close the connection > immediately but even then it is wrong that this terminates the calling > program with SIGPIPE. > > The below patch prevents the SIGPIPE but cannot revive the connection to > nscd. This may cause numeric UIDs in top or increase the load on the > directory server. It is compile tested only. [...] The patch seems to fix the issue in a world after r247804. I don't see numeric UIDs in top but without the patch top crashes with SIGPIPE a lot less frequently than sudo or make install (in base/ports) for me. In my case shutting down nscd helped, too. Compared to stock nsswitch.conf I only have "cache" added.