pachadotdev / analogsea

Digital Ocean R client
https://pacha.dev/analogsea/
Apache License 2.0
154 stars 24 forks source link

docklet_rstudio() on Windows 10 crashing R 3.5.2 #173

Closed mathesong closed 5 years ago

mathesong commented 5 years ago
Session Info ```r - Session info ----------------------------------------------------------------------------------- setting value version R version 3.5.2 (2018-12-20) os Windows 10 x64 system x86_64, mingw32 ui RStudio language (EN) collate English_United Kingdom.1252 ctype English_United Kingdom.1252 tz Europe/Berlin date 2019-03-12 - Packages --------------------------------------------------------------------------------------- package * version date lib source analogsea * 0.6.6.9110 2019-03-12 [1] Github (sckott/analogsea@26f3574) assertthat 0.2.0 2017-04-11 [1] CRAN (R 3.5.2) aws.s3 0.3.12 2018-05-25 [1] CRAN (R 3.5.2) aws.signature 0.4.4 2018-07-27 [1] CRAN (R 3.5.2) backports 1.1.3 2018-12-14 [1] CRAN (R 3.5.2) base64enc 0.1-3 2015-07-28 [1] CRAN (R 3.5.2) callr 3.1.1 2018-12-21 [1] CRAN (R 3.5.2) cli 1.0.1 2018-09-25 [1] CRAN (R 3.5.2) colorspace 1.4-0 2019-01-13 [1] CRAN (R 3.5.2) crayon 1.3.4 2017-09-16 [1] CRAN (R 3.5.2) desc 1.2.0 2018-05-01 [1] CRAN (R 3.5.2) devtools 2.0.1 2018-10-26 [1] CRAN (R 3.5.2) digest 0.6.18 2018-10-10 [1] CRAN (R 3.5.2) dplyr 0.8.0.1 2019-02-15 [1] CRAN (R 3.5.2) fs 1.2.6 2018-08-23 [1] CRAN (R 3.5.2) ggplot2 * 3.1.0 2018-10-25 [1] CRAN (R 3.5.2) glue 1.3.0 2018-07-17 [1] CRAN (R 3.5.2) granviller * 0.0.0.9000 2019-03-02 [1] Github (mathesong/granviller@97673aa) gtable 0.2.0 2016-02-26 [1] CRAN (R 3.5.2) httr 1.4.0 2018-12-11 [1] CRAN (R 3.5.2) jsonlite 1.6 2018-12-07 [1] CRAN (R 3.5.2) lazyeval 0.2.1 2017-10-29 [1] CRAN (R 3.5.2) magrittr 1.5 2014-11-22 [1] CRAN (R 3.5.2) memoise 1.1.0 2017-04-21 [1] CRAN (R 3.5.2) munsell 0.5.0 2018-06-12 [1] CRAN (R 3.5.2) pillar 1.3.1 2018-12-15 [1] CRAN (R 3.5.2) pkgbuild 1.0.2 2018-10-16 [1] CRAN (R 3.5.2) pkgconfig 2.0.2 2018-08-16 [1] CRAN (R 3.5.2) pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.5.2) plyr 1.8.4 2016-06-08 [1] CRAN (R 3.5.2) prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.5.2) processx 3.3.0 2019-03-10 [1] CRAN (R 3.5.3) ps 1.3.0 2018-12-21 [1] CRAN (R 3.5.2) purrr 0.3.1 2019-03-03 [1] CRAN (R 3.5.2) R6 2.4.0 2019-02-14 [1] CRAN (R 3.5.2) Rcpp 1.0.0 2018-11-07 [1] CRAN (R 3.5.2) remotes 2.0.2 2018-10-30 [1] CRAN (R 3.5.2) rlang 0.3.1 2019-01-08 [1] CRAN (R 3.5.2) rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.2) rstudioapi 0.9.0 2019-01-09 [1] CRAN (R 3.5.2) scales 1.0.0 2018-08-09 [1] CRAN (R 3.5.2) sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.5.2) tibble 2.0.1 2019-01-12 [1] CRAN (R 3.5.2) tidyselect 0.2.5 2018-10-11 [1] CRAN (R 3.5.2) usethis 1.4.0 2018-08-14 [1] CRAN (R 3.5.2) withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.2) xml2 1.2.0 2018-01-24 [1] CRAN (R 3.5.2) yaml 2.2.0 2018-07-25 [1] CRAN (R 3.5.2) [1] C:/Users/mathe/OneDrive/Documents/R/win-library/3.5 [2] C:/Program Files/R/R-3.5.2/library ```

I'm having an issue with starting up an Rstudio docklet, where my R session crashes out every time. I run the code below:

library(analogsea)

droplet_create(region="lon1", image="ubuntu-16-04-x64")

d <- droplets()[[1]]

docklet_rstudio(d, user="test", password="test123", verbose=TRUE)

Everything is fine until the last step. I have tried both with the ssh branch, as well as with the latest development branch (and I can't figure out the ssh details with the CRAN release). The last step first pulls up the password entry dialog box (I have also tried simply adding the password as an input argument and get the same error) with verbose=TRUE gives me the following output

docker pull rocker/rstudio Found known server key: 2b:82:bd: ....

But after a couple of seconds, R always crashes. I have also tried also running Rgui, and I get the same issue, so it doesn't appear to have anything to do with RStudio specifically.

I'm not quite sure how to even start to debug the issue since I can never get any traceback. Any help would be very much appreciated. Happy to run any diagnostics you might need.

sckott commented 5 years ago

thanks very much for the report @mathesong

the ssh branch is behind master now, it's stuff has been merged into master. so master is the current thing to use.

my first gut reaction is that you created a regular droplet (droplet_create) then tried to use it to do docker stuff. you should try docklet_create(), then use that to pass to docklet_rstudio. try docklet_create and the rest of the code, and report back

mathesong commented 5 years ago

Thanks so much for the quick response!

Re ssh branch: I encountered the same issue with both the ssh branch and the most recent master branch. But I'll stick to the latest branch for now then.

Thanks for putting me right on my using droplet_create() instead of docklet_create(). That was silly of me. I hoped that might fix it, but unfortunately the problem persists. I'm now running the following:

library(analogsea)

docklet_create(region="ams3", image="ubuntu-16-04-x64")

d <- droplets()[[1]]

docklet_rstudio(d, user="test", password="test123", verbose=TRUE)

In each case, I enter the passphrase, wait a few seconds, and then R crashes as before.

EDIT: ran again with debug. The crash occurs at docklet_pull()

sckott commented 5 years ago

thanks for the details @mathesong

@jeroen seems maybe askpass is involved here? anything we can do to try to debug?

mathesong commented 5 years ago

I realised I was being a bit daft and should really have been stepping through everything a bit more carefully using debug. I've managed to follow the trail of the error a bit further, and isolated it to an issue within ssh::ssh_connect() at the following line

    .Call(C_start_session, details$host, details$port, details$user, 
        keyfile, passwd, verbose)

This is the point at which the crash happens.

I see that this actually falls outside of analogsea. @sckott If you want I can close the issue, and move it over to the ssh repo?

jeroen commented 5 years ago

Yes please open an issue in the ssh repo. Is there a way I can reproduce this? Maybe you can try debug(ssh::ssh_connect) to see for which values it crashes? Also try setting verbose=5 in ssh::ssh_connect so that we get some more info about which point it crashes at.

mathesong commented 5 years ago

Thank you both for your time and the help. I've started a new issue in the ssh package repo.