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
Files wiped after find and replace (OS: Fedora 36) #11612
Comments
|
Will try and get something more reproducible to share later today. |
|
Could you please share details about your file systems? The output from |
|
|
Ok, so when you say "find and replace", you mean |
|
Yes - apologies that is what I meant. |
|
It's strange because the error seems like a rename that went sideways, but the copy functionality is implemented via |
|
Out of my depth here but just checked my update history to see if anything jumped out. Yesterday this was updated: Could this be related? |
|
Did you use this same functionality before without any trouble? |
|
yes - but not sure if I have since I updated rstudio which was I'd be surprised if I hadn't used it in the last month which points to an update in Fedora surfacing the issue but can't be sure. |
|
I tried:
I did an upgrade 3 days ago for this second machine. Not sure if this was working before because I never used this functionality. |
|
Interestingly enough, it works fine with kernel 5.18.6 but fails (with the error reported here) with 5.18.10, the latest one available in F36. I assume you are running the latter. |
|
yep - |
|
Running a toolbox with f37 (not yet released), rstudio 2022.07.0+548 and kernel 5.18.10 works without issue for me. |
|
That's... weird! And if you downgrade RStudio there? |
|
Assuming I'm doing this correctly then it worked ..... As it was a new toolbox I had to download the old versions directly from koji I installed both of these with |
|
Here's a standalone minimal reprex: #include <iostream>
#include <fstream>
#include <boost/filesystem.hpp>
int main() {
std::string test = "test.txt", temp = "/tmp/test.txt";
std::ofstream testf(test), tempf(temp);
testf << "asdf" << std::endl;
tempf << "fdsa" << std::endl;
testf.close();
tempf.close();
try {
boost::filesystem::copy_option option =
boost::filesystem::copy_option::overwrite_if_exists;
boost::filesystem::copy_file(temp, test, option);
std::cout << "worked ok" << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
}
remove(test.c_str());
remove(temp.c_str());
return 0;
}then $ g++ test.cpp -o test -lboost_filesystem && ./test # should output "worked ok"
Error: boost::filesystem::copy_file: Invalid cross-device link: "/tmp/test.txt", "test.txt" |
|
And I can confirm the above works in rawhide (with Boost 1.78). @Enchufa2 - Assume I should close this here? As this seems to work with Boost 1.78 is there much I can do apart from run Rstudio in a rawhide toolbox. I'm assuming that boost 1.78 wont find it's way in to f36? |
|
It seems clear to me that the bug is in Boost < 1.78 (probably < 1.77 judging from the filesystem fixes listed for v1.77) with running kernel >= 5.18.10 (or some patch between 5.18.6 and this one). So given that RStudio 2022.02.x supports Boost 1.69, let's keep this open for the RStudio people to take a look, because this bug will bite for any distro with a new enough kernel. @kevinushey If another release in the 2022.02.x series is not in your radar, maybe you could suggest a patch to apply directly into our F36 builds? @TimTaylor The workaround for now is to either start the system with an older kernel, which is not great, or to run the newest RStudio version for F37 in a toolbox, which is compiled against Boost 1.78. |
|
Reported here too. |
|
This is a Boost 1.76.0 bug: boostorg/filesystem#184 It completely failed to handle the EXDEV error from We can patch the Fedora Boost package, but other distros and users with self-built Boost 1.76.0 will have the same problem still. |
|
Thanks, @jwakely for the quick assessment. That fix is included in v1.77. If we can backport that patch in F35 and F36, it would be great. We don't know how many applications may be relying on |
|
I think the official builds of RStudio are already using Boost 1.78, which has the associated fix for this issue? In other words, I don't think there's anything to be done on the RStudio side; the issue here is specifically for Fedora 35 and 36 (which need backports of the associated Boost fix). Is that correct? |
|
Only the latest version. Version 2022.02.3 bundles Boost 1.69, so it is affected by this bug. |
|
Are you sure? I think the change to use |
Updated boost packages for F35 and F36 are queued for the updates-testing repos now. |
No, I'm not sure, I assumed that this was a problem for <= 1.76. But if this is the case, then we can close this.
Thanks! |
|
Just double-checking... seems this issue has been resolved on fedora's side, and I can close this now? |
|
Correct. |
System details
Describe the problem in detail
Ran find and replace with:
Find = cli::cli_abort
Replace = cli_abort
Saw variations of the following message in the find and replace window for each file where replacements occured and found that the files had been wiped (still there but all content deleted and 0 bytes size)
Describe the behavior you expected
Find and replace works and doesn't delete my files
The text was updated successfully, but these errors were encountered: