File descriptors leak

18 posts / 0 new
Last post
marekvi
File descriptors leak

Hello Michael,

I have been using Virtual Here server on Raspberry Pi 3B (server version 4.2.0) with three clients - Windows 10, Ubuntu 20.04 and Mac OS 11 (client version 5.2.0) for some time and I have noticed that after some time - two weeks usually, the Virtual Here server process runs out available file descriptors (Linux limits 1024 for the process) and I receive the following message: Error 24 opening device (/dev/bus/usb/001/043) file descriptor, No file descriptors available

I think that there must be some sort of file descriptor leak. Could you please help me find the problem? I have pasted the list of all VH file descriptors to file here (output of lsof command): https://drive.google.com/file/d/1rRYuA7nRie1IXT5J9FlMUveBKeqziIHC/view?u...

Thanks,
Marek

Michael
.

Hi, thanks for the detailed, log. Could you update the server to the latest server version, i think that fixes the leak. The leak was related to avahi integration.

gexogen
Hi! I've got the similar

Hi! I've got the similar problem vhusbdx86_64 v4.3.7 on Intel NUC with Ubuntu server 20.04
Mar 05 06:46:08 virtualhere-nuc vhusbdx86_64[3341]: Error 24 starting client authorization, No file descriptors available
Mar 05 06:46:08 virtualhere-nuc vhusbdx86_64[3341]: Error binding device 111 [0a89:0025] to connection 227, BIND_ERROR
Mar 05 06:46:12 virtualhere-nuc vhusbdx86_64[3341]: Error 24 starting client authorization, No file descriptors available
Mar 05 06:46:12 virtualhere-nuc vhusbdx86_64[3341]: Error binding device 1132 [0a89:0025] to connection 227, BIND_ERROR

Michael
.

Can you post the output of lsof on the server when it happens again? Maybe in pastebin

gexogen
.

Michael, here's lsof output: https://www.dropbox.com/s/vgm7ruuhr72hez6/lsof.txt?dl=0. It's too big for pastebin, so I uploaded it to dropbox.

Michael
.

Thanks, can you stop the virtualhere server then edit the server config.ini file and add the line

UseAVAHIServiceFile=1

Then save and start the process again. See if that resolves it

gexogen
.

Thank you. I'll try it and return with feedback.

gexogen
.

Michael, it looks like this doesn't helps. It's been 36 hours since I've restarted virtualhere server and the number of its open file descriptors are already reached 50k and continues to grow.

Michael
.

Can you post here your server config.ini file

gexogen
.
Michael
.

What does auth.sh do? I wonder if that could that be leaking instead (it would be a child of the vhusbdx86_64 process). VirtualHere only uses one netlink socket and that doesnt leak so im wondering if it might be some program you are calling in auth.sh.

gexogen
.

auth.sh was copy-pasted from https://www.virtualhere.com/authorization Example 1.

Michael
.

Do you have this directory /etc/avahi/services on your server, with files in it?

gexogen
.

No. It seems like no avahi in my system at all.

Michael
.

Ah ok, so thats it. Actually if you look carefully in the log it will probably say "Linux AVAHI daemon not installed, using built-in mdns server instead"

So can you install avahi so that virtualhere server can use it.

sudo apt install avahi-daemon

Then reboot your server or stop/start the virtualhere server service

(The fallback is to use the mdns internal server but it has a leak in it and thats what you are encountering)

gexogen
.

Thank you. I'll try it and continue to monitor and return with any updates.

gexogen
.

Thank you again! Your advice helped me to solve this problem.

Michael
.

OK thats great, im glad its all fixed now

Log in or register to post comments