Skip to content
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

Re-open #2138 - WSL hangs on rsync/ssh #11112

Closed
1 of 2 tasks
bunnie opened this issue Feb 1, 2024 · 5 comments
Closed
1 of 2 tasks

Re-open #2138 - WSL hangs on rsync/ssh #11112

bunnie opened this issue Feb 1, 2024 · 5 comments

Comments

@bunnie
Copy link

bunnie commented Feb 1, 2024

Windows Version

Microsoft Windows [Version 10.0.22621.3085]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #3996-Microsoft Thu Jan 18 16:36:00 PST 2024

Distro Version

Ubuntu 20.04

Other Software

Copying via ssh/rsync to another WSL instance, this one is WSL 2.0.9.0 on windows 10.0.19045.3996

Repro Steps

I run a script to rsync several files from one computer to another:

rsync --log-file=log.log -aiv --delete me@me.com:/mnt/c/dir .

The target computer is running sshd, with public key authentication (Ed25519-only).

Expected Behavior

The rsync process should run to completion.

Actual Behavior

After a couple of minutes (so, after transferring ~ few GiB or thousands of files -- I have seen it fail with few large files, and also fail with thousands of small files), the rsync process hangs. This is evidenced by:

  • Network traffic going from ~1Gbps to ~0
  • rsync process consuming no more CPU
  • rsync process still visible in the process table

The work-around I have for this, and have been using for years now, is to spawn in parallel a script that runs this:

while killall -CHLD ssh; do sleep 0.1; done

However, as recently as last month I forgot to spawn that and had an incomplete rsync several hours later (I seem to recall the rsync actually terminated with an error eventually, without copying all the files).

The prior issue #2138 has been open for a while and I have been holding out hoping there would be a fix for this, someday. The "keep killing SSH" helper process is a viable work-around but if I forget to run it, things fail.

Would really like my rsync to be more reliable...or at least have some satisfying explanation of root cause and why this might be specific just to rsync and not indicative of structural unsoundness inside WSL leading to race conditions.

Diagnostic Logs

No response

Copy link

github-actions bot commented Feb 1, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@bunnie
Copy link
Author

bunnie commented Feb 1, 2024

I do think that the root cause of this is probably exactly what's causing #4690, since rsync relies on ssh, but there has been no satisfactory answer to that either, and I'm not willing to let #2138 close without resolution simply because it's been ignored for a year by Microsoft.

I suspect a lot of people have been experiencing this problem and probably just running the work-arounds mentioned in the issues hoping there might be a more durable fix to this someday...but I'm happy to be proven wrong.

@nvsystems
Copy link

If WSL1 is EOL please close this as WONTFIX. If WSL1 is still supported please finally fix this bug!

It's not that hard to reproduce and has been reported by SO MANY people over close to seven years.

@OneBlue
Copy link
Collaborator

OneBlue commented Feb 7, 2024

@bunnie: Can you capture an strace of rsync and its children (strace -f ) to see what the processes get stuck on ?

@bunnie
Copy link
Author

bunnie commented Feb 15, 2024

It's re-opened at #11157. Did not realize issues automatically close like this after a week. It's been a busy week on my side, plus CNY etc.

Must be nice to come back after Christmas break and have all your issues closed because authors aren't actively updating their tickets...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants