-
Notifications
You must be signed in to change notification settings - Fork 859
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
rsync hangs on particular file #2138
Comments
@Wishmesh - What name and path name of that particular file? I had a strange experience with file named "ext" and directory named "ext"; My anti-virus blocked that file and directory. |
@sunjoong - no. Anti-virus have these folders excluded. Path looks like:
There were other extensions too, but I do not remember of what type they was... |
Unfortunately I can't repro here. Strange files to be having trouble with. Their size isn't that special, nor should that be a problem anyway. TCP streams are very reliable on WSL these days. Any chance those files are open in something (anything) in Windows? Or special in any way you can think of, versus the other files in your tree? One thing you might try is to do it old school and see what happens:
That doesn't get you all the |
No. It stuck on the same file again, and again. Even after reboot. Antivirus disabled for that drive. Ok. Will try out your suggestions next time it happens. |
It's not antivirus; and even if it were, those files still aren't very special compared to all the object files you must have in there. I rsync around enormous trees (like chromium) somewhat regularly, but that is on VolFS ( |
I have 2 folders (about 10GB):
Nothing extraordinary. And "file being used / not accessible" is less probable, because.... When it stuck, I can copy the same stuck file using the same rsync syntax, but specifying filename -- syncing by one file works... and then after that, again rsync works for some days or weeks without any problem. |
Yeah that's going to be a bitch to track. So obviously it's going to work for the one-off test I did. Sigh... That the fail is sticky even after reboot is very relevant. That means it pretty much has to be a "filesystem thing", but I couldn't speculate what exactly. Appreciate you reporting though, so at least it is on the books. |
But why rsync then works if I sync the same files one by one? And both - source and destination FS are NTFS, if that matters. |
Dunno, but it pretty much has to be a "filesystem thing" by deductive reasoning. Because your DrvFS (NTFS) filesystem is the only thing that can hold the sticky failure state across a reboot. Your sync one-by-one fix is, for whatever reason, getting things back into a sane state. Next time it fails, try deleting the problematic files on the server that you are pushing to and doing a full sync, instead of syncing them one at a time. Handwaving here, the whole process of deleting files on DrvFS is not straightforward, because delete semantics are different in Unix and Windows. That why the |
Let us try....
Now it stuck on the some.obj file.
strace -o strace.txt -ff rsync with params Got 2 strace files. Unfortunately I cannot share them here as is... But will provide you with parts I you will need. First file seems to come from ssh. 178974 bytes long.
2nd file from rsync. 9277601 bytes long:
|
And one more thing. I am starting to suspect that it is hanging only on the files, that are created with Visual Studio that is running as Elevated process under admin privileges. But it is not easy to reproduce, because in most time it sync these files easily. |
@Wishmesh - I don't know why that happened (hmm.... perhaps timestamp or file closing problem??), but remember you said;
If so.... between two Windows.... using |
Those writes are likely blocking because the send buffers are full. Which means it is the server (receiving) side where you are going to need to do the
That could matter. If you insist on running VS as admin, then you are probably going to want to try running bash with elevated privileges too; assuming you are not already. That might not (probably won't) unstick a stuck rsync, but, spitballing, it might avoid whatever is getting you in the state in the first place. That goes double if you are accessing those files with elevated privilege on the server as well, as opposed to just pushing them there for backups.
For giggles take a peek in Hopefully the devs take a look. Even more hopefully the problem just gets fixed magically with ongoing improvements, which happens a lot around here.
Well yeah. Or Cygwin rsync. But where would be the fun in that. |
Robocopy isn't an option, because I need to sync files to non-Windows machines too. in %localappdata%/lxss/temp (not %appdatalocal%) nothing unusual: Also, tried to run Bash as Elevated admin. It still stops on the same file. Cannot say if running as elevated would avoid getting stuck in the first place. On server files are not touched / accessed. Like in the backup. |
Haha... Then.... Does Msys2 rsync make same problem too? Compairing is a good tool to clearify issue, I think. And... Is that sure all Visual Studio windows were closed before launching rsync? |
What are the size of those files? Or more specifically, do they look familiar in the context of your errant files (pch etc).
Wish you wouldn't have said that. That negates most theories related to elevated privileges. You client If your use case is backups, and there aren't other circumstances (like not having space on |
@Wishmesh - I think @therealkenc points good one. You might sync files under |
These are folders in the temp directory... I said - nothing unusual, because they are identical to what I see in other unrelated to this problem PC. About syncing to /home ... just tried the same folder and of course rsync works. Remember I said in the first posts... that if I try to rsync individual files (that are stuck), then it unstacks... and everything works again from this point. So I currently have stuck the following folder: I just did rsync to /home/user/testing ... and it works After testing these I run original rsync command: So I suspect that if I will run: Do you have other ideas to try, before I issue rsync with "deeper" path? |
@Wishmesh - I could not figure it out why that happen but... think there are still many traps in using DrvFS, i.e., I thought, if you could fix the point of condition when that problem occurs, i.e., if you could reproduce it when you want it, you could compare it with non DrvFS case. But... you look like to say it's impossible. And... I don't understand @therealkenc's saying enogh but... guess it might be about sort of limits during programs running. You know, there are some directories in |
I couldn't resist to try.... So I have one file stuck:
Issue is gone till the next time :( |
And if it is filesystem issue, then why syncing files one by one works? |
Good question; You know, people say good question when they don't know a quite answer. I cannot be sure that's filesystem issue; I'm just guessing it might be or not and it could be timestamp related issue if it might be a filesystem issue. Of course, it might not be timestamp related, it might even not filesystem issue, it might be a issue I could not imagine. But I know there is a timestamp issue in DrvFS itself that make a strange thing, and found another timestamp issue of rsync (but it might not fit on your case) https://askubuntu.com/questions/112863/rsync-not-working-between-ntfs-fat-and-ext . |
Sorry my poor explanation. When I said "you might want to push to
Once you push to any different folder without corruption you're golden. Go deeper, sideways, to a whole different server, whatever. Hold on to the corrupt folder in its pristine corrupt state if you have the space. The devs are going to need diagnostics of some kind on that tree, because no one will be able to repro this locally. You've got a real bug. But note that the chances of anyone reading this far down the thread is rapidly decreasing. |
Adding @SvenGroot to see if he can help out with this one. Also, marking this one as a bug. |
@Wishmesh Could you follow the steps from section 8 at https://github.com/Microsoft/BashOnWindows/blob/master/CONTRIBUTING.md, and provide us with the log files? That may provide some insight in to what is happening. |
His problem is on the server-side of an WSL-to-WSL
...which is not of much use, because it is not failing, just blocking. The problem isn't network-related because the problem persists across a reboot and only once the DrvFS filesystem on the server-side has gotten into a corrupt state. |
Since the server is also WSL, logs of both sides would be helpful. Strace would be helpful but I can see why that would be difficult in this scenario. However, ETL logs should be easy if you have access to the server. Thanks, |
Thanks for looking into this!
If you have idea how to strace rsync on server, let me know.
|
This is a really annoying issue. I'm experiencing this with WSL Debian on Windows 10 Enterprise. The workarounds to resize the WSL window works perfectly well. However, it is really annoying. Some hints for reproducing the issue: I think it has to do with the timestamps of the files: Whenever a file is overwritten the "created date" stays the same however the "updated date" is changed. I'm quite sure that this is at the root of the issue. So please some developer go ahead and investigate this issue. Thank you. In the meantime: if you resize vertically you get more window updates than if you resize horizontally. So you get a higher file throughput rate. 😲 😬 😆 |
Using the workaround mentioned in this bug report, I am using this to run my regular backup. Works for me.
|
There is definitely (scare quote) "something" going on here; I have seen the If someone can catch |
FWIW, I have 3 systems running WSL2 on Win10 x64. Only 1 of the 3 seems to experience the hanging problem. But maybe it is specific to some particular file attribute or content, so the other 2 may trip over it at some point. |
For me it was working perfectly with the -W [whole-file transfer] workaround for quite some time and with one of the recent windows updates it came back on WSL. It happens pretty predictably when multiple, small files need to be transferred for me [like small, 4KB-large images, for example]. |
Same issue for me - random hangs when running rsync on windows ubuntu subsytem for linux to a remote debian machine. Just verified it is working if I run rsync inside of msys it works as expected. Running: |
I'm having the same issue. I'm using rsync to deploy ASP.NET Core apps, from WSL Ubuntu 20.04 on Windows 10 to an Ubuntu 20.04 VPS. This has always been an issue for me, starting with 18.04 on both ends. If I deploy with the same command using an Ubuntu VM in Azure DevOps or GitHub Actions, it works fine.
As others have mentioned, if I use the |
This has been affecting me as well transferring to WSL2 ( Ubuntu 20.04 -- Linux version 4.19.104-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Feb 19 06:37:35 UTC 2020 ) from OSX
Adding the -W did solve the issue, thanks !!. |
As a confirmation, just ran into this issue on fresh W10 install, where rsync of large files (win->lin) would hang. As a possible reason as to why signals help - strace(ing) some of the hanged rsync instances were stuck in "select" calls. |
@usovalx Thanks for that info. Found a fresh win10(home) install w/ a fresh WSL (openSUSE) install was 🙄 using WSL1... (pretty darn sure I installed WSL2, but it wasn't default for :sigh: "reasons"... fixed that... until finding your comment I was thinking I was using WSL2). edit: Just dawned on me that the issue might've been due to rsync'ing from /mnt/c (I see a few other similar comments, so under the "more data == better analysis" adding that tidbit here). |
I am having the same issue. Windows 11, sshd on wsl2 - ubuntu, about 40gb sync. It was working flawlessly until couple of days ago but now rsync timesout always on the same directory.
Has anyone figured this one out? |
I found that resizing the window will free things up for a few files. |
@andrew521 I haven't tried win11 myself, but this behavior feels very similar to what I had encountered with WSL1. Otherwise try running your |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
I definitely still have this problem. |
I still have this problem too on WSL1 |
This bug is certainly not solved. But I guess WSL1 is EOL and it will never be solved. Probably one of the gremlins that made Microsoft change the entire approach to the new WSL2 hotness. |
I guess all tickets are being closed automatically now without a week of response from the ticket opener. I have re-opened this issue at #11157 in case anyone wants to follow-on the journey of this clown car. |
Reopened and will track it here! Thank you for the feedback |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
this issue has never been addressed, it should not be closed. |
It never will be. WSL1 is long dead, and this can't be fixed by the community. |
ah yeah that's right they completely gave up on the kernel adapter didn't they |
Please at least have the decency to close this as WONTFIX instead of lying about this being completed! |
Your Windows build number: Microsoft Windows [Version 10.0.15063] + BOW 16.04 (reinstalled today)
What you're doing and what's happening: I am trying to rsync folders between two Windows (both BashOnWindows). I am using following commands:
I tried to wait for more than 24h... it stays on the one file.
Also, strange thing is:
(If
<cmd>
is failing, then runstrace -o strace.txt -ff <cmd>
, and post the strace.txt output here)The text was updated successfully, but these errors were encountered: