Ubuntu Karmic 9.10 Memory Leak & Loud Static

*nix specific usage questions
Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby Rémi Denis-Courmont » 17 Feb 2010 17:51

5 out of 5 with an unspecified input file
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

andymillar
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2010 14:55
VLC version: 1.0.2
Operating System: Ubuntu 9.10 x86_64
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby andymillar » 24 Feb 2010 14:58

+1 for the memory leak, whilst streaming media from di.fm.

Valgrind does, unfortunately, make VLC run like a dog, but here's the useful end of the log:
--00:00:42:46.352 4074-- memcheck GC: 65536 nodes, 59624 survivors ( 90.9%)
--00:00:42:46.352 4074-- memcheck GC: increase table size to 131072
--00:00:43:04.114 4074-- memcheck GC: 131072 nodes, 114783 survivors ( 87.5%)
--00:00:43:04.114 4074-- memcheck GC: increase table size to 262144
--00:00:43:40.866 4074-- memcheck GC: 262144 nodes, 228124 survivors ( 87.0%)
--00:00:43:40.866 4074-- memcheck GC: increase table size to 524288
Nothing more came out and the only way to stop VLC from running away and killing my machine was to kill -9 the process.

I'll keep running vlc under valgrind and see if I can get anything more useful out of it.

Andy

andymillar
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2010 14:55
VLC version: 1.0.2
Operating System: Ubuntu 9.10 x86_64
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby andymillar » 24 Feb 2010 15:53

Killing with -SIGXCPU appears to have given something more useful.

Full debug log from valgrind at https://www.andymillar.co.uk/temp/vlc.v ... 949.log.gz

I hope this helps.

Andy

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby Rémi Denis-Courmont » 24 Feb 2010 17:36

Killing VLC does not yield much useful data. Of course VLC leaks if you kill it, just like any software which is interrupted before it got time to clean up.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

andymillar
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2010 14:55
VLC version: 1.0.2
Operating System: Ubuntu 9.10 x86_64
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby andymillar » 24 Feb 2010 17:52

Rémi,

I'm only killing VLC at the point where it is leaking memory at such a rate that it'll eat the 6GB in this machine in a matter of seconds.

Leaving VLC running without killing it brings this machine to a standstill leaving no option but to reboot.

Can you think of a different way to get any useful data out of VLC crashing?

Andy

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby Rémi Denis-Courmont » 24 Feb 2010 18:09

I don't know.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

andymillar
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2010 14:55
VLC version: 1.0.2
Operating System: Ubuntu 9.10 x86_64
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby andymillar » 24 Feb 2010 18:26

Ok,

I'll run it under gdb and see if I can any useful information out of it before this laptop dies :-)

Andy

andymillar
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2010 14:55
VLC version: 1.0.2
Operating System: Ubuntu 9.10 x86_64
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby andymillar » 17 Mar 2010 14:46

Ok, I'm yet to get any more useful debugging data.

As a quick fix, to prevent VLC from taking your machine away with it, I've got a little bash script that'll limit the ram usage of VLC to 1GB.

Code: Select all

#!/bin/bash source /etc/profile ulimit -v 1048576 vlc
Original Post: Limiting VLC Memory Usage

cas07
New Cone
New Cone
Posts: 1
Joined: 13 Apr 2010 21:00

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby cas07 » 13 Apr 2010 21:05

As a quick fix, to prevent VLC from taking your machine away with it,
Thanks!

If its any help i can reproduce this quite often by having VLC 1.0.5 playing an audio stream and then in Sound Preference->Hardware switching between the device profiles a few times.

yonsje
New Cone
New Cone
Posts: 1
Joined: 14 Apr 2010 03:58

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby yonsje » 14 Apr 2010 04:07

Hi,
I've been having the same problem, VLC sometimes starts to use up all my RAM, I don't have the problem with the static though.
I don't know if this is usefull but I ran VLC using the script Andy posted (only modified to half a gig because when VLC starts to use all my available RAM this is only just over 900MB) after watching a video, I closed the VLC window and noticed this in terminal window:

Code: Select all

number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one [a whole lot more of this] number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one m_el[mi_level] == NULL arrrrrrrrrrrrrg Up cannot escape itself [0x9a91fc8] pulse audio output: No. of Audio Channels: 2 QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::begin: Paint device returned engine == 0, type: 1
I'm watching another video now, but so far it terminal only shows:

Code: Select all

VLC media player 1.0.2 Goldeneye [0x8b7b140] main libvlc: Start vlc met standaardinterface. Gebruik 'cvlc' om vlc zonder interface te gebruiken. m_el[mi_level] == NULL arrrrrrrrrrrrrg Up cannot escape itself [0x9295318] pulse audio output: No. of Audio Channels: 2 QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::begin: Paint device returned engine == 0, type: 1
I hope this is usefull.

-Yon

EDIT: While watching another video, the sound suddenly cut out, this always happened when VLC started leaking. Terminal show:

Code: Select all

m_el[mi_level] == NULL arrrrrrrrrrrrrg Up cannot escape itself [0x9295318] pulse audio output: No. of Audio Channels: 2 QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::begin: Paint device returned engine == 0, type: 1 m_el[mi_level] == NULL arrrrrrrrrrrrrg Up cannot escape itself [0x9295318] pulse audio output: No. of Audio Channels: 2 QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::begin: Paint device returned engine == 0, type: 1 number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one [again, a whole lot more of this] number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one number of reference frames exceeds max (probably corrupt input), discarding one

chippy
New Cone
New Cone
Posts: 1
Joined: 16 Apr 2010 22:17

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby chippy » 16 Apr 2010 22:23

I am also getting this problem, however I am not getting the loud static. Please devs, please please investigate this! It's crashing my entire machine, there's nothing I can do!

Whilst I know that this may not help fix the solution, please be aware that me, a devoted vlc user, have created an account on this forum, just for this very message ... think of the thousands more who would not have bothered.

andymillar
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2010 14:55
VLC version: 1.0.2
Operating System: Ubuntu 9.10 x86_64
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby andymillar » 17 Apr 2010 09:48

It's crashing my entire machine, there's nothing I can do!
Chippy,

Use the script about 3 posts above this one. It will limit the RAM usage of vlc and prevent it from crashing your machine.

If you have less than 1GB RAM, try limiting VLC to 512mb or so.

That way VLC will crash but your machine will not.

Andy

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby Rémi Denis-Courmont » 17 Apr 2010 12:29

Please devs, please please investigate this! It's crashing my entire machine, there's nothing I can do!
Please provide a reliable way to reproduce the problem. There's no way we can fix an unspecified problem (on an old version, need I add).
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

jdebruijn
New Cone
New Cone
Posts: 1
Joined: 11 Jun 2010 14:34

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby jdebruijn » 11 Jun 2010 14:39

I'm having the same problem on the latest version of Ubuntu (10.04) and VLC (1.0.6).
Once in a while, while playing a divx file, the vlc process (not pulseaudio) just runs off and fills all internal memory, as well as the swap space. The behavior seems random, since when playing the same file later, the problem does not occur.

nickless
New Cone
New Cone
Posts: 1
Joined: 12 Jul 2010 15:26

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby nickless » 18 Jul 2010 01:03

Got memleak here too with Ubuntu (10.04) and VLC (1.0.6).
It happens due normal .avi playback. Using pulseaudio suddenly sound stops and memory got filled up within secounds.

Code: Select all

[0x9c649d0] main input debug: Stream buffering done (325 ms in 25 ms) [0x9b91f98] pulse audio output: No. of Audio Channels: 6 [0x9bee598] main decoder debug: End of video preroll [0x9bee598] main decoder debug: Received first picture [0x9b91f98] pulse audio output debug: Pulse mainloop started [0x9b91f98] pulse audio output debug: Pulse stream connected [0x9b91f98] pulse audio output debug: Pulse initialized successfully [0x9b91f98] pulse audio output debug: Buffer metrics: maxlength=460800, tlength=168192, prebuf=115200, minreq=23040 [0x9b91f98] pulse audio output debug: Using sample spec 'float32le 6ch 48000Hz', channel map 'front-left,front-right,rear-left,rear-right,front-center,lfe'. [0x9b91f98] pulse audio output debug: Connected to device alsa_output.pci-0000_00_11.5.analog-stereo (0, not suspended). [0x9b91f98] main audio output debug: using audio output module "pulse" [0x9b91f98] main audio output debug: TIMER module_need() : 155,825 ms - Total 155,825 ms / 1 intvls (Avg 155,825 ms) [0x9b91f98] main audio output debug: output 'fl32' 48000 Hz 3F2R/LFE frame=1 samples/24 bytes [0x9b91f98] main audio output debug: mixer 'fl32' 48000 Hz 3F2R/LFE frame=1 samples/24 bytes [0x9b91f98] main audio output debug: no need for any filter [0x9b91f98] main audio output debug: looking for audio mixer module: 3 candidates [0x9b91f98] main audio output debug: using audio mixer module "float32_mixer" [0x9b91f98] main audio output debug: TIMER module_need() : 13,140 ms - Total 13,140 ms / 1 intvls (Avg 13,140 ms) [0x9b91f98] main audio output debug: input 'a52 ' 48000 Hz 3F2R/LFE frame=1536 samples/1792 bytes [0x9c7f288] main audio filter debug: looking for audio filter module: 1 candidate [0x9c7f288] scaletempo audio filter warning: bad input or output format [0x9c7f288] main audio filter warning: no audio filter module matching "scaletempo" could be loaded [0x9c7f288] main audio filter debug: TIMER module_need() : 12,958 ms - Total 12,958 ms / 1 intvls (Avg 12,958 ms) [0x9c7f288] main audio filter debug: looking for audio filter module: 1 candidate [0x9c7f288] scaletempo audio filter debug: format: 48000 rate, 6 nch, 4 bps, fl32 [0x9c7f288] scaletempo audio filter debug: params: 30 stride, 0,200 overlap, 14 search [0x9c7f288] scaletempo audio filter debug: 1,000 scale, 1440,000 stride_in, 1440 stride_out, 1152 standing, 288 overlap, 672 search, 2400 queue, fl32 mode [0x9c7f288] main audio filter debug: using audio filter module "scaletempo" [0x9c7f288] main audio filter debug: TIMER module_need() : 10,734 ms - Total 10,734 ms / 1 intvls (Avg 10,734 ms) [0x9b91f98] main audio output debug: filter(s) 'a52 '->'fl32' 48000 Hz->48000 Hz 3F2R/LFE->3F2R/LFE [0x9b4a6b0] main audio output debug: looking for audio filter module: 24 candidates [0x9b4a6b0] main audio output debug: using audio filter module "a52tofloat32" [0x9b4a6b0] main audio output debug: TIMER module_need() : 5,862 ms - Total 5,862 ms / 1 intvls (Avg 5,862 ms) [0x9b91f98] main audio output debug: found a filter for the whole conversion [0x9b91f98] main audio output debug: filter(s) 'fl32'->'fl32' 52800 Hz->48000 Hz 3F2R/LFE->3F2R/LFE [0x9d35ef0] main audio output debug: looking for audio filter module: 24 candidates [0x9d35ef0] main audio output debug: using audio filter module "bandlimited_resampler" [0x9d35ef0] main audio output debug: TIMER module_need() : 15,638 ms - Total 15,638 ms / 1 intvls (Avg 15,638 ms) [0x9b91f98] main audio output debug: found a filter for the whole conversion [0x9bedd78] main decoder debug: End of audio preroll [0x9c649d0] main input debug: Decoder buffering done in 204 ms [0x9b91f98] main audio output warning: PTS is out of range (-4236), dropping buffer [0x9b91f98] main audio output warning: PTS is out of range (-28912), dropping buffer [0x9b91f98] pulse audio output debug: Pulse stream started [0x9b91f98] main audio output warning: output date isn't PTS date, requesting resampling (126170) [0x9b91f98] main audio output warning: audio drift is too big (126170), dropping buffer [0x9b91f98] main audio output warning: buffer is 94170 late, triggering upsampling [0x9b91f98] main audio output warning: output date isn't PTS date, requesting resampling (46169) [0x9b91f98] main audio output warning: audio drift is too big (150151), dropping buffer [0x9b91f98] main audio output warning: output date isn't PTS date, requesting resampling (40186) [0x9b91f98] main audio output warning: audio drift is too big (166295), dropping buffer [0x9b91f98] main audio output warning: output date isn't PTS date, requesting resampling (48156) [0x9b91f98] main audio output warning: audio drift is too big (158431), dropping buffer [0x9b91f98] main audio output warning: audio drift is too big (126431), dropping buffer [0x9b91f98] main audio output warning: output date isn't PTS date, requesting resampling (46580) [0x9b91f98] main audio output warning: audio drift is too big (156990), dropping buffer [0x9b91f98] main audio output warning: audio drift is too big (132927), dropping buffer [0x9b91f98] main audio output warning: output date isn't PTS date, requesting resampling (44554) [0x9b91f98] main audio output warning: audio drift is too big (133398), dropping buffer [0x9b91f98] main audio output debug: audio output is starving (21933), playing silence [0x9b91f98] main audio output debug: audio output is starving (23976), playing silence [0x9b91f98] main audio output debug: audio output is starving (21354), playing silence [0x9b91f98] main audio output debug: audio output is starving (20093), playing silence [0x9b91f98] main audio output debug: audio output is starving (21129), playing silence [0x9b91f98] main audio output debug: audio output is starving (21529), playing silence [0x9b91f98] main audio output debug: audio output is starving (20551), playing silence [0x9b91f98] main audio output debug: audio output is starving (20002), playing silence [0x9bc9508] xvideo video output debug: leaving fullscreen mode QPainter::begin: Paint device returned engine == 0, type: 1 [0x9bc9508] main video output warning: late picture skipped (66232 > -18) [0x9bc9508] main video output warning: late picture skipped (146232 > -18) [0x9bc9508] main video output warning: late picture skipped (26232 > -18) [0x9bc9508] main video output warning: late picture skipped (106232 > -18) [0x9bc9508] xvideo video output debug: entering fullscreen mode [0x9bc9508] xvideo video output debug: X 1278/1 Y 828/190 QPainter::begin: Paint device returned engine == 0, type: 1 [0x9bc9508] xvideo video output debug: using XFree Xinerama extension [0x9bc9508] xvideo video output debug: requested screen number invalid (-1/1) [0x9bc9508] xvideo video output debug: setting best screen to 0 [0x9bc9508] main video output warning: late picture skipped (451748 > -28) ... [0x9bc9508] main video output warning: late picture skipped (171748 > -28) [????????] x11 video output error: X11 request 42.0 failed with error code 8: BadMatch (invalid parameter attributes) [0x9bc9508] main video output warning: late picture skipped (166553 > -28) [0x9bc9508] main video output warning: late picture skipped (154908 > -23) [0x9bc9508] main video output warning: late picture skipped (138517 > -23) [0x9bc9508] main video output warning: late picture skipped (128199 > -20) [0x9bc9508] main video output warning: late picture skipped (112605 > -17) header damaged header damaged QPainter::begin: Paint device returned engine == 0, type: 1 header damaged header damaged [0x9c649d0] main input debug: control type=1 [0x9c649d0] main input debug: control type=1 [0x9b91f98] main audio output warning: computed PTS is out of range (1806989), clearing out [0x9b91f98] main audio output warning: timing screwed, stopping resampling [0x9b91f98] main audio output warning: output PTS is out of range (1815053), clearing out [0x9bee598] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?) [0x9b91f98] main audio output debug: audio output is starving (172448), playing silence header damaged [0x9bee598] avcodec decoder warning: cannot decode one frame (3378 bytes) [0x9b91f98] main audio output debug: audio output is starving (20005), playing silence [0x9b91f98] main audio output debug: audio output is starving (20002), playing silence [0x9bc9508] main video output warning: late picture skipped (2401 > -16) [0x9b91f98] main audio output debug: audio output is starving (20002), playing silence [0x9b91f98] main audio output debug: audio output is starving (20002), playing silence [0x9bc9508] main video output warning: late picture skipped (78940 > -16) [0x9bc9508] main video output warning: late picture skipped (38940 > -16) [0x9b91f98] main audio output warning: output date isn't PTS date, requesting resampling (359308) [0x9b91f98] main audio output warning: audio drift is too big (343475), dropping buffer ... [0x9b91f98] main audio output warning: audio drift is too big (123475), dropping buffer [0x9b91f98] main audio output warning: buffer is 103475 late, triggering upsampling [0x9b91f98] main audio output warning: output date isn't PTS date, requesting resampling (11300128) [0x9b91f98] main audio output warning: audio drift is too big (11395436), dropping buffer [0x9b91f98] main audio output warning: audio drift is too big (11355436), dropping buffer ... [0x9b91f98] main audio output warning: audio drift is too big (7555436), dropping buffer [0x9bc9508] xvideo video output debug: leaving fullscreen mode [0x9b91f98] main audio output warning: audio drift is too big (7515436), dropping buffer [0x9b91f98] main audio output warning: audio drift is too big (7475436), dropping buffer [0x9b91f98] main audio output warning: audio drift is too big (7455436), dropping buffer QPainter::begin: Paint device returned engine == 0, type: 1 [0x9b91f98] main audio output warning: audio drift is too big (7435436), dropping buffer ... [0x9b91f98] main audio output warning: audio drift is too big (7123436), dropping buffer [0x9bc9508] main video output warning: late picture skipped (218719 > -16) [0x9bc9508] main video output warning: late picture skipped (178719 > -16) [0x9bc9508] main video output warning: late picture skipped (18719 > -16) [0x9bc9508] main video output warning: late picture skipped (98719 > -16) [0x9bc9508] main video output warning: late picture skipped (58719 > -16) [0x9bc9508] main video output warning: late picture skipped (258719 > -16) [0x9bc9508] main video output warning: late picture skipped (338719 > -16) [0x9bc9508] main video output warning: late picture skipped (298719 > -16) [0x9bc9508] main video output warning: late picture skipped (138719 > -16) [0x9b91f98] main audio output warning: audio drift is too big (7115436), dropping buffer [0x9bc9508] main video output warning: late picture skipped (30846 > -16) [0x9b91f98] main audio output warning: audio drift is too big (7055436), dropping buffer [0x9b91f98] main audio output warning: audio drift is too big (7035436), dropping buffer [0x9b91f98] main audio output warning: audio drift is too big (6995436), dropping buffer [0x9bc9508] main video output warning: late picture skipped (56086 > -15) [0x9b91f98] main audio output warning: audio drift is too big (6963436), dropping buffer [0x9bc9508] main video output warning: late picture skipped (59371 > -14) [0x9b91f98] main audio output warning: audio drift is too big (6955436), dropping buffer [0x9bc9508] main video output warning: late picture skipped (53854 > -14) [0x9b91f98] main audio output warning: audio drift is too big (6915436), dropping buffer [0x9bc9508] main video output warning: late picture skipped (61018 > -13) [0x9b91f98] main audio output warning: audio drift is too big (6875436), dropping buffer ... [0x9b91f98] main audio output warning: audio drift is too big (5115436), dropping buffer [0x9b91f98] main audio output warning: audio drift is too big (5075436), dropping buffer header damaged [0x9c649d0] main input debug: control type=1 Not enough memory nickless@nickless:~$
Using that memory limit script works for now.
Thanks to andymillar!

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby Rémi Denis-Courmont » 27 Nov 2010 18:31

This turned out to be a bug in the PulseAudio output. The VLC team recommends not using PulseAudio anyway.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby Rémi Denis-Courmont » 31 Mar 2011 22:41

I found (and fixed) one PulseAudio output plugin leak, when the PulseAudio stream dies unexpectedly (such as if PulseAudio itself dies).

But I am afraid this is a different issue. Unfortunately, I have no clue how to reproduce your problem, so I am currently unable to investigate it :-( Any clue would be most welcome.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

gmturner
New Cone
New Cone
Posts: 2
Joined: 15 Apr 2011 12:04

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby gmturner » 15 Apr 2011 13:24

Don't use the buggy Gtk style for Qt4.
I don't.
Do not use the Gtk styles for Qt4.
OK I'm not using them.
If its any help i can reproduce this quite often by having VLC 1.0.5 playing an audio stream and then in Sound Preference->Hardware switching between the device profiles a few times.
Agreed. In my experience this is perhaps a 60% reliable way to reproduce the problem. I switch between my hardware output sink and a bluez A2DP sink, which I do every !#!#%#%!# night and more often than not this sends my box into never-never land. In short, frobbing around aggressively with the switcher, pulseaudio process, and my physical headphones is a 100% reliable way to trigger the bug. Actually simply running pavucontrol is often enough to trigger the bug if I have a movie paused in the background and some music playing in amarok.
This [will] turn out to be a bug in the PulseAudio output.
I don't doubt it.
The VLC team recommends not using PulseAudio anyway.
Well under the circumstances I suppose that's good advice, but basically either you run pulseaudio or you don't. Nobody is going to stop using pulse just so they can use vlc -- at least, I sure ain't. Pulse is a pain in the neck and makes me want to scream but sadly, this is a slight improvement over dmix, which was a pain in my arse and made me want to cry. PA does what I need with mplayer and everything else I run, and changing to some other audio multiplexing framework is a pretty big project. So vlc is simply getting gently moved to the side, for now, in my pantheon of media players, until this gets sorted out.

Put another way, I have better things to do than spend a few hours waiting for the OOM killer to restore my workstation to me. I'm just trying to enjoy some light entertainment while I work. I am totally at peace with the idea that sometimes when I run bleeding edge software I am going to have to pay the price by waiting for an fsck or losing stuff in lost+found. I don't blame anybody for this circumstance. But I'm an end-user in this instance, and not afraid to think like one: I want a video player that doesn't crash my box. And conveniently, I have one. But it isn't VLC.

Rémi, I'm sorry for giving you a hard time, I know you're a huge stud and totally respect you, but sometimes you gotta give your users the benefit of the doubt. This is a real bug, it's been in the codebase (of some project which may or may not be vlc) for several months, the problem is getting worse in terms of frequency of occurrence, and solving it is clearly going to take some collaboration between developers and users. It's pretty frustrating to Google this and read this thread, which leaves one with the impression that solving the problem is of very little interest to the vlc developers.
I found (and fixed) one PulseAudio output plugin leak, when the PulseAudio stream dies unexpectedly (such as if PulseAudio itself dies). But I am afraid this is a different issue. Unfortunately, I have no clue how to reproduce your problem, so I am currently unable to investigate it :-( Any clue would be most welcome.
Thank you for your hard work on VLC and this problem. I appreciate your efforts, and I assume I speak for the other users in this thread when I say that. I'm sure you can appreciate the inconvenience which this problem is causing us end-users.

"Memory leak" is not a good description of the problem. This is a run-away train, like a fork-bomb, not a gentle "leak" type of problem. I have debug symbols on my entire system except for a few binary bits like flash, but that really does me no good whatsoever. From the moment I realize I have triggered this problem I have about two seconds of syrupy responsiveness before my computer becomes completely incommunicado. It will not return to me until several hours later when the OOM killer finally (hopefully) decides to kill vlc. If I'm lucky I have just enough room to press Ctrl-Alt-F1 and Ctrl-Alt-Delete and get a clean reboot about a half-hour later. The rest of the time I usually pull the plug which triggers a lengthy (120 min?) period of fscks and other cleanup tasks. So, for me, debugging this by the usual route of:

(a) finding a reliable way to trigger the problem and
(b) triggering it over and over

seems pretty hopeless.

Then again I never thought of using ulimit to mitigate this; that could make a huge difference so the next time I'm feeling adventurous, I'll give it a try.

-gmt

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby Rémi Denis-Courmont » 15 Apr 2011 14:37

Regarding loosing control of your computer for hours, the simple fix is to reduce the size of (or even completely remove) the swap space.

The problem might be already fixed in VLC 1.2. I know this remains a problem whether or not the issue is gone in VLC 1.2. But if I have done all reasonably could think of, at this point - not to mention that this is an uncompensated free time activity to me. I wish VLC for Linux was maintained by professionals, but it is not and I do not have the power to fix that.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

gmturner
New Cone
New Cone
Posts: 2
Joined: 15 Apr 2011 12:04

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby gmturner » 16 Apr 2011 17:42

Found an interesting discussion about this here, which ultimately leads to this pulseaudio patch (horrifically, implemented as a patch vs. devnull to create a patch... good God, can Debian have been so horrifically mis-engineered as to require such abominations as SOP!? The mind boggles...).

Anyhow, I haven't looked at any code yet but if my distro doesn't apply an equivalent patch, I'll merge it and give it a try. If things improve (or I get some other semi-conclusive result) I'll report back.

Wish me luck,

-gmt

EDIT: A non-horrific version of the patch is here
EDIT2: I'm afraid this patch is already applied to my pulseaudio :(

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Ubuntu Karmic 9.10 Memory Leak & Loud Static

Postby Rémi Denis-Courmont » 18 Apr 2011 18:05

A PulseAudio daemon patch is unlikely to fix a memory leak in the VLC process anyhow.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


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

Who is online

Users browsing this forum: No registered users and 18 guests