From owner-freebsd-stable@FreeBSD.ORG Fri May 6 19:02:52 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21E6E16A4D4 for ; Fri, 6 May 2005 19:02:52 +0000 (GMT) Received: from smtp14.wanadoo.fr (smtp14.wanadoo.fr [193.252.23.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E2FF43D31 for ; Fri, 6 May 2005 19:02:50 +0000 (GMT) (envelope-from lists@nbux.com) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1409.wanadoo.fr (SMTP Server) with ESMTP id 57F587000096 for ; Fri, 6 May 2005 21:02:49 +0200 (CEST) Received: from daneel.nbux.com (LNeuilly-152_22-15-131.w82-127.abo.wanadoo.fr [82.127.94.131]) by mwinf1409.wanadoo.fr (SMTP Server) with ESMTP id 266AE70000B9; Fri, 6 May 2005 21:02:48 +0200 (CEST) X-ME-UUID: 20050506190249157.266AE70000B9@mwinf1409.wanadoo.fr Received: from webmail.nbux.com (daneel.nbux.com [192.168.42.2]) by daneel.nbux.com (Postfix) with ESMTP id 1B3D37F494; Fri, 6 May 2005 21:02:46 +0200 (CEST) Message-ID: <50660.192.168.0.20.1115406166.squirrel@webmail.nbux.com> In-Reply-To: <2b5f066d05050608004d0b10fa@mail.gmail.com> References: <32899.194.51.215.62.1115390072.squirrel@webmail.nbux.com> <2b5f066d05050608004d0b10fa@mail.gmail.com> Date: Fri, 6 May 2005 21:02:46 +0200 (CEST) From: "Christophe Yayon" To: "Brian McCann" User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: yes cc: freebsd-stable@freebsd.org cc: Christophe Yayon Subject: Re: pthreads and nagios issue X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2005 19:02:52 -0000 Hi, But is it a Nagios or FreeBSD problem, if you read "what's new" section on nagios site, you can see : ----------------- 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. ------------------ And it appears to be a FreeBSD pthread implementation problem (not a Nagios specific problem...) What do u think about that ? > On 5/6/05, Christophe Yayon wrote: >> Hi all, >> >> i am upgrading our nagios 1.2 (on freebsd 5.3-release) to nagios 2.0 >> (currently last cvs after 2.0b3) on Freebsd-5.4RC3 and i saw a very >> strange thing. >> >> After few hours, nagios main process (nagios -d ...) use lot of cpu time >> and when i do a truss on the pid, i have a "kse_release" loop message. >> >> # top >> last pid: 75729; load averages: 1.81, 2.08, 2.03 >> 63 processes: 2 running, 61 sleeping >> CPU states: 12.5% user, 0.0% nice, 16.0% system, 0.0% interrupt, 71.5% >> idle >> Mem: 36M Active, 1639M Inact, 219M Wired, 68M Cache, 112M Buf, 44M Free >> Swap: 5000M Total, 52K Used, 5000M Free >> >> PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU >> COMMAND >> 40435 nagios 112 0 4688K 3544K CPU0 0 569:46 93.99% 93.99% >> nagios >> [...] >> >> # truss -p 40435 >> kse_release(0xbfbf9b70) ERR#22 "Invalid >> argument" >> kse_release(0xbfbf9b70) ERR#22 "Invalid >> argument" >> kse_release(0xbfbf9b70) ERR#22 "Invalid >> argument" >> [...] >> >> I know there is a pthread_acquire() issue with Nagios and FreeBSD >> threads, but is there any patch against this ? >> >> Thanks in advance... >> >> _______________________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to >> "freebsd-stable-unsubscribe@freebsd.org" >> > > I've got the same issues, as do some people on the nagios-users list. > If there is a patch available, the Nagios team still isn't aware of it > yet as that is one of the reasons 2.0 is still in beta. > > -- > _-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_ > Brian McCann > Systems & Network Administrator, K12USA > > "I don't have to take this abuse from you -- I've got hundreds of > people waiting to abuse me." > -- Bill Murray, "Ghostbusters" > ----- > This mail has been scanned. >