Skip to content
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

crash when restarting R session while using network drive #1690

Closed
kevinushey opened this issue Oct 30, 2017 · 6 comments · Fixed by #1823
Closed

crash when restarting R session while using network drive #1690

kevinushey opened this issue Oct 30, 2017 · 6 comments · Fixed by #1823
Labels
Milestone

Comments

@kevinushey
Copy link
Contributor

@kevinushey kevinushey commented Oct 30, 2017

https://community.rstudio.com/t/new-rstudio-crashes-when-restarting-r-session-on-network-drive/2109


I’ve been using the new RStudio (Version 1.1.383) on a Mac (Sierra Version 10.12.6) for the last 2 days and it crashes when I try to restart the R session. Here is the sequence of events:

Mount a network drive
Open RStudio
Open RStudio Project from the network drive
Do work
Press shift-command-f10 to restart the R session
Crash…
Here is the error message:

ERROR system error 45 (Operation not supported) [lock-file=/tmp/.Rproj.user/B6148186/sources/s-37259BA1/lock_file]; OCCURRED AT: virtual rstudio::core::Error rstudio::core::AdvisoryFileLock::acquire(const rstudio::core::FilePath &) /Users/rstudio/rstudio/src/cpp/core/file_lock/AdvisoryFileLock.cpp:137

It has something to do with being on a network drive because when I do the same thing on my local drive I have no problem with restarting R. I’ve been using the same workflow for a long time and never had this issue with prior RStudio versions.


The user also reported that an SMB network mount is being used in this case.

@dfalty dfalty added the bug label Oct 30, 2017
@kevinushey
Copy link
Contributor Author

@kevinushey kevinushey commented Oct 30, 2017

I've reproduced this by setting up an Amazon AWS instance with a Samba share, and mounting that directory locally. Working on an RStudio project in that directory and attempting to restart triggers a crash for me with RStudio v1.1.383, but not with v1.0.153.

screen shot 2017-10-30 at 11 30 47 am

It looks like the lockfile associated with the source database of the project is not properly cleaned up when the R session is closed:

kevin@cdrv:~/samba/.Rproj.user
$ find . -name "*lock*"
./878DCAD6/sources/s-3790cd6e/lock_file

This is also true on RStudio v1.0.153, but in that case, the IDE then creates a whole new session rather than bombing out early on. This implies that the 'sources' folder of the project starts bloating (as old sources are never cleaned out), but at least no crash occurs. For example, this is what I see after opening a project living on a Samba share, opening a couple documents, and then restarting it 5 times, using RStudio v1.0.153:

kevin@cdrv:~/samba/.Rproj.user
$ tree
.
├── 3B18B23A
│   ├── ctx
│   ├── pcs
│   │   ├── files-pane.pper
│   │   ├── source-pane.pper
│   │   ├── windowlayoutstate.pper
│   │   └── workbench-pane.pper
│   ├── persistent-state
│   ├── presentation
│   ├── profiles-cache
│   ├── rmd-outputs
│   ├── saved_source_markers
│   ├── sdb
│   │   ├── per
│   │   │   ├── t
│   │   │   └── u
│   │   ├── s-57767CB0
│   │   │   ├── 16B20655
│   │   │   ├── CB3ECB41
│   │   │   └── lock_file
│   │   ├── s-5F7F0F32
│   │   │   └── lock_file
│   │   ├── s-6ECE3A93
│   │   │   ├── CB3ECB41
│   │   │   └── lock_file
│   │   ├── s-96270160
│   │   │   ├── 16B20655
│   │   │   ├── CB3ECB41
│   │   │   └── lock_file
│   │   ├── s-CF64A67E
│   │   │   └── lock_file
│   │   └── s-E9F9C12D
│   │       ├── 16B20655
│   │       ├── CB3ECB41
│   │       └── lock_file
│   ├── session-persistent-state
│   ├── viewer-cache
│   └── viewer_history
└── shared

Not yet sure what would lead to RStudio failing to clean up these lock files + sources...

@kevinushey
Copy link
Contributor Author

@kevinushey kevinushey commented Oct 31, 2017

Also worth noting that mounting the folder from Finder (with Cmd + K) mounts files so that only the active user has write permissions; group and world permissions are unset.

@johnhowa
Copy link

@johnhowa johnhowa commented Nov 7, 2017

Any progress on this front so far? I've got a similar problem, with rstudio crashing while opening and closing files. The log file shows plenty of similar errors. Diagnostic

@kevinushey
Copy link
Contributor Author

@kevinushey kevinushey commented Nov 16, 2017

Sorry; we haven't been able to tackle this one yet (but it's on our list for a v1.1 patch release). If you need to work with networked filesystems on macOS, you can switch back to RStudio v1.0 in the interim: https://support.rstudio.com/hc/en-us/articles/206569407-Older-Versions-of-RStudio

@kevinushey kevinushey added this to the v1.1-patch milestone Nov 16, 2017
@johnhowa
Copy link

@johnhowa johnhowa commented Nov 16, 2017

Thanks; I've been able to avoid the issue by avoiding the use of Projects. I'm looking forward to the patch!

@jmcphers
Copy link
Member

@jmcphers jmcphers commented Dec 19, 2017

Backported to 1.1 in 0e80887.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants