Skip to content

Forcibly exit VNet admin process if network stack doesn't shut down after timeout#58298

Merged
gzdunek merged 3 commits intomasterfrom
gzdunek/forceibly-exit-admin-process
Aug 27, 2025
Merged

Forcibly exit VNet admin process if network stack doesn't shut down after timeout#58298
gzdunek merged 3 commits intomasterfrom
gzdunek/forceibly-exit-admin-process

Conversation

@gzdunek
Copy link
Copy Markdown
Contributor

@gzdunek gzdunek commented Aug 25, 2025

Closes #56834

I tried to reproduce the issue, but unfortunately with no luck.
I implemented the proposed solution: better logging and forcibly exiting the admin process after a timeout.

changelog: Fixed an issue where VNet could not start because of "VNet is already running" error

Copy link
Copy Markdown
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this by adding yet another goroutine to the errgroup that hangs forever and the code does its job. I tried it using an actual VNet daemon in a VM.

Comment thread lib/vnet/admin_process_darwin.go Outdated
Comment thread lib/vnet/network_stack.go
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nklaassen Do you happen to know why the wireguard package isn't getting updated? I'm not familiar with our upgrade process for Go packages, but I see that we're on an old version. In May there were multiple commits in the device package that could be related to deadlocks. https://git.zx2c4.com/wireguard-go/log/

teleport/go.mod

Lines 242 to 243 in 387e4ef

golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
golang.zx2c4.com/wireguard/windows v0.5.3

Comment thread lib/vnet/admin_process_darwin.go
@gzdunek gzdunek added this pull request to the merge queue Aug 27, 2025
Merged via the queue into master with commit d694f79 Aug 27, 2025
40 checks passed
@gzdunek gzdunek deleted the gzdunek/forceibly-exit-admin-process branch August 27, 2025 09:51
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@gzdunek See the table below for backport results.

Branch Result
branch/v17 Create PR
branch/v18 Create PR

mmcallister pushed a commit that referenced this pull request Sep 22, 2025
…fter timeout (#58298)

* Forcibly exit VNet admin process if network stack doesn't shut down after timeout

* Add better logging

* Review comments
@tangyatsu tangyatsu mentioned this pull request Mar 13, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Forcibly exit VNet admin process if network stack doesn't shut down after timeout

3 participants