Project

General

Profile

Actions

Bug #6052

closed

packet buffer number increasing until out-of-memory with 1GB on RPi while DVR recording to disk/NFS

Added by Alex Krupp about 4 years ago. Updated over 3 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
PVR / DVR
Target version:
-
Start date:
2021-05-23
Due date:
% Done:

0%

Estimated time:
Found in version:
4.3-1964~g637844055
Affected Versions:

Description

tvheadend is "reaped" by the Linux oom killer after exhausting all available memory when using DVR. I have turned swapping off to stay with a responsive system at least. Streaming is fine. The issue shows only when recording. I have tested

  • 4.2.4-dmo1~bpo9+1~rpt1
  • current stable (4.2.8?)
  • and the current unstable 4.3-1964~g637844055

Suggestion: If a ring buffer is used for reusable packet buffers: maybe the write-to-disk code does not pass ownership to the allocator, again? Such a problem will not show on systems with todays amount of RAM (8GB or more + swap), as most recordings will be done within <5GB. I did not test with a short recording (<10 min.), whether the packet buffers will be deallocated after recording stops.

In such a case valgrind won't help much, because all memory is accounted for... Please find attached a valgrind log, regardless.


Files

valgrind2.log (55.7 KB) valgrind2.log valgrind --log-socket=127.0.0.1 --leak-check=yes --trace-children=yes /usr/bin/tvheadend -f -p /run/tvheadend.pid -u hts -g video Alex Krupp, 2021-05-23 10:34
Screenshot_2021-05-22 Tvheadend.png (78.2 KB) Screenshot_2021-05-22 Tvheadend.png huge amount of packet buffers, while increasing Alex Krupp, 2021-05-23 10:40
journal.txt (23.7 KB) journal.txt exemplary journal extract not related to valgrind2.log Alex Krupp, 2021-05-23 11:15
Actions

Also available in: Atom PDF