Git clone hangs over wireguard tunnel

Bug #1988029 reported by Vuong V
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu WSL Integration
New
Undecided
Unassigned

Bug Description

When connected over a wireguard tunnel git hangs when cloning any **github** repository.

This happens when git operations are run over ssh not https.

When various debug/trace flags (GIT_TRACE_PACKET, GIT_TRACE, GIT_CURL_VERBOSE) are turned on
and git clone is run, this is the last message before the operation hangs:

> 14:59:21.820712 git.c:455 trace: built-in: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 1167 on machine' --check-self-contained-and-connected

I've seen this issue reported once before:

https://public-inbox<email address hidden>/

In that instance, the culprit was deemed to be the sshd running on the git server.

I'm reporting it here because I'm only seeing it in Ubuntu (WSL),
but it's quite possible that its github's sshd server, or even my ISP's
infrastructure. Or a combination of all of the above.

==========

How to reproduce:

This can be reproduced consistently on my end.

1. Login to Windows 10
2. Connect to a wireguard server
3. Open Windows Terminal
4. Start Ubuntu 22.04.1 LTS (WSL2)
5. Export debug/tracing flags: GIT_TRACE_PACKET, GIT_TRACE, GIT_CURL_VERBOSE
6. Run git clone (SSH) eg. git clone <email address hidden>:github/gh-net.git
7. Watch trace. Trace will stop at line: --check-self-contained-and-connected
8. Git clone will hang indefinitely > 10 minutes

==========

Environment:

* Windows 10: Version 21H2 (OS Build 19044.1889)
* Client WSL OS: Ubuntu 22.04.1 LTS (5.10.102.1-microsoft-standard-WSL2)
* SSH: OpenSSH_8.9p1 Ubuntu-3, OpenSSL 3.0.2 15 Mar 2022
* git: git version 2.34.1
* Wireguard Client: 0.5.3
* Wireguard Host OS: Ubuntu 22.04.1 LTS (5.15.0-46-generic)
* Internet connection: FTTC (ppoe)
* WAN router: OpenWrt 21.02.3

==========

Notes:

* This issue only happens when cloning from github.com
* This issue does **NOT** happen when cloning from gitlab or bitbucket
* This issue only happens when client WSL OS is Ubuntu (20.04, 22.04)
* This issue does **NOT** happen in Ubuntu 22.04 (not WSL)
* This issue does not happen in Windows (git version 2.37.2.windows.2)
* In Oracle Linux 8.6 (WSL), the first clone will fail (hang).
* Press CTL+C, then try git clone again. It will now work.
* Interestingly, all git clones even in Ubuntu 22.04.1 LTS (WSL) will now work.

Vuong V (kinekt4)
tags: added: ssl
Vuong V (kinekt4)
description: updated
Revision history for this message
Vuong V (kinekt4) wrote :

I have found a workaround. I ran the following in WSL/2:

sudo ifconfig eth0 mtu 1380

https://github.com/microsoft/WSL/issues/4698#issuecomment-628682785

Revision history for this message
Vuong V (kinekt4) wrote :

Please close.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.