From dbf8d3d9c827b4b67e7e4e13dbbddc38ba556a8e Mon Sep 17 00:00:00 2001 From: Adin Schmahmann Date: Fri, 27 Feb 2026 11:04:40 -0500 Subject: [PATCH] fix(windows): revert update to Go 1.26 (#11215) * Revert "feat: update to Go 1.26 (#11189)" This reverts commit 36c29c55f02fc5bb22b0e3c4e08911d96905ad38. * chore: go mod tidy * fix: keep go 1.25-compatible modernizations, add v0.40.1 changelog - config/autoconf.go: restore math/rand/v2 (available since go 1.22) - core/corehttp/p2p_proxy.go: restore httputil.ReverseProxy.Rewrite (available since go 1.21) - core/commands/name/name.go: restore %d format for ValidityType int64 - docs/changelogs/v0.40.md: keep shipped v0.40.0 notes intact, add v0.40.1 section --------- Co-authored-by: Marcin Rataj (cherry picked from commit 550d3b607703a2beae009913355782728425a497) --- Dockerfile | 2 +- docs/changelogs/v0.40.md | 22 ++++++++++++++++++++++ docs/examples/kubo-as-a-library/go.mod | 2 +- go.mod | 2 +- test/dependencies/go.mod | 2 +- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5f3f4e3e7..6d43beefa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 # Enables BuildKit with cache mounts for faster builds -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.26 AS builder +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.25 AS builder ARG TARGETOS TARGETARCH diff --git a/docs/changelogs/v0.40.md b/docs/changelogs/v0.40.md index 6e20d1c3d..175022350 100644 --- a/docs/changelogs/v0.40.md +++ b/docs/changelogs/v0.40.md @@ -5,6 +5,7 @@ This release was brought to you by the [Shipyard](https://ipshipyard.com/) team. - [v0.40.0](#v0400) +- [v0.40.1](#v0401) ## v0.40.0 @@ -341,6 +342,8 @@ This release is built with [Go 1.26](https://go.dev/doc/go1.26). You should see lower memory usage and reduced GC pauses thanks to the new Green Tea garbage collector (10-40% less GC overhead). Reading block data and API responses is faster due to `io.ReadAll` improvements (~2x faster, ~50% less memory). On 64-bit platforms, heap base address randomization adds a layer of security hardening. +> **Note:** [v0.40.1](#v0401) downgrades to Go 1.25 due to a Windows stability issue. If you run Kubo on Linux or macOS, staying on v0.40.0 is fine and you benefit from Go 1.26's GC improvements. + #### 📦️ Dependency updates - update `go-libp2p` to [v0.47.0](https://github.com/libp2p/go-libp2p/releases/tag/v0.47.0) (incl. [v0.46.0](https://github.com/libp2p/go-libp2p/releases/tag/v0.46.0)) @@ -620,3 +623,22 @@ You should see lower memory usage and reduced GC pauses thanks to the new Green | [@willscott](https://github.com/willscott) | 1 | +1/-1 | 1 | | [@lbarrettanderson](https://github.com/lbarrettanderson) | 1 | +1/-1 | 1 | | [@filipremb](https://github.com/filipremb) | 1 | +1/-1 | 1 | + +## v0.40.1 + +### 🔦 Highlights + +#### Windows stability fix + +If you run Kubo on Windows, v0.40.0 can crash after running for a while. The daemon starts fine and works normally at first, but eventually hits a memory corruption in Go's network I/O layer and dies. This is likely caused by an upstream Go 1.26 regression in overlapped I/O handling that has known issues ([go#77142](https://github.com/golang/go/issues/77142), [#11214](https://github.com/ipfs/kubo/issues/11214)). + +This patch release downgrades the Go toolchain from 1.26 to 1.25, which does not have this bug. If you are running Kubo on Windows, upgrade to v0.40.1. We will switch back to Go 1.26.x once the upstream fix lands. + +### 📝 Changelog + +
Full Changelog v0.40.1 + +- github.com/ipfs/kubo: + - chore: downgrade to Go 1.25 to fix Windows crash ([ipfs/kubo#11215](https://github.com/ipfs/kubo/pull/11215)) + +
diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index 0b56d2bc3..a0be7d155 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -1,6 +1,6 @@ module github.com/ipfs/kubo/examples/kubo-as-a-library -go 1.26 +go 1.25.0 // Used to keep this in sync with the current version of kubo. You should remove // this if you copy this example. diff --git a/go.mod b/go.mod index cde4e7f54..cfffd2b69 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ipfs/kubo -go 1.26 +go 1.25.0 require ( bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc diff --git a/test/dependencies/go.mod b/test/dependencies/go.mod index 798c97df1..bb890a1c1 100644 --- a/test/dependencies/go.mod +++ b/test/dependencies/go.mod @@ -1,6 +1,6 @@ module github.com/ipfs/kubo/test/dependencies -go 1.26 +go 1.25.0 replace github.com/ipfs/kubo => ../../