Skip to content

fix: handle dead VMM and scan all urunc TAP devices during cleanup#476

Open
goyalpalak18 wants to merge 1 commit intourunc-dev:mainfrom
goyalpalak18:fix/network-leak-cleanup
Open

fix: handle dead VMM and scan all urunc TAP devices during cleanup#476
goyalpalak18 wants to merge 1 commit intourunc-dev:mainfrom
goyalpalak18:fix/network-leak-cleanup

Conversation

@goyalpalak18
Copy link
Contributor

Description

Fixed the issue where vmm.Stop() was returning an error if the process was already dead (like from a crash), which prevented network cleanup from running.

I updated killProcess in utils.go to treat ESRCH (process not found) as a success. If it's gone, it's gone, so we can proceed.

Also refactored network.Cleanup to actually scan for any tap.*_urunc interfaces instead of looking for a hardcoded string. This handles leftover devices much better.

Huge thanks to @sidneychang for the scanning logic in #407 — I integrated that here.

Related issues

Fixes #408
Integrates #407

How was this tested?

  • make lint passes.
  • Verified that killing the VMM process manually now properly triggers the network cleanup instead of failing.

@netlify
Copy link

netlify bot commented Feb 12, 2026

Deploy Preview for urunc ready!

Name Link
🔨 Latest commit cfeaadb
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6994968b4378ab000759328c
😎 Deploy Preview https://deploy-preview-476--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@cmainas cmainas left a comment

Choose a reason for hiding this comment

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

Hello @goyalpalak18 ,

the changes look good. I have only left two small comments. Do not forget to fix the linting issues and rebase over main.

Signed-off-by: goyalpalak18 <goyalpalak1806@gmail.com>
@goyalpalak18 goyalpalak18 force-pushed the fix/network-leak-cleanup branch from cce0f5c to cfeaadb Compare February 17, 2026 16:25
@goyalpalak18
Copy link
Contributor Author

Thanks @cmainas ! Just pushed these updates and rebased over main. Let me know if everything looks good now.

Copy link
Contributor

@cmainas cmainas left a comment

Choose a reason for hiding this comment

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

Thank you @goyalpalak18 for the changes. One thing I noticed is that if something fails during a cleanup of a single device then the function returns ignoring the rest. So it would be better to log the error but not return immediately but later at the end of the loop. Also, please rebase over main, so we can merge.

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.

Network cleanup fails when VMM process is already dead

2 participants