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

Windows update TUN issue #1161

Open
Revertron opened this issue Aug 13, 2024 · 2 comments
Open

Windows update TUN issue #1161

Revertron opened this issue Aug 13, 2024 · 2 comments
Labels
bug This shouldn't happen external dependency Related to an external library, i.e. Water windows Operating system-specific

Comments

@Revertron
Copy link
Contributor

This is an ancient bug, but now, with additional logging, we can see where the problem is.

Problem: Windows 10 can't update to cumulative update when Yggdrasil service is enabled (set as automatic start).
Windows is updating to 30%, then restarts, updating to 90% and then stops. Waits for 10 minutes, restarts and cancels the update.

What happens?

2024/08/13 00:25:20 Build name: yggdrasil
2024/08/13 00:25:20 Build version: 0.5.8
2024/08/13 00:25:20 Your public key is 0000000004d5dafd5e7b861d1d51f99994aca238f86b05bad4c32c6d0c4f3e36
2024/08/13 00:25:20 Your IPv6 address is 225:ca89:40a8:611e:78b8:ab81:999a:d4d7
2024/08/13 00:25:20 Your IPv6 subnet is 325:ca89:40a8:611e::/64
2024/08/13 00:25:20 TCP listener started on 192.168.44.100:7743
2024/08/13 00:25:20 Connected outbound: 200:dc42::3fca:8a99:5d66:b660@xxxx:9999, source xxxx:49675
2024/08/13 00:25:20 Connected outbound: 221:97d6:b0a0:1374:d613:a0e0:14a9:d394@xxxx:7743, source xxxx:49676
2024/08/13 00:25:20 Connected outbound: 200:6223::d35b:1fd8:be0d:2841@xxxx:7743, source xxxx:49677
2024/08/13 00:25:20 Connected outbound: 201:128::7e7d:7829:fbd0:972b@xxxx:7743, source xxxx:49678
2024/08/13 00:25:20 TCP admin socket listening on 127.0.0.1:9001
2024/08/13 00:30:25 Error creating TUN: 'Error creating interface: There are no more endpoints available from the endpoint mapper.'
2024/08/13 00:30:29 Trying again
2024/08/13 00:30:29 Waiting for TUN to come up
2024/08/13 00:30:30 Setting up address
2024/08/13 00:30:30 TUN is set up successfully

Most important is here, look at the time:

2024/08/13 00:25:20 TCP admin socket listening on 127.0.0.1:9001
2024/08/13 00:30:25 Error creating TUN: 'Error creating interface: There are no more endpoints available from the endpoint mapper.'

Event viewer shows that service Yggdrasil didn't start and gave some error (no clarification).

The iface, err = wgtun.CreateTUNWithRequestedGUID(ifname, &guid, int(mtu)) line is taking 5 minutes to complete with the error.

I think we need some timeout, or something like that to kill the creation of the TUN, and start over. Or just don't start if we detect that we are in updating state (is it possible?).

@neilalexander
Copy link
Member

Since CreateTUNWithRequestedGUID takes no cancellation context and provides no method to abort, we can't really do anything about this — the return will be blocked on it completing. I guess it needs to be addressed in the upstream Wireguard TUN package.

@Revertron
Copy link
Contributor Author

Found the function: https://git.zx2c4.com/wireguard-go/tree/tun/tun_windows.go#n68
But where do I create an issue for them? :-/

@neilalexander neilalexander added bug This shouldn't happen external dependency Related to an external library, i.e. Water windows Operating system-specific labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This shouldn't happen external dependency Related to an external library, i.e. Water windows Operating system-specific
Projects
None yet
Development

No branches or pull requests

2 participants