From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 13 16:00:29 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5810716A41C for ; Wed, 13 Jul 2005 16:00:29 +0000 (GMT) (envelope-from michal.mertl@i.cz) Received: from vidle.i.cz (vidle.i.cz [193.179.36.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id E550B43D48 for ; Wed, 13 Jul 2005 16:00:28 +0000 (GMT) (envelope-from michal.mertl@i.cz) Received: from ns.i.cz (brana.i.cz [193.179.36.134]) by vidle.i.cz (Postfix) with ESMTP id 223EC2E014; Wed, 13 Jul 2005 18:00:27 +0200 (CEST) Received: from localhost (localhost.i.cz [127.0.0.1]) by ns.i.cz (Postfix) with SMTP id 00B21F4B02; Wed, 13 Jul 2005 18:00:27 +0200 (CEST) X-AV-Checked: Wed Jul 13 18:00:27 2005 ns.i.cz Received: from genius1.i.cz (genius1.i.cz [192.168.17.49]) by ns.i.cz (Postfix) with ESMTP id E922EF4B01; Wed, 13 Jul 2005 18:00:26 +0200 (CEST) From: Michal Mertl To: Jeremie Le Hen In-Reply-To: <20050713095059.GS39292@obiwan.tataz.chchile.org> References: <61087.192.168.42.2.1121196788.squirrel@webmail.nbux.com> <20050713095059.GS39292@obiwan.tataz.chchile.org> Content-Type: text/plain Date: Wed, 13 Jul 2005 18:00:25 +0200 Message-Id: <1121270425.1088.12.camel@genius1.i.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 14 Jul 2005 12:28:58 +0000 Cc: freebsd-hackers@freebsd.org, Christophe Yayon Subject: Re: nagios and pthreads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2005 16:00:29 -0000 Jeremie Le Hen wrote: > Hi Christophe, > > a quick glance at the archives whould have helped you. I also experienced the problem and read the thread. I don't believe anybody found and shared a way to solve it. The conclusion of the thread was that the problem is more in the application then in FreeBSD - the application does things not well defined in POSIX threading environment. The right fix is probably a non trivial change to Nagios. > > i know that we add already discuss about this problem, but is there any > > solution for this problem ? > > > > --- > > What's section on nagios website > > "FreeBSD and threads. On FreeBSD there's a native user-level > > implementation of threads called 'pthread' and there's also an optional > > ports collection 'linuxthreads' that uses kernel hooks. Some folks from > > Yahoo! have reported that using the pthread library causes Nagios to pause > > under heavy I/O load, causing some service check results to be lost. > > Switching to linuxthreads seems to help this problem, but not fix it. The > > lock happens in liblthread's __pthread_acquire() - it can't ever acquire > > the spinlock. It happens when the main thread forks to execute an active > > check. On the second fork to create the grandchild, the grandchild is > > created by fork, but never returns from liblthread's fork wrapper, because > > it's stuck in __pthread_acquire(). Maybe some FreeBSD users can help out > > with this problem." > > --- > > > > > > I have just upgraded to 5.4-STABLE but i encountered again the problem. > > Sometimes, there is a nagios forked child process which consume 100% of > > CPU. > > i have heard that there was perhaps a problem with libc_r reported by > > Luigi Rizzo on this list 06/22/2005, but no news since this date... > > > > My workaround is to have a cron job which run every hour and check if > > there is a bad nagios process and kill it... i know it's very ugly... > > > > Do you any solution or what could i do to get more trace when it happen ? > > sorry, but i am not familiar with ktrace like tools... If someone could > > help me to help nagios community on freebsd ;-) ? > > > > Thanks in advance. > > This thread should countain some answers : > http://lists.freebsd.org/pipermail/freebsd-hackers/2005-June/012435.html > > Regards,