[mythtv-commits] Ticket #11461: mythlogserver busy with 200 poll() calls per second even if there is nothing to log

MythTV noreply at mythtv.org
Tue Mar 19 08:49:43 UTC 2013


#11461: mythlogserver busy with 200 poll() calls per second even if there is
nothing to log
----------------------------------------+------------------------
     Reporter:  tino@…                  |      Owner:  beirdo
         Type:  Bug Report - General    |     Status:  new
     Priority:  minor                   |  Milestone:  unknown
    Component:  MythTV - Mythlogserver  |    Version:  0.26-fixes
     Severity:  medium                  |   Keywords:
Ticket locked:  0                       |
----------------------------------------+------------------------
 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.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/11461>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list