Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#198 closed defect (invalid)

memory leak in gmplayer playing mms:// files (alsa bug)

Reported by: alor@… Owned by: reimar
Priority: normal Component: GUI
Version: 1.0pre6 Severity: major
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

running gmplayer on a mss stream for a long time causes memory consumption.

for example:

gmplayer -cache 64 -playlist mms://live.wm9.p1.str3.com/rd105

after 4 hours the RES reported by top was 1.0 Gb. gmplayer was using all my
phisical and swap memory :(
this does not happens if mplayer is used in command line without the gtk interface.

any ideas ?

thank you.

Change History (8)

comment:1 Changed 14 years ago by reimar

Please provide a complete bugreport with a -v log. The -playlist option is not
needed in that case btw.
I'd expect that you use alsa output, it has a huge memory hole.

comment:2 Changed 14 years ago by alor@…

without the -playlist option it will try to connect on port 1755 and it does not
find the stream...

yes, I'm using alsa, but why it does not happens when used without the gui ?

btw this is the output with the -v log:

MPlayer 1.0pre6-3.4.3 (C) 2000-2004 MPlayer Team
CPU: Intel (Family: 6, Stepping: 6)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

Resolving live.wm9.p1.str3.com for AF_INET...
Connecting to server live.wm9.p1.str3.com[217.169.112.13]:80 ...
Cache size set to 64 KBytes
Connected to server: live.wm9.p1.str3.com
vo: X11 running at 1024x768 with depth 16 and 16 bpp (":0.0" => local display)
60 audio & 156 video codecs
CommandLine?: '-v' '-cache' '64' '-playlist' 'mms://live.wm9.p1.str3.com/rd105'
init_freetype
font: can't open file: /root/.mplayer/font/font.desc
Cannot load font: /root/.mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay?
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup
scripts.
Using nanosleep() timing
get_path('input.conf') -> '/home/alor/.mplayer/input.conf'
Parsing input config file /home/alor/.mplayer/input.conf
Input config file /home/alor/.mplayer/input.conf parsed: 51 binds
vo: X11 truecolor visual 0x23, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x24, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x25, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x26, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x27, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x28, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x29, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x2a, depth 16, R:F800 G:7E0 B:1F
get_path('Skin') -> '/home/alor/.mplayer/Skin'
SKIN dir 1: '/home/alor/.mplayer/Skin'
SKIN dir 2: '/usr/share/mplayer/Skin'
vo: X11 truecolor visual 0x23, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x24, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x25, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x26, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x27, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x28, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x29, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x2a, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x23, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x24, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x25, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x26, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x27, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x28, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x29, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x2a, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x23, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x24, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x25, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x26, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x27, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x28, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x29, depth 16, R:F800 G:7E0 B:1F
vo: X11 truecolor visual 0x2a, depth 16, R:F800 G:7E0 B:1F
get_path('subfont.ttf') -> '/home/alor/.mplayer/subfont.ttf'
Unicode font: 1185 glyphs.
get_path('rd105?MSWMExt=.asf.conf') -> '/home/alor/.mplayer/rd105?MSWMExt=.asf.conf'
get_path('subfont.ttf') -> '/home/alor/.mplayer/subfont.ttf'
Unicode font: 1185 glyphs.
Playing http://live.wm9.p1.str3.com/rd105?MSWMExt=.asf.
Filename for url is now http://live.wm9.p1.str3.com/rd105?MSWMExt=.asf
Filename for url is now http://live.wm9.p1.str3.com/rd105?MSWMExt=.asf
Resolving live.wm9.p1.str3.com for AF_INET...
Connecting to server live.wm9.p1.str3.com[217.169.112.13]:80 ...
--- HTTP DEBUG HEADER --- START ---
protocol: [HTTP/1.0]
http minor version: [0]
uri: [(null)]
method: [(null)]
status code: [200]
reason phrase: [OK]
body size: [116]
Fields:

0 - Content-Type: video/x-ms-asf
1 - Cache-Control: max-age=0, no-cache
2 - Server: Cougar/9.00.00.3376
3 - Content-Length: 116
4 - Date: Wed, 12 Jan 2005 08:30:19 GMT
5 - Pragma: no-cache, xResetStrm=1
6 - Supported: com.microsoft.wm.srvppair, com.microsoft.wm.sswitch,

com.microsoft.wm.predstrm, com.microsoft.wm.fastcache
--- HTTP DEBUG HEADER --- END ---
Content-Type: [video/x-ms-asf]
Content-Length: [116]
Trying ASF/HTTP...
Resolving live.wm9.p1.str3.com for AF_INET...
Connecting to server live.wm9.p1.str3.com[217.169.112.13]:80 ...
=====> ASF Live stream
=====> ASF header chunk follows
Stream bitrate properties object
Max bandwidth set to 0
Resolving live.wm9.p1.str3.com for AF_INET...
Connecting to server live.wm9.p1.str3.com[217.169.112.13]:80 ...
=====> ASF Live stream
Cache size set to 64 KBytes
Connected to server: live.wm9.p1.str3.com
CACHE_PRE_INIT: 0 [0] 0 pre:0 eof:0
Cache fill: 0.00% (0 bytes) =====> ASF header chunk follows
Cache fill: 12.50% (8192 bytes) ASF file format detected.

Title: Radio 105
Author: fabbricadigitale
Copyright: streaming-media.it

============ ASF Stream group == START ===

object size = 32
stream count=[0x1][1]

stream id=[0x1][1]
max bitrate=[0x7f5d][32605]

============ ASF Stream group == END ===
ASF: packets: -1 flags: 9 max_packet_size: 1516 min_packet_size: 1516
max_bitrate: 32605 preroll: 3064
stream type: guid_audio_stream
stream concealment: guid_audio_conceal_interleave
type: 28 bytes, stream: 8 bytes ID: 1
unk1: 0 unk2: 6CCE6200
FILEPOS=0xA82
==> Found audio stream: 1
======= WAVE Format =======
Format Tag: 353 (0x161)
Channels: 2
Samplerate: 44100
avg byte/sec: 3998
Block align: 1485
bits/sample: 16
cbSize: 10
Unknown extra header dump: [0] [88] [0] [0] [1f] [0] [35] [17] [0] [0]
===========================
ASF: audio scrambling: 1 x 1 x 1485
Found movie at 0xAD8 - 0xAD8
ASF: 1 audio and 0 video streams found
ASF: Searching for audio stream (id:-1).
Auto-selected ASF audio ID = 1
Clip info:

name: Radio 105
author: fabbricadigitale
copyright: streaming-media.it

==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 131072 + 65536 = 196608 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec init OK!
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 3998->176400 (32.0 kbit)
Selected audio codec: [ffwmav2] afm:ffmpeg (DivX audio v2 (ffmpeg))
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 and bps = 2
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
[pl_eq] Equalizer in use.
alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian)
alsa-init: compiled for ALSA-1.0.8rc1
alsa-init: setup for 1/2 channel(s)
alsa-init: got device=0, subdevice=0
alsa-init: 1 soundcard found, using: default
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
alsa-space: free space = 65536, prepared --
AO: [plugin] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
AO: Description: Plugin audio output
AO: Author: Anders
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 and bps = 2
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 and bps = 2
Video: no video
Freeing 0 unused video chunks.
Starting playback...
alsa-space: free space = 65536, prepared --
alsa-space: free space = 65536, prepared --

Uninit audio filters...5%

[libaf] Removing filter dummy
uninit audio: ffmpeg
alsa-uninit: pcm closed
[GUI] done.
get_path('gui.conf') -> '/home/alor/.mplayer/gui.conf'
get_path('gui.pl') -> '/home/alor/.mplayer/gui.pl'
get_path('gui.url') -> '/home/alor/.mplayer/gui.url'
get_path('gui.history') -> '/home/alor/.mplayer/gui.history'

Exiting... (Quit)

comment:3 Changed 14 years ago by reimar

(In reply to comment #2)

without the -playlist option it will try to connect on port 1755 and it does not
find the stream...

It works for me... Anyway if port 1755 is blocked for you, try the http:// URL
instead of mms://

yes, I'm using alsa, but why it does not happens when used without the gui ?

Because the biggest memleak is in the mixer code, and the Gui regularly checks
the mixer to display the volume bar.

comment:4 Changed 14 years ago by alor@…

(In reply to comment #3)

yes, I'm using alsa, but why it does not happens when used without the gui ?

Because the biggest memleak is in the mixer code, and the Gui regularly checks
the mixer to display the volume bar.

I've tryed with "-ao esd" and the memleak is gone. so the problem is strictly
related to oss/alsa.

thanks, bye

comment:5 Changed 14 years ago by reimar

(In reply to comment #4)

I've tryed with "-ao esd" and the memleak is gone. so the problem is strictly
related to oss/alsa.

Do you get a memleak with OSS, too?? It shouldn't happen with OSS.

comment:6 Changed 14 years ago by alor@…

(In reply to comment #5)

(In reply to comment #4)

I've tryed with "-ao esd" and the memleak is gone. so the problem is strictly
related to oss/alsa.

Do you get a memleak with OSS, too?? It shouldn't happen with OSS.

no. specifying -ao oss it does not happens. sorry for the entropy added...

bye

comment:7 Changed 14 years ago by reimar

  • Resolution set to invalid
  • Status changed from new to closed

This was a leak in alsa-lib, a fix is here:
http://sourceforge.net/mailarchive/message.php?msg_id=10552053

comment:8 Changed 14 years ago by reimar

  • Summary changed from memory leak in gmplayer playing mms:// files to memory leak in gmplayer playing mms:// files (alsa bug)

Changed summary to make it easier for others to find

Note: See TracTickets for help on using tickets.