microsoft / RTVS

R Tools for Visual Studio.
MIT License
389 stars 118 forks source link

VS unresponsive when connecting to Azure DSVM #4292

Open N1h1l1sT opened 6 years ago

N1h1l1sT commented 6 years ago

I have the latest public release of Visual Studio (as of today: 2018-02-23) Version 15.5.7. There's also the classic Azure DSVM (Data Science Virtual Machine for Linux (Ubuntu) to which I installed the RTVS and its daemon is running.

When trying to connect from my local Visual Studio to remote R on an Azure DSVM with RTVS: I'll click on the "blue right arrow" icon on "Workspaces" to connect, I'll get the "Connecting to ..." dialogue, *I'll get the self-signed certificate messagebox where I click "Yes", and then visual studio will just become unresponsive/hang... I cannot click anything, not even the minimize/maximize/close buttons, and the only thing I can do is kill the process from task manager.

I did a format/reinstall of windows just to solve this, and now on a clean installation of visual studio, the problem persists (of course I do have lots of plugins installed - truth be told, I haven't tried with vanilla VS, but the problem seems on R tools for Visual Studio).

My local installations of R is "Microsoft R Client 3.4.1.0" and "Microsoft R Server 3.3.3.300". The Remote R on the DSVM is 'R version 3.4.1 (2017-06-30) -- "Single Candle"' (it's basically R Open that loads R Server packages like RevoScaleR and stuff - but that's not really relevant I guess).

So, to reproduce this problem, Get a free Azure account Spin up a Data Science Virtual Machine for Linux (Ubuntu) Install RTVS on the VM Try to connect to that VM's R *VS becomes unresponsive 9 out of 10 times

EDIT: Bloody hell, I just figured out something very interesting! The problems seems to disappear (seems like 100%, but I've only tried it a few times so far so very small sample size) when no files are open on Visual Studio. It would be great if someone could verify that freezing is only a problem when files are already open before one tries to connect to Remote R. If that's the case, then not only does it open the way for a global fix, but the temp fix is obvious - just close everything before connecting.

EDIT2: It does help, but doesn't solve the problem. It seems I was just lucky before. It stills becomes unresponsive, but with no files open, the becoming unresponsive part waits until the remote r text is shown first (like "Version: 1.2.31009.1007, Operating system: Linux 4.13...........)

EDIT3: SSH-ing to the Azure DSVM, we can see that every time VS tries to connect via RTVS, 2 processes go 100% CPU usage on the linux machine. They seem to remain there even if VS is killed via task manager (as of course being unresponsive, the only way to close it is to kill it); so I kill them too with F9 on htop. Image: rtvs daemon cpu usage