New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File descriptors leak (not released properly) #172
Comments
I see it too with debian version: 1.0~RC1+git4-1
|
I used the following to eat up sockets:
juser@cnt6: juser@cnt6:~/temp$ telnet localhost 9999 nothing. ps I was getting bit by this when a client was trying to feed a non existent loop for the stream blanker. |
From what I've seen this is unix domain sockets used internally by gstreamer. So pipelines not getting cleaned up completely? |
Summary:
It seems that not all sockets are released/closed properly when an input source connects and then disconnect. The open socket count for the process "voctocore" increases by 2 after every connect/disconnect cycle.
Problem description:
What I am experiencing is that when an input Source connect and then disconnects repeatedly, over time the number of open file descriptors/sockets for the Voctocore process increases. It seems the old socket allocated by a Source is not properly released when the Source disconnects.
Normally this is not a big problem, but after many disconnects and reconnects of my Sources the process runs out of its maximum allowed open sockets as determined by the operating system. Voctocore then stops to work and although the process doesn't die it is as good as dead. A restart of the process gets it going again.
My setup:
Ubuntu 16.04 desktop, with kernel 4.4.0-96-generic.
Voctocore: latest git cloned on 6 November 2017.
I connect and disconnect a Source to Voctocore on port 10000. (The Source is an ffmpeg instance streaming a local media file to "-f matroska tcp://localhost:10000".)
I check the number of open file descriptors using: 'ls /proc/3351/fd | wc -l' where 3351 is the process ID of Voctocore.
The number of open file descriptors increase after every connect and disconnect (it increases by 2).
When the Source connects, the number of file descriptors increases by 5. When it disconnects it decreases by 3. The result is a "leak" of 2 file descriptors for every connect/disconnect cycle.
Using 'ls -lrth /proc/3351/fd' it seems the two leaked file descriptors are sockets, since the output for these two are:
lrwx------ 1 ubuntu ubuntu 64 Sep 28 09:59 72 -> socket:[16637009]
lrwx------ 1 ubuntu ubuntu 64 Sep 28 09:59 71 -> socket:[16637008]
Using 'lsof -a -p 3351' and grepping for 16637009 and 16637008 I see both are of type "STREAM.
Am I doing something wrong which cause this leak? Is this a known issue? Any suggestions?
The text was updated successfully, but these errors were encountered: