I wrote:
>> Finally, yesterday as I was debugging the code for other issues, I
started
>> it up directly, without using svscan and supervise. No CPU overload!
So,
>> something about svscan/supervise is causing this program to go hog wild.
Charles Cazabon replied:
>Perhaps supervise is continually restarting this program?
No, the program is behaving itself, aside from taking up all CPU resources.
It's the program itself that is getting 90+% CPU according to top, not the
supervise process that started it.
> What does svstat say about your daemon when it's loading the CPU?
All systems functional. Depending on how long it's been up, I'll get
something like:
querydaemon: up (pid 31509) 89 seconds, normally down
> What if you run it several times over half a minute or so?
Beg pardon? You mean doing "svc -u" and "svc -d" over and over?
>If it's not that, we need solid data, not speculation -- strace/truss
>supervise and all it's children when running it. That will tell you
>exactly what's going on.
Okay, this is getting annoying. I shut down svscan, using its init script.
Then, I started one supervise process to oversee querydaemon (my program).
No CPU overload. Next, I killed that supervise process, restarted svscan
with its init script, and then restarted querydaemon using its init script.
Again, no CPU overload, and everything was working fine. But then I
rebooted the machine, allowing svscan and the supervised programs to start
up as they normally would at system boot. querydaemon is once again maxing
out the CPU! I repeated this procedure several times to be sure I wasn't
making it all up.
Since I was using the init scripts to start and stop everything every time
(except for when creating a single supervise process), I don't believe they
are the problem. I'm open to suggestions on how to pursue debugging this.
Is it possible to strace the entire start-up process?
---Kris Kelley