100% cpu usage when closing controling terminal
When I run getstream in the background and close the terminal (ssh session) cpu usage goes to 100%. root@odb:~# getstream -c config & root@odb:~# logout Effect - 100% cpu usage and after a while getstream dies. Running it through nohup helps: root@odb:~# nohup getstream -c config > /dev/null & After this I can logout and everything works ok. Any ideas? I could work on adding a true 'daemon mode' to getstream next week. -- .: Jakub Paweł Głazik, .: email & jabber: zytek<at>nuxi.pl
On Thu, Mar 05, 2009 at 08:09:32PM +0100, Jakub Paweł Głazik wrote:
When I run getstream in the background and close the terminal (ssh session) cpu usage goes to 100%.
root@odb:~# getstream -c config & root@odb:~# logout
Effect - 100% cpu usage and after a while getstream dies.
Hmmm - strange - i would guess it tries to write to stdout and fails and loops on that. The watchdog then kills it.
Running it through nohup helps:
root@odb:~# nohup getstream -c config > /dev/null &
After this I can logout and everything works ok.
Any ideas? I could work on adding a true 'daemon mode' to getstream next week.
I have written extensions to the logging to use a thread to do the actual writing to file/syslog whatever. Syslog although typically UDP may block when used locally (try sigstoping syslogd). Its a bad thing to die because logging blocks. So i use glib async queues to hand over loglines to write out to a writing process. The only problem right now is that when getstream dies you might probably not see the last lines send to the logging thread. When we have seperated the logging to be nice daemon mode is a 5 line forking ;) Flo -- Florian Lohoff flo@rfc822.org +49-171-2280134 Those who would give up a little freedom to get a little security shall soon have neither - Benjamin Franklin
Dnia 2009-03-05, o godz. 20:37:41 Florian Lohoff <flo@rfc822.org> napisał(a):
On Thu, Mar 05, 2009 at 08:09:32PM +0100, Jakub Paweł Głazik wrote:
When I run getstream in the background and close the terminal (ssh session) cpu usage goes to 100%.
root@odb:~# getstream -c config & root@odb:~# logout
Effect - 100% cpu usage and after a while getstream dies.
Hmmm - strange - i would guess it tries to write to stdout and fails and loops on that. The watchdog then kills it.
I thought the same but why this does NOT work to solve the problem: # getstream -c getstream.conf > /dev/null 2> /dev/null & # logout Same - 100% cpu usage -- .: Jakub Paweł Głazik, .: email & jabber: zytek<at>nuxi.pl
On Thu, Mar 05, 2009 at 09:24:22PM +0100, Jakub Paweł Głazik wrote:
Hmmm - strange - i would guess it tries to write to stdout and fails and loops on that. The watchdog then kills it.
I thought the same but why this does NOT work to solve the problem:
# getstream -c getstream.conf > /dev/null 2> /dev/null & # logout
Same - 100% cpu usage
When you set an ulimit and then start getstream - close the tty and wait for it to be killed you should get a coredump because the watchdog kills with SIGABRT - When you look at the core you might find the loop it hangs at with bt Flo -- Florian Lohoff flo@rfc822.org +49-171-2280134 Those who would give up a little freedom to get a little security shall soon have neither - Benjamin Franklin
participants (2)
-
Florian Lohoff -
Jakub Paweł Głazik