From owner-freebsd-current@FreeBSD.ORG Tue Sep 22 22:58:05 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40A56106566C for ; Tue, 22 Sep 2009 22:58:05 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by mx1.freebsd.org (Postfix) with ESMTP id D59458FC0C for ; Tue, 22 Sep 2009 22:58:04 +0000 (UTC) Received: from localhost by koef.zs64.net (8.14.3/8.14.3) with ESMTP id n8MMw2gT024907 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 23 Sep 2009 00:58:03 +0200 (CEST) (envelope-from stb@lassitu.de) (authenticated as stb) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Stefan Bethke In-Reply-To: <20090922212905.GA77503@sysmon.tcworks.net> Date: Wed, 23 Sep 2009 00:58:01 +0200 Content-Transfer-Encoding: 7bit Message-Id: <8E5D7549-32D9-47E3-BA71-7539F33C068F@lassitu.de> References: <20090922212905.GA77503@sysmon.tcworks.net> To: Scott Lambert X-Mailer: Apple Mail (2.1076) Cc: freebsd-current@freebsd.org Subject: Re: Nagios SIGSEGV on FreeBSD 8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 22 Sep 2009 22:58:05 -0000 Am 22.09.2009 um 23:29 schrieb Scott Lambert: > I've posted this to FreeBSD-ports and Nagios-Users without a nibble. > > I've been running a FreeBSD 8-BETA2 server for DNS on a network I > recently took over. No problems. We needed to get Nagios running on > that network to watch all the hosts in RFC 1918 space. Taking the > easy > route, I just installed the Nagios 3.0.6 port on this 8-BETA2 box. > > Nagios runs great until an acknowledged down host (with acknowledgment > comment) comes back up. Nagios exits on a SIGSEGV. It seems to only > happen when we have retention data (retention.dat) showing the host > down. If we just restart Nagios without removing the retention.dat > file, it exists on SIGSEGV the next time it tries to mark the host > up. I > upgraded to the nagios-devel (Nagios 3.1.2) port and we have the same > problem. I'v discovered this bug in Nagios some weeks ago, but posting to nagios-devel did not elicit a response. The problem is a use-after- free bug in the code that deals with comments (or it was in my case anyway). The bug leads to a SEGV because -current (including all 8.0 betas) has malloc flags set that make free write a canary value to the just-freed block. If you move up to rc1, or set the "j" flag, nagios appears to work. If you need references to the threads on freebsd-ports and nagios- devel, let me know. HTH, Stefan -- Stefan Bethke Fon +49 151 14070811