Development discussion of WireGuard
 help / color / mirror / Atom feed
* Data Connection Lost Win10 (Server) Win10 (Clients) 37
@ 2019-12-28 21:03 eric brandl
  2019-12-30 11:03 ` Jason A. Donenfeld
  2019-12-30 21:01 ` Blaok
  0 siblings, 2 replies; 5+ messages in thread
From: eric brandl @ 2019-12-28 21:03 UTC (permalink / raw)
  To: wireguard


[-- Attachment #1.1: Type: text/plain, Size: 2384 bytes --]

Issue I am having is sporadically around every 5 to 30 min all peer
connections no longer send traffic over them, and the only way to get them
working again is to restart the WireGuard server (Win 10) .


The log shows this:

2019-12-28 01:39:46.625: [TUN] [GameNet] Failed to write packet to TUN
device: file already closed

2019-12-28 01:39:46.629: [TUN] [GameNet] Binding v4 socket to interface 16
(blackhole=false)

2019-12-28 01:39:46.631: [TUN] [GameNet] Failed to write packet to TUN
device: file already closed

2019-12-28 01:39:46.649: [TUN] [GameNet] Failed to write packet to TUN
device: file already closed

2019-12-28 01:39:46.668: [TUN] [GameNet] Failed to write packet to TUN
device: file already closed

2019-12-28 01:39:46.692: [TUN] [GameNet] Failed to write packet to TUN
device: file already closed

2019-12-28 01:39:46.714: [TUN] [GameNet] Failed to write packet to TUN
device: file already closed

2019-12-28 01:39:46.730: [TUN] [GameNet] Failed to write packet to TUN
device: file already closed


Server Config:

[Interface]
PrivateKey = SNIP
ListenPort = 5687
Address = 10.152.152.1/24
MTU = 1360

[Peer]
PublicKey = BMIr6jiTNpu1wiSAqTLBUBFnM3DBW+RMdvapkmnFAiY=
AllowedIPs = 10.152.152.2/32

[Peer]
PublicKey = gY0SvOX8lKfLkMXHIwA6pNnB8ooc36vCOPlQ0WmR5Es=
AllowedIPs = 10.152.152.3/32

[Peer]
PublicKey = NcbtXceq1dh3khRv+YXXXw9RmJJH+r0acVIGbJ3qWSY=
AllowedIPs = 10.152.152.4/32

[Peer]
PublicKey = LkMrfhjHOz6VgL9gTsBkcahkw++RMYokMbJnViQ9xVM=
AllowedIPs = 10.152.152.5/32

[Peer]
PublicKey = YAKEhGM4Wr1SYSb197ugyV7IKqUOh+Jzpg7NVNLa3AM=
AllowedIPs = 10.152.152.6/32

[Peer]
PublicKey = MZ1ycd1MdUvFUDpRxgY0hc7/jwTP9TuuYB6uwmyYdmQ=
AllowedIPs = 10.152.152.7/32

[Peer]
PublicKey = Re5hkZG10PuN993GVRkkYCjjnyKyk96SCN4vFP5l/mM=
AllowedIPs = 10.152.152.8/32

[Peer]
PublicKey = Yrx9W1PC60Uw9tpsRIByV0U+aW3eE210X1LCxTnk21w=
AllowedIPs = 10.152.152.10/32

Example Client Config:

[Interface]
PrivateKey = generated_private_key
ListenPort = 5687
Address = 10.152.152.3/24
MTU = 1360

[Peer]
PublicKey = wQE513lYAgeLMcA72rGUnAcqknTYRlC2+oyWKI4Q1j4=
AllowedIPs = 10.152.152.0/24
Endpoint = SNIP:5687
PersistentKeepalive = 40

Things I have tried:

Rolling back to 35

Changing MTU

Switching NIC in Proxmox from Intel to Realtek and back


Other Notes:

With only two peers connected it seems to be less of an issue, with 8 or so
connected we get this issue quicker.

[-- Attachment #1.2: Type: text/html, Size: 10716 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Data Connection Lost Win10 (Server) Win10 (Clients) 37
  2019-12-28 21:03 Data Connection Lost Win10 (Server) Win10 (Clients) 37 eric brandl
@ 2019-12-30 11:03 ` Jason A. Donenfeld
  2019-12-30 21:01 ` Blaok
  1 sibling, 0 replies; 5+ messages in thread
From: Jason A. Donenfeld @ 2019-12-30 11:03 UTC (permalink / raw)
  To: eric brandl; +Cc: WireGuard mailing list

Please send a complete log, not just an excerpt.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Data Connection Lost Win10 (Server) Win10 (Clients) 37
  2019-12-28 21:03 Data Connection Lost Win10 (Server) Win10 (Clients) 37 eric brandl
  2019-12-30 11:03 ` Jason A. Donenfeld
@ 2019-12-30 21:01 ` Blaok
  2020-01-08  7:40   ` Jason A. Donenfeld
  1 sibling, 1 reply; 5+ messages in thread
From: Blaok @ 2019-12-30 21:01 UTC (permalink / raw)
  To: eric brandl; +Cc: wireguard

I am experiencing the same issue. For me the problem occurs much less
frequently (one or two times per day) so it wasn't too much trouble to
me. My windows client is configured with 8 peers but most of the time
it communicates with only one of them. There is nothing other than
"Failed to write packet to TUN device: file already closed" in the log
that is related to the issue (unless there is debugging log that I did
not turn on).

I did some research myself earlier. I'm pretty sure "file already
closed" was reported by and only by
https://git.zx2c4.com/wireguard-go/tree/tun/tun_windows.go#n224 and
https://git.zx2c4.com/wireguard-go/tree/tun/tun_windows.go#n229 in the
Write function. However, I was unable to make anything to fix the
problem other than invoking a cmd script to reset the whole interface.
I think https://git.zx2c4.com/wireguard-go/commit/?id=2b242f93932e1c4ab8b45dd0f628dd4fe063699b
partially solves the problem. Without this commit, the problem can be
reproduced simply by making a large volume of traffic in a short
period (e.g. 100Mbps for a few minutes). Now with this commit I am
unable to manually reproduce it anymore, but that "Failed to write
packet to TUN device: file already closed" still happens every several
days.

Blaok

On Mon, Dec 30, 2019 at 1:52 AM eric brandl <ericb0813@gmail.com> wrote:
>
> Issue I am having is sporadically around every 5 to 30 min all peer connections no longer send traffic over them, and the only way to get them working again is to restart the WireGuard server (Win 10) .
>
>
> The log shows this:
>
> 2019-12-28 01:39:46.625: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.629: [TUN] [GameNet] Binding v4 socket to interface 16 (blackhole=false)
>
> 2019-12-28 01:39:46.631: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.649: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.668: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.692: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.714: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.730: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
>
> Server Config:
>
> [Interface]
> PrivateKey = SNIP
> ListenPort = 5687
> Address = 10.152.152.1/24
> MTU = 1360
>
> [Peer]
> PublicKey = BMIr6jiTNpu1wiSAqTLBUBFnM3DBW+RMdvapkmnFAiY=
> AllowedIPs = 10.152.152.2/32
>
> [Peer]
> PublicKey = gY0SvOX8lKfLkMXHIwA6pNnB8ooc36vCOPlQ0WmR5Es=
> AllowedIPs = 10.152.152.3/32
>
> [Peer]
> PublicKey = NcbtXceq1dh3khRv+YXXXw9RmJJH+r0acVIGbJ3qWSY=
> AllowedIPs = 10.152.152.4/32
>
> [Peer]
> PublicKey = LkMrfhjHOz6VgL9gTsBkcahkw++RMYokMbJnViQ9xVM=
> AllowedIPs = 10.152.152.5/32
>
> [Peer]
> PublicKey = YAKEhGM4Wr1SYSb197ugyV7IKqUOh+Jzpg7NVNLa3AM=
> AllowedIPs = 10.152.152.6/32
>
> [Peer]
> PublicKey = MZ1ycd1MdUvFUDpRxgY0hc7/jwTP9TuuYB6uwmyYdmQ=
> AllowedIPs = 10.152.152.7/32
>
> [Peer]
> PublicKey = Re5hkZG10PuN993GVRkkYCjjnyKyk96SCN4vFP5l/mM=
> AllowedIPs = 10.152.152.8/32
>
> [Peer]
> PublicKey = Yrx9W1PC60Uw9tpsRIByV0U+aW3eE210X1LCxTnk21w=
> AllowedIPs = 10.152.152.10/32
>
> Example Client Config:
>
> [Interface]
> PrivateKey = generated_private_key
> ListenPort = 5687
> Address = 10.152.152.3/24
> MTU = 1360
>
> [Peer]
> PublicKey = wQE513lYAgeLMcA72rGUnAcqknTYRlC2+oyWKI4Q1j4=
> AllowedIPs = 10.152.152.0/24
> Endpoint = SNIP:5687
> PersistentKeepalive = 40
>
> Things I have tried:
>
> Rolling back to 35
>
> Changing MTU
>
> Switching NIC in Proxmox from Intel to Realtek and back
>
>
> Other Notes:
>
> With only two peers connected it seems to be less of an issue, with 8 or so connected we get this issue quicker.
>
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Data Connection Lost Win10 (Server) Win10 (Clients) 37
  2019-12-30 21:01 ` Blaok
@ 2020-01-08  7:40   ` Jason A. Donenfeld
  2020-01-15 23:49     ` Blaok
  0 siblings, 1 reply; 5+ messages in thread
From: Jason A. Donenfeld @ 2020-01-08  7:40 UTC (permalink / raw)
  To: Blaok, eric brandl; +Cc: WireGuard mailing list

Thanks for the reports. This should be fixed in v0.0.38. Please let me
know the results of your tests.

Jason
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Data Connection Lost Win10 (Server) Win10 (Clients) 37
  2020-01-08  7:40   ` Jason A. Donenfeld
@ 2020-01-15 23:49     ` Blaok
  0 siblings, 0 replies; 5+ messages in thread
From: Blaok @ 2020-01-15 23:49 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: eric brandl, WireGuard mailing list

I have been using v0.0.38 for a week and haven't experienced any
problem. Thank you so much!


On Tue, Jan 7, 2020 at 11:41 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> Thanks for the reports. This should be fixed in v0.0.38. Please let me
> know the results of your tests.
>
> Jason
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-30  2:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-28 21:03 Data Connection Lost Win10 (Server) Win10 (Clients) 37 eric brandl
2019-12-30 11:03 ` Jason A. Donenfeld
2019-12-30 21:01 ` Blaok
2020-01-08  7:40   ` Jason A. Donenfeld
2020-01-15 23:49     ` Blaok

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).