memory leaks while streaming from dvb

*nix specific usage questions
tpeland
New Cone
New Cone
Posts: 4
Joined: 08 May 2006 12:40

memory leaks while streaming from dvb

Postby tpeland » 08 May 2006 13:20

Vlc versions 0.8.5 and 0.8.4a leak a lot of memory when streaming.

I have a system with two dvb-cards and I'm trying to stream multiple channels from both cards simultanously. That is no problem except that the vlc processes grow uncontrollably while streaming. For example 1 hour test run gave following increase in memory consumption.

VLC for adapter 0: 298MB => 600MB
VLC for adapter 1: 288MB => 1433MB

# command for starting VLC for adapter 1
# 5 tv channels + 2 radio channels
vlc --daemon --verbose 0 --ipv6 --ttl 2 --ts-es-id-pid \
--programs=49,65,97,323,113,4449,4465 \
dvb: vlc:quit --dvb-adapter=1 --dvb-frequency=154000000 \
--dvb-srate=6900000 --dvb-modulation=128 \
--sout-standard-access=udp --sout-standard-mux=ts --sout \
'#duplicate{dst=std{url=[ff75:0130:2001:998:11::82:3]},select="program=49",dst=std{url=[ff75:0130:2001:998:11::82:4]},select="program=65",dst=std{url=[ff75:0130:2001:998:11::82:5]},select="program=97",dst=std{url=[ff75:0130:2001:998:11::82:9]},select="program=323",dst=std{url=[ff75:0130:2001:998:11::82:a]},select="program=113",dst=std{url=[ff75:0130:2001:998:11::84:7]},select="program=4449",dst=std{url=[ff75:0130:2001:998:11::84:8]},select="program=4465"}'

If I stream just one channel the increase is much smaller but still noticeable. It seems the memory consumption depends on the number of streams sent from vlc.

While compiling vlc everything else is disabled except:
--enable-sout --enable-dvb --enable-pvr --enable-utf8

It seems I'm not the first one to notice this problem. 0.8.1, 0.8.2

If some coder has ideas for testing I'm willing to run the tests.

Dr Hackenbush

memory leaks while streaming from dvb

Postby Dr Hackenbush » 22 May 2006 20:50

Hi!
I experience the same problem. I'm running a Debian sid distro. When I start VLC it is running perfectly stable for a couple of hours, and uses about 55 MB to stream 4 dvb channels. Then suddenly it starts to chew memory at a constant rate of about 4.5 MB/minute. The chew rate seems to be proportional to the number channels that are being streamed.

It is striking that once the memory leakage has started it cannot return back to stable conditions. It chews up all available memory until out-of-memory handling kills VLC. So far, I have not been able to pin-point any initiating event of this "leakage path to death". Does anyone have a suggestion of how to capture such an initiating event?

Kind Regards
Dr Hackenbush

Guest

Postby Guest » 02 Jun 2006 11:37

I have the same problem with the memory leaking in 0.8.5
Commandline:
vlc dvb: --intf telnet --dvb-frequency=626000000 --ts-es-id-pid --programs=1,2,3,4,5 --dvb-transmission=8 --dvb-bandwidth=8 --sout='#duplicate{dst=std{access=http,mux=ts,url=192.168.1.3:1234,sap,group="BRQ",name="CT 24"},select="program=3",dst=std{access=http,mux=ts,url=192.168.1.3:1235,sap,group="BRQ",name="NOVA"},select="program=5",dst=std{access=http,mux=ts,url=192.168.1.3:1236,sap,group="BRQ",name="CT1"},select="program=1",dst=std{access=http,mux=ts,url=192.168.1.3:1237,sap,group="BRQ",name="CT2"},select="program=2",dst=std{access=http,mux=ts,url=192.168.1.3:1238,sap,group="BRQ",name="CT 4 SPORT"},select="program=4"}'

I'd appreciate any kind of help.

D-Evil
New Cone
New Cone
Posts: 3
Joined: 18 Dec 2005 21:56

Postby D-Evil » 09 Jun 2006 00:46

Same for me (using VLM). I think it has something to do with errors in streams, but I'm not sure.

Second problem can be in used hardware (maybe problem with certain HW configurations), so guys, what DVB cards do you have? I have Aver DVB-T 771.

tpeland
New Cone
New Cone
Posts: 4
Joined: 08 May 2006 12:40

memory leaks while streaming from dvb

Postby tpeland » 09 Jun 2006 07:52

Card: Terratec Cinergy 1200 DVB-C (budget type card)
OS: linux with kernel 2.6.16.9

Bobby

Postby Bobby » 09 Jun 2006 12:21

Hauppauge HVR-1100. The behaviour seems to me undeterministic. Sometimes it runs OK for hours, sometimes it starts consuming memory from beginning. I haven't found when exactly it occurs yet.

vag

Postby vag » 26 Jun 2006 09:42

The same the problem.
Kernel (linux) 2.6.16.17 (on i686), glibc 2.3.5. Two skystar2 pci adapters. Two instances of vlc 0.8.5 are running.
But it seems to me that quantity of dvb cards is not essential. VLC gets very hungry for memory when dvb-stream parameters are changed.

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Postby xtophe » 30 Jun 2006 00:53

That's a very very well bug. But we haven't found it yet.
It seems to be triggered when the signal is not good. Bad reception, rain, ...
Xtophe

Zoldrax

The same the problem.

Postby Zoldrax » 14 Jul 2006 21:48

Memory leak, when executing this:

vlc -vvv --program=2 dvb: --dvb-voltage=18 --dvb-frequency=12073000 --dvb-srate=27500000 --dvb-lnb-lof1=10750000 --dvb-lnb-lof2=10750000 --dvb-lnb-slof=10700000 --sout '#std{access=rtp,mux=ts,dst=239.255.12.43:2345}'

VLC media player 0.8.5 Janus

IMHO, bug is in ts module. It eat memory, because pausing in this:
[00000267] main private debug: removing module "mux_ts"

Signal is good...
output stream configure is not important...
Is the bug in old versions?

CRC

Postby CRC » 15 Jul 2006 05:53

I agree with this - it's a bug.

I tried to bring this up on the IRC channel months ago and was flamed to the point of I couldn't be bothered researching it anymore.

The biggest issue I had was when streaming raw DVB data to a multicast address. Sometimes it would output no data to the network, and the RAM usage would increase at roughly the data stream rate.

Good luck in getting this fixed with the attitudes of people I've seen :(

Zoldrax

Memory leak in vlc 0.8.6

Postby Zoldrax » 15 Jul 2006 09:35

In VLC media player 0.8.6-svn Janus (vlc-snapshot-20060714.tar.gz) there is this bug too.

Bugfix, please.

Zoldrax

Memory leaks DVB

Postby Zoldrax » 17 Jul 2006 12:02

May be, differetn signals from different transponders - leaks memory different.
Try to test next configuration on Eulsat W4 (36 grad):
--program=2 dvb: --dvb-voltage=18 --dvb-frequency=12073000 --dvb-srate=27500000 --dvb-lnb-lof1=10750000 --dvb-lnb-lof2=10750000 --dvb-lnb-slof=10700000
Or, please, help to tuning dvb stream another magic metotds.

El_Gusano
Blank Cone
Blank Cone
Posts: 15
Joined: 26 May 2006 17:21

I'm having a similar problem (maybe the same?)

Postby El_Gusano » 17 Jul 2006 20:03

I am streaming the same video file to 3 destinations on my local network (I've tried using UDP and also RTSP VoD). I'm using mpeg-2 files instead of a capture card, so I thought it would be good for the VLC developers to read this. When I send the same file through 3 different streams, I get 100% cpu usage after a several hours. I've tried using a file that is 180MB in size, another that is 50MB, and another, 5 MB. I think the problem appears with the larger files. I had the 5MB file in 3 streams for two and a half days and the processor was OK. I've reproduced the problem on the following:

Pentium 4, 1GB RAM, Windows 2000 SP4

Xeon, 512MB RAM, Windows 2003

Pentium III, 256MB, Ubuntu Linux v6.0 (currently testing, but has peaked often at 97% cpu)

Could this be a memory leak? Someone said they heard similar bug reports about FFMPEG. VLC uses libavcodec from FFMPEG right? could this be the problem? Is there a way to bypass FFMPEG? If it IS bad reception/rain, could a similar bug occur with malformed MPEGs or something similar?

Zoldrax

Re: I'm having a similar problem (maybe the same?)

Postby Zoldrax » 18 Jul 2006 19:18

Could this be a memory leak? Someone said they heard similar bug reports about FFMPEG. VLC uses libavcodec from FFMPEG right? could this be the problem? Is there a way to bypass FFMPEG? If it IS bad reception/rain, could a similar bug occur with malformed MPEGs or something similar?
Is incrementing memory usage by vlc in "top" utility?
In my system memory usage by vlc incrementing 1Mb/sec.

El_Gusano
Blank Cone
Blank Cone
Posts: 15
Joined: 26 May 2006 17:21

"top"

Postby El_Gusano » 19 Jul 2006 00:04

both top and tload show an increase in memory but it is freed once in a while. The strange thing is that top and tload don't agree on cpu usage. Tload shows 97% usage and top shows 20%. I believe top because if cpu was at 97%, the video would have probably looked choppy. In the end, vlc worked well on linux. I'm starting to think that maybe the windows file system causes the cpu usage to climb.

matthew.geier
Blank Cone
Blank Cone
Posts: 15
Joined: 02 Nov 2005 11:51
Location: Sydney Australia
Contact:

Postby matthew.geier » 21 Jul 2006 12:47

It would appear there is some sort of memory leak in the DVB transport demux library. This leak gets worse in the face of errors.
As a result I restart VLC on my 4 card streaming server in the early hours of the morning with a cron job.

However there is also some sort of leak in the kernel DVB driver. After about 4 weeks continues running, I have to reboot the system, even with VLC stopped the system stays sluggish.


Our Linux based dreambox STB's seem to have similar problems, they get sluggish and crash-n-reboot if left running for long periods of time. They are not streaming, and take far longer to fail, but they do. And they fail faster in the presense of stream errors - like when heavy rain causes attenuation of the satelite signals.

I don't think this is a VLC problem as such - it's the DVB or transport stream support library.

D-Evil
New Cone
New Cone
Posts: 3
Joined: 18 Dec 2005 21:56

Postby D-Evil » 31 Jul 2006 12:47

I've played around with tzap (while moving antenna) and when ber and unc are low (zeros for me) I have no memory problems. Try and you'll see, if that works for you.

Note that for using tzap, you must have ~/.tzap/channels.conf, which can be created with scan utility from linux-dvb-apps (scandvb in some distros, like Fedora).


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 15 guests