Project

General

Profile

Actions

Bug #5096

open

Working installation with Kodi frontend for Live TV, but recording fails with "mpegts: too much queued table input data..." after creating "(null)" directory

Added by Mark Haun almost 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
PVR / DVR
Target version:
-
Start date:
2018-05-02
Due date:
% Done:

0%

Estimated time:
Found in version:
4.2.6
Affected Versions:

Description

This is a new Linux installation on my x86-64 desktop (kernel 4.16.4). Only TVHeadEnd is running on the desktop; I access it via wired Ethernet from a Kodi media center in another room. The video source is an HDHomeRun on the same network (also wired), and I have the userspace library (userhdhomerun) and kernel DVB device (dvb_hdhomerun) installed and working correctly.

TVHeadEnd is running with normal user permissions (user "tvh") and is part of the "video" group so it has access to the DVB devices. AFAICT the permissions are ok because live TV is working just fine. However, I have not been able to get any recordings to work!

When a recording is due to start, the logs say

2018-05-01T23:59:28.00037 daemon.info: May  1 23:59:28 tvheadend[18251]: dvr: "BBC World News America" on "KCTS-HD" recorder starting
2018-05-01T23:59:28.00049 daemon.info: May  1 23:59:28 tvheadend[18251]: dvr: About to set stop timer for "BBC World News America" on "KCTS-HD" at start 1525219198 and original stop 1525220998 and overall stop at 1525220998
2018-05-01T23:59:28.00055 daemon.info: May  1 23:59:28 tvheadend[18251]: mpegts: 189.028MHz in SeattleOTA - tuning on HDHomeRun ATSC #2 : ATSC-T #0
2018-05-01T23:59:28.00060 daemon.info: May  1 23:59:28 tvheadend[18251]: subscription: 004A: "DVR: BBC World News America" subscribing on channel "KCTS-HD", weight: 300, adapter: "HDHomeRun ATSC #2 : ATSC-T #0", network: "SeattleOTA", mux: "189.028MHz", service: "KCTS-HD", profile="pass" 
2018-05-01T23:59:58.00166 daemon.warn: May  1 23:59:58 tvheadend[18251]: dvr: Unable to change directory permissions to "775" for "/pvr/(null)" (keeping "755")
2018-05-02T00:03:03.82894 daemon.warn: May  2 00:03:03 tvheadend[18251]: mpegts: too much queued table input data (over 2MB), discarding new
2018-05-02T00:03:13.87814 daemon.warn: May  2 00:03:13 tvheadend[18251]: mpegts: too much queued table input data (over 2MB), discarding new
2018-05-02T00:03:23.85803 daemon.warn: May  2 00:03:23 tvheadend[18251]: mpegts: too much queued table input data (over 2MB), discarding new
2018-05-02T00:03:33.90583 daemon.warn: May  2 00:03:33 tvheadend[18251]: mpegts: too much queued table input data (over 2MB), discarding new
2018-05-02T00:03:43.89278 daemon.warn: May  2 00:03:43 tvheadend[18251]: mpegts: too much queued table input data (over 2MB), discarding new

...and so on, every 10 seconds.

As soon as this happens, the web UI becomes unresponsive and the tvheadend process becomes unkillable except for kill -9. If I restart tvheadend while the recording is still supposed to be happening, it tries again with the same result.

Interestingly, although the tvheadend process is unresponsive, the system is basically idle---CPU less than 5%. But I wonder if the kernel DVB driver is behaving badly? because there are occasional kernel messages like this:

[10228.322175] perf: interrupt took too long (4386 > 4362), lowering kernel.perf_event_max_sample_rate to 45000
[31918.857361] perf: interrupt took too long (5514 > 5482), lowering kernel.perf_event_max_sample_rate to 36000

Also note the delay (three minutes) before the first "too much queued data" error. So maybe the data are being queued somewhere, pending writes to disk, but the disk access isn't happening, and it takes the queue about three minutes to overflow.

I don't understand the permissions error. My PVR path is set to an XFS-formatted partition mounted on /pvr. Directory permissions are set to 775:

drwxrwxr-x   4 tvh  video 20480 May  1 16:59 pvr

and after the recording fails to start correctly, I see a new empty directory in /pvr:

drwxrwxr-x   2 tvh  tvh       6 May  1 16:59 (null)

So:
Why is the directory called "(null)"?
Why does tvheadend complain that it cannot set permissions to 775 when, in fact, is has already done precisely that (the directory did not exist before)?
Why does tvheadend not create a file in this directory and start to write data?

Actions

Also available in: Atom PDF