-
Notifications
You must be signed in to change notification settings - Fork 80
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
dir_ls crashes R 4.2.1 when reading very large directories #447
Comments
Can you show the output, and also the stack trace after the crash? |
well I can't do a traceback because it crashes, here's the Rterm output & Rterm --no-save --no-restore --verbose -e "fs::dir_ls('my/dir/path', recurse R version 4.2.1 (2022-06-23 ucrt) -- "Funny-Looking Kid" R is free software and comes with ABSOLUTELY NO WARRANTY. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'demo()' for some demos, 'help()' for on-line help, or 'verbose' and 'quietly' are both true; being verbose then ..
|
Sorry, I meant a stack trace from a low lever debugger, like gdb or drmingw. |
We have a similar problem, it's been occurring since February 2024 but was not detected because the output wasn't so important and we've been trying to find out why it's failing for a few days. My example, this is on R 4.4.0,
The number of results is 1,189,442 (determined with 'find -type f'. The largest number of files in one dir is 20030, and the total size of files is ~33Tb. The text output of This is an NFS mount. This listing via There is another path that works the same way prior to the segfaulting one, with a total file number ~225000 that has always worked. I'm working on a gdb analysis with wch/r-debug 🙏 |
@mdsumner with fs v1.6.3 |
Excellent, that fixes my problem. |
@gaborcsardi this issue has popped up again. It's happening consistently with a particular directory (same as the one @mdsumner gave details on above). The specific command that causes the error is:
If I run the whole script via Rscript, it gives a slightly different error:
(but I think that's a red herring: if I run the actual
(same error also happens on a machine running R 4.3, and mounting the same directory over sshfs, not as a direct nfs mount). The core dump - I realize that this is from a standard R binary, not R-debug, but throwing it in with the hope that it might be useful:
|
Hello,
The following command crashes when reading through a directory with dozens of folders and over a 600k total files. I'm not sure what the inflection point is, but it works fine in similar directory with 100k total files. This problem does not occur in R 4.3.1.
fs::dir_ls(mydir, recurse = T)
The text was updated successfully, but these errors were encountered: