Skip to content

Cannot save file after New Session, file on network drive #3521

Closed

Description

@baderstine

System details

RStudio Edition : Desktop
RStudio Version :  1.1.456

R version 3.4.4 (2018-03-15)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.5

Steps to reproduce the problem

  1. Open .RProj from a mapped network drive folder (that you are connected to via VPN). This doesn't seem to be a problem with files/projects stored on the local drive. On Mac, e.g., Finder > Go > Connect to Server... Server Address = smb://.RProj
  2. Open a .R script file within that project folder.
  3. Session -> New Session (as an aside: why this action opens the same project in a new session and doesn't just open a brand new, clean session really baffles me (feature request!), anyway...)
  4. Go back to the original session and make an edit to the .R file. A couple seconds later you get a pop-up: "Save File No such file or directory" With an OK button. No matter what you do from here on out you cannot save changes to the .R file.

Describe the problem in detail

Cannot save network drive R project script file after opening new session.

Describe the behavior you expected

Successfully save the edited file.

Session Error info from diagnostic report:
(I've removed the actual network drive paths)

> 21 Sep 2018 15:52:24 [rsession-username] ERROR system error 45 (Operation not supported) [lock-file=/<pathto>/.Rproj.user/442D8A65/sources/s-30B2E4F4/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; LOGGED FROM: bool rstudio::session::source_database::supervisor::<anonymous namespace>::reclaimOrphanedSession() /Users/rstudio/rstudio/src/cpp/session/SessionSourceDatabaseSupervisor.cpp:374

> 21 Sep 2018 15:52:24 [rsession-username] ERROR system error 45 (Operation not supported) [lock-file=/<pathto>/.Rproj.user/442D8A65/sources/s-30B2E4F4/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; LOGGED FROM: rstudio::core::Error rstudio::session::source_database::supervisor::<anonymous namespace>::createSessionDir() /Users/rstudio/rstudio/src/cpp/session/SessionSourceDatabaseSupervisor.cpp:256

> 21 Sep 2018 15:53:54 [rsession-username] ERROR system error 77 (No locks available); OCCURRED AT: virtual rstudio::core::Error rstudio::core::AdvisoryFileLock::release() /Users/rstudio/rstudio/src/cpp/core/file_lock/AdvisoryFileLock.cpp:153; LOGGED FROM: rstudio::core::Error rstudio::session::source_database::supervisor::detachFromSourceDatabase() /Users/rstudio/rstudio/src/cpp/session/SessionSourceDatabaseSupervisor.cpp:566

> 21 Sep 2018 15:53:54 [rsession-username] ERROR system error 2 (No such file or directory); OCCURRED AT: rstudio::core::Error rstudio::core::FilePath::children(std::vector<FilePath> *) const /Users/rstudio/rstudio/src/cpp/core/FilePath.cpp:998; LOGGED FROM: rstudio::core::Error rstudio::session::source_database::supervisor::<anonymous namespace>::removeSessionDir(const rstudio::core::FilePath &) /Users/rstudio/rstudio/src/cpp/session/SessionSourceDatabaseSupervisor.cpp:159

Activity

  1. jmcphers commented on Sep 24, 2018

    @jmcphers
    Member

    @baderstine Thanks for the report! We don't have a VPN mount with Mac to test with at the moment, but we will look at some possibilities.

    @kevinushey I think points 3 and 4 are related. My theory is that the Session #2 is able to lock the source database from Session #1 and therefore attempts to resume it as it would a crashed session, co-opting its sources databases for recovery (which of course leaves the still-living Session #1 without a source database). Does that sound compatible with your knowledge of file locking and the sdb?

    I wonder if what's needed here is a means of using link-based file locks in RStudio Desktop for desktop users who are using multiple sessions on non-local disks.

  2. added this to the v1.3 milestone on Sep 24, 2018
  3. kevinushey commented on Sep 24, 2018

    @kevinushey
    Collaborator

    Yes, I think that's exactly right. I think this falls into the same boat as #1542, which is a catch-all to expand out file locking implementations based on what operations are supported on the current filesystem.

  4. added a commit that references this issue on Oct 30, 2019
    d293581
  5. removed this from the v1.3 milestone on Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions