Skip to content

Conversation

@mateusz-markowicz
Copy link

This change was missing in the original patch causing issues with GoLang time functions on chromebooks after device wakes up from sleep and leading to failed connections.

After running below code on Chromebook after it was sleeping since boot

timestamp := time.Now()
elapsed := time.Since(timestamp)

elapsed will have a difference between CLOCK_MONOTONIC and CLOCK_BOOTTIME which is the time device was sleeping since boot. It should be reproducible on any device with arm64 and where CLOCK_MONOTONIC and CLOCK_BOOTTIME can give different values. This behavior leads to incorrectly testing expiry for keypairs and consequently failed connections.

Issue seems to be reported here:
https://www.reddit.com/r/chromeos/comments/r2t1x4/chromeos_update_breaks_wireguard_android_vpn_apps/

zx2c4 and others added 2 commits October 22, 2023 02:35
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This change was missing in the original patch causing issues with
GoLang time functions on chromebooks after device wakes up from sleep
and leading to failed connections.

Signed-off-by: Mateusz Markowicz <mateusz.markowicz@proton.ch>
@mateusz-markowicz
Copy link
Author

@zx2c4 you guys might find this interesting, without it wireguard-android is pretty much unusable on x86_64 (on chromebooks)

@zx2c4-bot zx2c4-bot force-pushed the master branch 3 times, most recently from 91cdc96 to 57bd0ec Compare May 5, 2025 14:20
@zx2c4
Copy link
Member

zx2c4 commented May 6, 2025

I think we're already doing this in the latest upstream master. (I'll make an app release soon.)

@zx2c4 zx2c4 closed this May 6, 2025
@mateusz-markowicz
Copy link
Author

@zx2c4 are you sure? I don't see the change in your repos and issue can still be reproduced on your newest client (1.0.20250531)

@zx2c4
Copy link
Member

zx2c4 commented Jun 19, 2025

@mateusz-markowicz
Copy link
Author

Change in src/runtime/time_linux_amd64.s (time·now) that's using CLOCK_MONOTONIC. See https://github.com/golang/go/blob/master/src/runtime/time_linux_amd64.s#L49

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

Successfully merging this pull request may close these issues.

2 participants