Fixed (FIXED in 1.21.2.0) Major handle leak and 100% cpu usage in 1.21 because of new Leap Motion DLL when firewalled

via5

Well-known member
Messages
132
Reactions
389
Points
63
Applies to 1.21.0.4 and 1.21.1.0. Works fine in 1.20.77.13.

When started in VR, VaM.exe takes 100% of all 16 cores and leaks about 5000 handles a second. Process Explorer shows that they're all \Device\Afd, which are socket handles afaik. After a few seconds, most network operations fail system wide, such as Firefox refusing to load any site. This doesn't happen in desktop mode and is new in 1.21. I suspect it might be related to my firewall blocking VaM.exe, but I'm not sure.

On a related note, thank you for making it easy to rollback to previous versions.
 
Last edited:
have an index hmd and try'ed it. can not confirm the vr mode is causing cpu freaking load. taken an 1.17 release and let the updater do it´s job to 1.21.1.0. open in vr with auto loaded scene and one model. 20% cpu showed the task manager. compared this to a running 1.21.0.4 exactly the same 20%. put all var files, saves, and custom files to the new verion and try'ed again ...20% in the default scene.

are you sure the vam.exe is causing the cpu load ? if its running but you have 100% can you see vam.exe is causing that 100% ? iam asking cause ...vam is still single threaded ...iam sure the team has managed to outsource some components of unity or other libs of vam to use realy more than one thread. but as far as i know the unity core vam is using is still single threading.

but you say you find out it could be something network related ? i also uses a firewall. iam using the build in with a control panel. my vam also has no network access and work´s fine. simplest try i would do ...what happened if you pull your network connection ? plug in or out "can" make a big difference. windows or at least the driver handles traffic request´s different if at least the card driver say´s "there is no plug in it so there´s no connection possible and i wont even try that". or the network layer's.
what if you pull the plug and diasabling every firewall ? virus scanner if it can overwatch traffic ? next i would try is to kick out every task/programm you can find out of memory. not deinstall it simply end it. if it has no end/exit go into the task manager an end it. of corse not EVERY windows component you can find. things like nvidia panel tools and so on. if this not helping grap yourself a empty HDD/SSD/NVME whatever and build another fresh windows ...not reinstall your working windows. no ..a parallel install. if vam works fine there then you know to things. first ...it´s probably not a hardware thing. ...probably ...maybe a driver issue. seccond ...something you have installed in your "use" windows causing that problem. ...to find "that" can cause more efford instead of simply reinstall windows.
but first i would torture everthing related to network if you sure it could have something todo with a "socket handles" ...reinstall firewall or whatever you are using. deactivate and activate every network interface. deinstall and reinstall it. using another ip adress range and so on.
 
It's the new Leap Motion DLL that's causing problems. It's continuously attempting to connect to localhost and leaking handles. I understand there's probably not much you can do about it, but it still sucks. My crap firewall is just an allow/deny for everything, can't allow just localhost.

In any case, here's Process Monitor for VaM.exe with a stack trace for one event, plus Process Monitor with 40,000 socket handles.


vam-pm.png


vam-st.png


vam-pe.png
 
iam using https://binisoft.org/wfc it did not install a new firewall instead of using the build in from windows. but you have more control about what the rules are doing and how theyre created if you configure the fw right. profile -> medium, display notifications, x secure profile, x secure rules. with this every connection attempt wich has no rule are asked and programm injected auto rules are deleted.

have you diasabled the options in vam for packet dl manager and the new stuff ? maybe deactive helps.
btw ...my vam start and run's even without the LeapC.dll ...did someone know what this dll is for ?
 
iam using https://binisoft.org/wfc it did not install a new firewall instead of using the build in from windows. but you have more control about what the rules are doing and how theyre created if you configure the fw right. profile -> medium, display notifications, x secure profile, x secure rules. with this every connection attempt wich has no rule are asked and programm injected auto rules are deleted.

have you diasabled the options in vam for packet dl manager and the new stuff ? maybe deactive helps.
btw ...my vam start and run's even without the LeapC.dll ...did someone know what this dll is for ?
it must be for some ugly maniac pervert solitaire sex toy control, but maybe it's not, maybe 🤣
 
Applies to 1.21.0.4 and 1.21.1.0. Works fine in 1.20.77.13.

When started in VR, VaM.exe takes 100% of all 16 cores and leaks about 5000 handles a second. Process Explorer shows that they're all \Device\Afd, which are socket handles afaik. After a few seconds, most network operations fail system wide, such as Firefox refusing to load any site. This doesn't happen in desktop mode and is new in 1.21. I suspect it might be related to my firewall blocking VaM.exe, but I'm not sure.

On a related note, thank you for making it easy to rollback to previous versions.
OT: do you consider still worth developping your fantastic cue plugin or your interest is just for the charming promised land vam2 project and the f...g vam-x mess-allatonce project? thanks for your sharing activity and my best wishes for everything you plan to do


is this screenshot (saved during my vam last release VR session), confirming the issue you are mentioning? is it possible to delete Leap Motion DLL without negative consequences on hub browsing during VR session? I was starting my tcp viewer (always during this var VR session), but besides an intense vam related traffic, I did not notice the same anomaly you described. Probably because I don't use optional firewall or other applications as you, sorry for bothering but I am a little bit concerned about this situation, even from the very low point of view of my technical ignorance.

Clipboard01.jpg
 
Last edited:
do you consider still worth developping your fantastic cue plugin

There's a largish update coming out this week.

is this screenshot (saved during my vam last release VR session), confirming the issue you are mentioning?

I don't think so. You have about 100k handles and only a few cores are used. My mouse stutters after a few seconds, new network connections can't be opened and graphical operations start failing in random applications. I switched to another firewall which can block internet access but allow local connections and it's fine now.

Here's what I see after running VaM for about 30 seconds:

vam-cpu.png


vam-tm.png
 
I might be able to add a global preference that can turn off Leap completely. The options in the User Preferences only disabled left/right hand but leave the system active.
 
I have a leap module installed on my headset. If I want to use my index controllers I have to turn leap motion left/right off otherwise I get a strong interference. But the setting isn't stored in user preferences. I have to turn it off every time I start VaM.
 
Back
Top Bottom