[Opensim-dev] OpenSim.exe causes cpu spike

Count László de Almásy calmasy at gmail.com
Sun Dec 14 17:39:10 UTC 2008


Greetings,

I'm using a software suite called 'daemontools' to handle
start/stop/restart of OpenSim.exe on my Linux system. The added
benefit of this method is that the process is "supervised" such that
if it crashes, it's automatically restarted. I use it to handle quite
a few services on my system.

One problem however with opensim- while it does work supervised, the
cpu also jumps up to 100%. Running strace on the process shows what's
happening:

read(0, ""..., 1024)                    = 0
read(0, ""..., 1024)                    = 0
read(0, ""..., 1024)                    = 0
read(0, ""..., 1024)                    = 0
read(0, ""..., 1024)                    = 0
read(0, ""..., 1024)                    = 0
read(0, ""..., 1024)                    = 0
read(0, ""..., 1024)                    = 0
read(0, ""..., 1024)                    = 0

[...]

over and over and over. So I inquired on a mailing list where
daemontools is discussed, and was told that this is a bug in opensim;
that the process is repeatedly reading standard input in non-blocking
mode, without first checking that there are any bytes to read.

Does this sound right? If so, can it be fixed? Here is the relevant
thread on the supervision mailing list for more info:

http://thread.gmane.org/gmane.comp.sysutils.supervision.general/1931

And more about daemontools here:

http://cr.yp.to/daemontools/faq.html

Any help appreciated.

-- 
Cheers, László



More information about the Opensim-dev mailing list