﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
11461	mythlogserver busy with 200 poll() calls per second even if there is nothing to log	tino@…	JYA	"I use the mythtv 0.26/fixes packages for Debian from www.deb-multimedia.org (0.26.0+fixes20130311-dmo1). The computer has Intel graphics only.

I start mythbackend this way:

mythbackend -v channel,idle,eit --nodblog --syslog none

This is mostly a backend-only machine, the frontend is usually run on another computer.

mythlogserver constantly eats CPU time in this setup.

I used strace to see what it is doing, and it seems to be busy with poll() calls with timeout 0, so it immediately returns. It looks like this:

[pid  4940] poll([{fd=28, events=POLLIN}], 1, 0) = 0 (Timeout)

I tried to measure this, with the following result:

{{{
$ ps aux | grep mythlogserver | grep -v grep
mythtv    4938  0.5  0.1 613324 14772 ?        Ssl  Mar17  11:17 /usr/bin/mythlogserver --daemon --verbose general,channel,idle,eit --loglevel info --nodblog
$ timeout 10 strace -ff -p 4938 2>&1 | grep ""poll.*, 0)"" 2>&1 > out
$ wc -l out 
2051 out
}}}

So there are more 2051 poll() invokations with zero timeout in 10 seconds, more than 200 per second.

I also log console output, and the above also happens when nothing happens in console output. So mythlogserver is constantly busy even if there is nothing to log. 

I expect mythlogserver to be idle when there is nothing to log."	Bug Report - General	closed	minor	0.27.3	MythTV - Mythlogserver	0.26-fixes	medium	fixed			0
