Package: vlc
Version: 1.1.3-1
Severity: normal
Tags: upstream patch
When vlc is launched with the remote control interface listening on tcp, if a
remote client connects to the interface and later on, it closes the connection,
the accepted socket in vlc is not closed, so it remains in CLOSE_WAIT state.
Launching vlc with these options:
$ vlc -vvv -I rc --lua-config rc={host='localhost:4212'} -S sap -f
and connecting and disconnecting 4 times with netcat:
$ netcat 127.0.0.1 4212
the last four lines in the vlc output are:
[0x9d2a214] [rc] main interface debug: accepted socket 28 (from socket 25)
[0x9d2a214] [rc] main interface debug: accepted socket 29 (from socket 25)
[0x9d2a214] [rc] main interface debug: accepted socket 30 (from socket 25)
[0x9d2a214] [rc] main interface debug: accepted socket 31 (from socket 25)
and performing an lsof -i to the vlc process, we can see the 4 tcp sockets in
CLOSE_WAIT state:
vlc 20900 sgimeno 28u IPv4 2798961 0t0 TCP
palkia:4212-palkia:44033 (CLOSE_WAIT)
vlc 20900 sgimeno 29u IPv4 2799486 0t0 TCP
palkia:4212-palkia:44035 (CLOSE_WAIT)
vlc 20900 sgimeno 30u IPv4 2799724 0t0 TCP
palkia:4212-palkia:35849 (CLOSE_WAIT)
vlc 20900 sgimeno 31u IPv4 2799773 0t0 TCP
palkia:4212-palkia:35850 (CLOSE_WAIT)
I have created a simple patch that solves this issue for me:
*** ./vlc-1.1.3/share/lua/intf/rc.lua 2010-12-23 10:57:40.0 +0100
--- ./vlc-1.1.3/share/lua/intf/rc.lua.bueno 2010-12-23 10:40:15.0
+0100
***
*** 688,691
--- 688,696
client.buffer = quit
done = true
+ elseif client.buffer ==
+ and (client.type == host.client_type.net and input == ) then
+ -- Connection closed by remote end
+ client.buffer = quit
+ done = true
else
client.buffer = client.buffer .. input
Thanks.
Best regards,
Santi
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages vlc depends on:
ii libaa1 1.4p5-38 ascii art library
ii libc6 2.11.2-7 Embedded GNU C Library: Shared lib
ii libfreetype62.4.2-2.1FreeType 2 font engine, shared lib
ii libfribidi0 0.19.2-1 Free Implementation of the Unicode
ii libgcc1 1:4.4.5-8GCC support library
ii libgl1-mesa-glx [libgl1 7.7.1-4 A free implementation of the OpenG
ii libqtcore4 4:4.6.3-4Qt 4 core module
ii libqtgui4 4:4.6.3-4Qt 4 GUI module
ii libsdl-image1.2 1.2.10-2+b2 image loading library for Simple D
ii libsdl1.2debian 1.2.14-6.1 Simple DirectMedia Layer
ii libstdc++6 4.4.5-8 The GNU Standard C++ Library v3
ii libtar 1.2.11-6 C library for manipulating tar arc
ii libvlccore4 1.1.3-1 base library for VLC and its modul
ii libx11-62:1.3.3-4X11 client-side library
ii libx11-xcb1 2:1.3.3-4Xlib/XCB interface library
ii libxcb-keysyms1 0.3.6-1 utility libraries for X C Binding
ii libxcb-randr0 1.6-1X C Binding, randr extension
ii libxcb-shm0 1.6-1X C Binding, shm extension
ii libxcb-xv0 1.6-1X C Binding, xv extension
ii libxcb1 1.6-1X C Binding
ii libxext62:1.1.2-1X11 miscellaneous extension librar
ii ttf-freefont20090104-7 Freefont Serif, Sans and Mono True
ii vlc-nox 1.1.3-1 multimedia player and streamer (wi
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
Versions of packages vlc recommends:
ii vlc-plugin-notify 1.1.3-1LibNotify plugin for VLC
ii vlc-plugin-pulse 1.1.3-1PulseAudio plugin for VLC
Versions of packages vlc suggests:
pn mozilla-plugin-vlcnone (no description available)
pn videolan-doc none (no description available)
Versions of packages vlc-nox depends on:
ii liba52-0.7.40.7.4-14 library for decoding ATSC A/52 str
ii libasound2 1.0.23-2.1 shared library for ALSA applicatio
ii libass4 0.9.9-1 library for SSA/ASS subtitles rend
ii libavahi-client30.6.27-2 Avahi client library
ii libavahi-common30.6.27-2 Avahi common library
ii libavc1394-00.5.3-1+b2 control IEEE 1394 audio/video devi
ii libavcodec524:0.5.2-6ffmpeg codec library
ii libavformat52