From owner-freebsd-ports@FreeBSD.ORG Wed Sep 23 00:43:11 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB14A1065672; Wed, 23 Sep 2009 00:43:11 +0000 (UTC) (envelope-from lambert@lambertfam.org) Received: from sysmon.tcworks.net (sysmon.tcworks.net [65.66.76.4]) by mx1.freebsd.org (Postfix) with ESMTP id 8ABEC8FC17; Wed, 23 Sep 2009 00:43:11 +0000 (UTC) Received: from sysmon.tcworks.net (localhost [127.0.0.1]) by sysmon.tcworks.net (8.13.1/8.13.1) with ESMTP id n8N0hAn3088405; Tue, 22 Sep 2009 19:43:10 -0500 (CDT) (envelope-from lambert@lambertfam.org) Received: (from lambert@localhost) by sysmon.tcworks.net (8.13.1/8.13.1/Submit) id n8N0hAf7088404; Tue, 22 Sep 2009 19:43:10 -0500 (CDT) (envelope-from lambert@lambertfam.org) X-Authentication-Warning: sysmon.tcworks.net: lambert set sender to lambert@lambertfam.org using -f Date: Tue, 22 Sep 2009 19:43:10 -0500 From: Scott Lambert To: freebsd-current@freebsd.org Message-ID: <20090923004310.GA38138@sysmon.tcworks.net> Mail-Followup-To: freebsd-current@freebsd.org References: <20090922212905.GA77503@sysmon.tcworks.net> <8E5D7549-32D9-47E3-BA71-7539F33C068F@lassitu.de> <20090915030813.GB66091@sysmon.tcworks.net> <20090915125635.GB63311@atarininja.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8E5D7549-32D9-47E3-BA71-7539F33C068F@lassitu.de> <20090915030813.GB66091@sysmon.tcworks.net> User-Agent: Mutt/1.4.2.2i X-Mailman-Approved-At: Wed, 23 Sep 2009 02:44:21 +0000 Cc: Subject: Re: Nagios SIGSEGV on FreeBSD 8 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2009 00:43:11 -0000 Bcc:ing port to close the thread there. On Wed, Sep 23, 2009 at 12:58:01AM +0200, Stefan Bethke wrote: > 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. "sudo ln -s 'j' /etc/malloc.conf" seems to have done the trick. Nice, easy, fix (or bandaid?). I don't know how I failed to find your thread before. I found your thread on nagios-devel: http://archive.netbsd.se/?ml=nagios-devel&a=2009-07&t=11196612 Thank you for taking the time to figure this out in the first place and to reply to my message. -- Scott Lambert KC5MLE Unix SysAdmin lambert@lambertfam.org