supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Charlie Brady <charlieb-supervision@budge.apana.org.au>
To: "Count László de Almásy" <calmasy@gmail.com>
Cc: supervision@list.skarnet.org
Subject: OpenSim.exe causes cpu spike (Re: supervise causes cpu spike)
Date: Sat, 13 Dec 2008 18:49:08 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0812131843090.10503@e-smith.charlieb.ott.istop.com> (raw)
In-Reply-To: <abb783b90812131433sa9183e5m21f8f1f853b2ec51@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1235 bytes --]



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 </dev/null

or

exec </dev/null
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?

  reply	other threads:[~2008-12-13 23:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-13 22:33 supervise causes cpu spike Count László de Almásy
2008-12-13 23:49 ` Charlie Brady [this message]
2008-12-14  2:26   ` OpenSim.exe causes cpu spike (Re: supervise causes cpu spike) Count László de Almásy
2008-12-14  6:04     ` Charlie Brady
2008-12-14  6:18       ` Count László de Almásy
2008-12-16 10:48 ` supervise causes cpu spike Laurent Bercot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0812131843090.10503@e-smith.charlieb.ott.istop.com \
    --to=charlieb-supervision@budge.apana.org.au \
    --cc=calmasy@gmail.com \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).