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

Skip to content

fix: correct gvisor replace directive to match module path (#26822) - #26923

Merged
denisra merged 1 commit into
release/2.33from
backport/26822-to-2.33
Jul 1, 2026
Merged

fix: correct gvisor replace directive to match module path (#26822)#26923
denisra merged 1 commit into
release/2.33from
backport/26822-to-2.33

Conversation

@denisra

@denisra denisra commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Backport of #26822

Original PR: #26822 — fix: correct gvisor replace directive to match module path
Merge commit: f77d006
Requested by: @denisra

Note: The automated backport workflow failed for 2.33 due to a GitHub permissions timeout during git push (Unable to determine if workflow can be created or updated due to timeout). This PR was created manually with the conflict resolved via go mod tidy.


Generated by Coder Agents on behalf of @denisra

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

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.

```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
```

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 #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/[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

</details>

---
*Generated by [Coder Agents](https://coder.com/agents) on behalf of
@denisra*

(cherry picked from commit f77d006)
@denisra denisra closed this Jul 1, 2026
@denisra
denisra deleted the backport/26822-to-2.33 branch July 1, 2026 16:56
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 1, 2026
@denisra denisra reopened this Jul 1, 2026
@denisra denisra closed this Jul 1, 2026
@denisra denisra reopened this Jul 1, 2026
@denisra
denisra requested a review from sreya July 1, 2026 17:29
@denisra
denisra merged commit fcf3f58 into release/2.33 Jul 1, 2026
83 of 89 checks passed
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.

2 participants