Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: correct gvisor replace directive to match module path - #26750

Closed
denis-at-coder wants to merge 4 commits into
mainfrom
denis/fix-gvisor-replace-path
Closed

fix: correct gvisor replace directive to match module path#26750
denis-at-coder wants to merge 4 commits into
mainfrom
denis/fix-gvisor-replace-path

Conversation

@denis-at-coder

Copy link
Copy Markdown

Summary

Fixes the gvisor replace directive in go.mod to target the correct module path.

Problem

PR #23055 added a replace directive to use the coder/gvisor fork (which fixes an integer overflow causing panic: length < 0 crashes). However, the directive targeted the wrong module path:

replace gvisor.dev => github.com/coder/gvisor v0.0.0-20260313164934-7a658db7b714

The actual module path declared in gvisor's go.mod is gvisor.dev/gvisor, not gvisor.dev. Go module replace directives require an exact module path match, so the previous directive was a no-op and the patched fork was never used.

Fix

-replace gvisor.dev => github.com/coder/gvisor v0.0.0-20260313164934-7a658db7b714
+replace gvisor.dev/gvisor => github.com/coder/gvisor v0.0.0-20260313164934-7a658db7b714

Validation

Verified locally with go list -m:

Before (no-op replace):

$ go list -m gvisor.dev/gvisor
gvisor.dev/gvisor v0.0.0-20240509041132-65b30f7869dc

After (correct replace):

$ go list -m gvisor.dev/gvisor
gvisor.dev/gvisor v0.0.0-20240509041132-65b30f7869dc => github.com/coder/gvisor v0.0.0-20260313164934-7a658db7b714

The => confirms the fork is now applied. go mod tidy and go build ./tailnet/... ./codersdk/workspacesdk/... both pass.

Note: go.sum will need a go mod tidy run to add the github.com/coder/gvisor checksum. CI should flag this.

Fixes #20885

Investigation context
  • The coder/gvisor fork (commit 7a658db7b714) declares module gvisor.dev/gvisor in its go.mod
  • Customer runtime stack traces show gvisor.dev/[email protected] (unpatched upstream), confirming the fork was not applied
  • The crash is panic: length < 0 in gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).splitSeg
  • Related Linear ticket: ENT-118

Generated by Coder Agents on behalf of @denis-at-coder

The replace directive was targeting 'gvisor.dev' but the actual module
path declared in gvisor's go.mod is 'gvisor.dev/gvisor'. Since Go
module replace directives require an exact module path match, the
previous directive was a no-op, and the patched fork was never used.

Fixes #20885
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


1 out of 2 committers have signed the CLA.
✅ (denisra)[https://github.com/denisra]
@doc-check[bot]
doc-check[bot] seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@denis-at-coder
denis-at-coder marked this pull request as draft June 26, 2026 15:30
@denisra

denisra commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

I have read the CLA Document and I hereby sign the CLA

cdrci2 added a commit to coder/cla that referenced this pull request Jun 29, 2026
@denisra denisra assigned denisra and unassigned denis-at-coder Jun 29, 2026
@denisra denisra closed this Jun 29, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Panic after weeks of running

2 participants