mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: correct gvisor replace directive to match module path (#26822)
## 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 ```diff -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. Fixes https://github.com/coder/coder/issues/20885 --- <details> <summary>Investigation context</summary> - The coder/gvisor fork (commit `7a658db7b714`) declares `module gvisor.dev/gvisor` in its go.mod - Customer runtime stack traces show `gvisor.dev/gvisor@v0.0.0-20240509041132-65b30f7869dc` (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 </details> --- *Generated by [Coder Agents](https://coder.com/agents) on behalf of @denisra*
This commit is contained in:
@@ -45,7 +45,7 @@ replace github.com/tailscale/wireguard-go => github.com/coder/wireguard-go v0.0.
|
||||
|
||||
// We use a fork to fix an integer overflow issue that causes occasional crashes in workspace agents.
|
||||
// See https://github.com/coder/coder/issues/20885
|
||||
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
|
||||
|
||||
// Switch to our fork that imports fixes from http://github.com/tailscale/ssh.
|
||||
// See: https://github.com/coder/coder/issues/3371
|
||||
|
||||
Reference in New Issue
Block a user