Project

General

Profile

Actions

Bug #947

closed

Crash on malloc() - git 2.99.15.g78213

Added by Tomas Matejicek almost 13 years ago. Updated over 12 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-04-24
Due date:
% Done:

0%

Estimated time:
Found in version:
2.99.15.g78213
Affected Versions:

Description

Using latest tvheadend (todays git), it is crashing badly.

I can see this in error log: Unable to allocate 148224 bytes
The message comes from a fprintf in parse_mpeg2video() function
(parsers.c file), due to malloc() returning NULL for some reason.

I have 2GB free RAM and I am recording entire muxes at 3 adapters
at the same time for 24 hours a day (that is about 10 channels at once).

Tvheadend crashes usually after more than 20 hours of recording.

It seems it's going this way:
ts_recv_packet1() -> ts_recv_packet0() -> parse_mpeg_ts() -> parse_mpeg2video() -> malloc gets NULL here -> abort()

Why would it crash on malloc() is a mystery for me.
Is there any free() missing?
Could anybody skilled enough review the code?

One more notice:
after a fresh start, tvheadend forks about 20 processes, all are in state S (sleeping) most of the time, and recording works just fine. But after many hours, I can see some strange processes in T state (shown by htop, I have no idea what T should mean, htop help shows T=traced/stopped, but 'ps' doesn't report these processes). Surprisingly the processes won't go down, they seem to be locked by some futex, waiting for releasing some lock.

If there is anything I could provide for better debug, let me know please!

Thank you!


Files

gdb.txt (17.8 KB) gdb.txt debugger log as requested Tomas Matejicek, 2012-04-25 11:39
Actions

Also available in: Atom PDF