Reputation: 21
Anyone run into the R haven package call generating: ***Recursive gc invocation error in a shared environment
?
Here is what I am running.
RStudio Ver. 2021.09.2 Build 382
R Ver. 4.1.2
Rtools Vers 4.0
Haven package release 2.4.3
The code works on my local install. I have users accessing a shared instance to work with large data files and can't get it to consistently run in that environ. The essence of the call is:
library(haven)
SFF05 <- read_sas("file/path/name/filename.sas7bdat”)
Users in this space often get this error off the library statement:
*******recursive gc invocation
Adding gc()
to the start of the code will fix it temporarily, but eventually stops working.
My users also get this error in relation to the file read_sas
call:
Error in df_parse_sas_file(….)
They occasionally give us other recursive errors or namespace errors. It’s not very consistent, and sometimes it just hangs until R crashes and reloads.
These programs worked flawlessly on R3.6.1 and RStudio July 19th, 2018 (1.1.456). Also, it works in R4.1.2 console just fine, it appears be an issue with the combination of R 4.1.2 and RStudio Ver. 2021.09.2 Build 382 in a shared environment.
Upvotes: 2
Views: 3066
Reputation: 11
This could be related to a bug in your RStudio, e.g see:
It seems to be fixed in the latest RStudio release which should arrive any day now:
A temporary fix might be to set session-handle-offline-timeout-ms=0
in your rsession.conf
. See: https://github.com/rstudio/rstudio/issues/10565#issuecomment-1035517692
Upvotes: 1