From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1932 Path: news.gmane.org!not-for-mail From: Charlie Brady Newsgroups: gmane.comp.sysutils.supervision.general Subject: OpenSim.exe causes cpu spike (Re: supervise causes cpu spike) Date: Sat, 13 Dec 2008 18:49:08 -0500 (EST) Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463811723-835135423-1229212148=:10503" X-Trace: ger.gmane.org 1229212164 17050 80.91.229.12 (13 Dec 2008 23:49:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Dec 2008 23:49:24 +0000 (UTC) Cc: supervision@list.skarnet.org To: =?ISO-8859-1?Q?Count_L=E1szl=F3_de_Alm=E1sy?= Original-X-From: supervision-return-2167-gcsg-supervision=m.gmane.org@list.skarnet.org Sun Dec 14 00:50:28 2008 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1LBeFf-0005u5-MM for gcsg-supervision@gmane.org; Sun, 14 Dec 2008 00:50:27 +0100 Original-Received: (qmail 20792 invoked by uid 76); 13 Dec 2008 23:49:34 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 20783 invoked from network); 13 Dec 2008 23:49:33 -0000 X-X-Sender: charlieb@e-smith.charlieb.ott.istop.com In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1932 Archived-At: ---1463811723-835135423-1229212148=:10503 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8BIT On Sun, 14 Dec 2008, Count László de Almásy wrote: > I'm hoping someone can help me diagnose why supervising my OpenSim > process causes it to go up to 100% cpu, while when not supervised, I > have no such problems. This is on Debian/Linux amd64, with djb's > latest stock daemontools. > > Here's my run script: > > ====== > bee:/~# cat /service/opensim/run > #!/bin/sh > ulimit -s 262144 > cd /home/opensim/opensim/bin > exec setuidgid opensim mono OpenSim.exe > ====== Try: exec setuidgid opensim mono OpenSim.exe stopping/restarting with svc works as expected. it's just, the cpu > goes right up to 100% with the supervised mono process. running strace > on the process shows what's happening: > > read(0, ""..., 1024) = 0 > read(0, ""..., 1024) = 0 > [...] > > over and over. it's like something is sending the process an empty > character repeatedly. No, it's that the process is repeatedly reading standard input in non-blocking mode, without first checking that there are any bytes to read. That's a bug in OpenSim.exe (or in mono). If it is a supervised daemon process, why is it reading standard input? ---1463811723-835135423-1229212148=:10503--