telnet interface can cause vlc to take 100% cpu
When a client connects to vlc telnet interface and the socket closes unexpectedly, vlc will go 100% cpu ... to reproduce ...
-
launch a vlc instance with : vlc --intf telnet --telnet-port 2000 --telnet-password apasswd --telnet-host 127.0.0.1
-
use a telnet client to connect to 127.0.0.1:2000
3a) hardkill the telnet client (kill -9 or windows task manager->End process tree)
3b) fill in passwd and hardkill the telnet client
- cpu will be used up
this simple test has been tested on windows xp, seen on linux gentoo 2006.1 but currently does not a linuxbox handy to confirm again with this simplest test
vlc version : 0.8.6 and has noticed this behavior on 0.8.5
test2 :
using TClientSocket of VCL C++Builder 6.0 update 4 (pseudocode)
-
ClientSocket configured properly (addr = 127.0.0.1, port = 2000)
-
ClientSocket->Open();
-
ClientSocket->OnRead : Socket->SendText("anything");ClientSocket->Close()
-
vlc will take 100%cpu if ">" string returned by vlc is not read by the client ..., OK if client wait until received the ">" before closing
ps: this can lead to DoS ...