carlos / platform Public

CI runner: main red on environment failures (cross-device TMPDIR, isolated root fixture, disk full) open

Main 01d6ca78 is red on CI, and so is every branch I pushed today, including a docs-only one (design-stateless-replicas-scale, 2d7fcb29). The failures are in the runner's environment, not the code:

  • Disk full on main's first run: unitsync_test.go:324: SetEnv: write config.json: no space left on device, and then database or disk is full across TestSyncUnits*.
  • Cross-device link on the rerun (job 5685): claim_filesystem_linux_test.go:100: link /home/ci/gotmp/.../victim /tmp/cfs.../launch.json: invalid cross-device link. The runner's GOTMPDIR (/home/ci/gotmp) and /tmp are now on different filesystems.
  • isolated root fixture: exit status 1 in about 40 internal/host tests (TestR2*, TestPlan14Fix*, TestServingParkNestedBindMount). These probably share the same cause, or a namespace or mount permission change.
  • Load-sensitive timing tests: TestSweepBurstOf252MeetsTheDeadline (252 publishes took 3m26s of store time; it also fails on DOCS-T1 against unmodified main, so it may need a look of its own), TestDemoAPIAliasStreaming (3 s deadline; passes locally), plus several activator worker tests.

Effect: amadan branch merge refuses every branch, so nothing can land until the runner is fixed. Filed by the #892 session, which has two branches reviewed and waiting: the design and S1. Whoever operates the CI runner should look at its disk, its TMPDIR and GOTMPDIR placement, and its mount namespaces.

Root cause found. It is not the w-lane workers: carlos/platform runs on hosted CI (one EC2 machine per job), and two amadan changes went live there today. acd2bfd (14:10) put /tmp on a tmpfs, and 6539823 (14:18) exported GOTMPDIR=/home/ci/gotmp to keep Go's build scratch on the 20 GiB EBS root. Go's t.TempDir() follows GOTMPDIR (testing.go), so test temp dirs moved to disk. That one change explains all four symptoms:

  1. Cross-device link: t.TempDir() on the EBS root, os.TempDir() on the tmpfs.
  2. "isolated root fixture: exit status 1": the chrooted child calls t.TempDir(), which stats the host's GOTMPDIR path, and that path doesn't exist inside the chroot. Reproduced on DOCS-T1: TestR2UnguardedCrashRollback fails with GOTMPDIR set and passes without it.
  3. Disk full: test data now lands on the 20 GiB root.
  4. Slow tests: SQLite fsyncs on EBS again, about 20 times slower.

Fix: amadan branch hosted-no-gotmpdir stops setting GOTMPDIR. Astra is reviewing it in amadan/amadan #133. After the merge comes a hub deploy, then a rerun of carlos/platform main. Nothing in carlos/platform needs to change.

Update, 16:05 UTC. After the worker replacement (859ab7e, per 8a3d302), S1's run (job on 64e7aba5) no longer shows the disk, cross-device or isolated-root-fixture failures. Two failures remain:

  • TestDemoAPIAliasStreaming (internal/edge, the h2=false "early" subtests, 3 s context deadline exceeded at demoapiintegration_test.go:359). It has failed in all five CI runs today, across three branches including docs-only ones. It passes locally on DOCS-T1 with -count=2. So it is either load on the runner or a timing assumption in the test that the runner now breaks every time. It needs an owner if it does not clear on its own.
  • TestDemoServingStreamConsole (internal/console, demooperatortest.go:286: EOF). Seen once so far. Reruns are queued for design-stateless-replicas-scale (job 5701) and stateless-scale-1-memory-env (job 5702).

Runner side fixed. amadan main 2c2fc7d (branch hosted-no-gotmpdir, Astra-approved in amadan/amadan #135) keeps Go's build scratch on disk through $GOROOT/go.env and no longer exports GOTMPDIR, so t.TempDir() stays on the /tmp tmpfs. The hosted dispatcher has run it since about 16:30. Confirmed on hosted runs 5698, 5699 (amadan-13's measurement) and 5708: no cross-device links, no "isolated root fixture" failures, no full disk. The gate takes about 230 s at 32 vCPU. carlos/platform is on hosted CI at 32 vCPU again.

Main 01d6ca78 is still red, on carlos/platform's own tests rather than the environment. Main was already flaky before today: 5c9fc1c2 failed on the fleet with TestDevboxListTable and TestUnitTenantWakeServesHeldRequest. What fails now differs from run to run:

  • Timing bounds: TestDemoAPIAliasStreaming (3 s deadline; fails on the fleet and on hosted in every run), TestDBForwardLongRequestThroughTheEdge, TestOperatorCountsAtScale (183 ms against 150 ms), TestDemoServingStreamConsole (EOF after "demo-build: starting timed out"), TestHADepartureProductionWiring/twofixedreceivers, TestDBForwardThroughTheBackhaulHop (helper exit 1, stderr empty).
  • TestRegistryChildPinnedExecutableAndMinimalFDs exits 22 (an inherited fd that isn't eventpoll/eventfd) on both the fleet and hosted. It passes alone on DOCS-T1 under Go 1.26.10 and 1.26.11, even with a stray fd inherited, so it looks like a race with parallel tests in internal/host opening a non-CLOEXEC fd between registryChildCloseExec() and the exec. On the fleet (job 5695, a worker shared with titogo) about 15 deadline tests failed.

These need carlos/platform fixes (looser bounds or test isolation), not runner changes. Whoever owns those tests should take them. A branch that fixes them gets its own CI, so it can land.

Go net/http regression notes (NOT filed upstream: Paul's call, 2026-11-11). This is the draft and the repro, kept here only. The pin is branch go-pin-1.26.10. Drop it once a Go 1.26.12 or 1.27.5 changelog entry fixes net/http body locking, with TestDemoAPIAliasStreaming's early subtests as the witness.

net/http: server deadlocks writing a response while a concurrent goroutine reads an Expect: 100-continue body (regression in 1.26.11)

Go version

go1.26.11, go1.27.3, go1.27.4 (linux/amd64 and linux/arm64). go1.26.10 is fine.

What did you do?

A handler starts a goroutine that reads the request body (as httputil.ReverseProxy's Transport writeLoop does) and then writes an early response (e.g. a 401 from the backend) before the client has sent any body. The client sent Expect: 100-continue.

// A handler that answers while another goroutine is still reading the
// request body (as httputil.ReverseProxy does when the backend replies
// early) hangs on Go 1.26.11 when the client sent Expect: 100-continue.
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/http/httptest"
	"os"
	"time"
)

func main() {
	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		go io.Copy(io.Discard, r.Body) // a concurrent reader, blocked: the client sends nothing yet
		time.Sleep(100 * time.Millisecond)
		w.WriteHeader(http.StatusUnauthorized) // the early refusal
		io.WriteString(w, "no")
	}))
	defer ts.Close()

	pr, pw := io.Pipe() // an upload that has not started
	defer pw.Close()
	req, _ := http.NewRequest("POST", ts.URL, pr)
	req.Header.Set("Expect", "100-continue")

	done := make(chan error, 1)
	go func() {
		resp, err := http.DefaultClient.Do(req)
		if err == nil {
			fmt.Println("status", resp.StatusCode)
			resp.Body.Close()
		}
		done <- err
	}()
	select {
	case err := <-done:
		fmt.Println("ok, err =", err)
	case <-time.After(3 * time.Second):
		fmt.Println("HANG: no response after 3s")
		os.Exit(1)
	}
}

What did you see happen?

On go1.26.11 the response is never sent: HANG: no response after 3s. A goroutine dump shows conn.serve → response.finishRequest → chunkWriter.Write → chunkWriter.writeHeader → body.bodyRemains waiting on body.mu, which body.Read holds while it is blocked on the network inside expectContinueReader.Read.

What did you expect to see?

status 401, as on go1.26.10, where the check was the lock-free expectContinueReader.sawEOF. The change appears to come from the server.go refactor that went into 1.26.11 with the GO-2026-6859 fix (w.ecReader != nil && w.reqBody.bodyRemains() in writeHeader).

DBForward e2e flakes on CI twice on 2026-11-14, on branches that don't touch DB forwarding:

  • TestDBForwardThroughTheBackhaulHop (branch stateless-unlabelled-guard, 9219e42c): passed 3/3 locally;
  • TestDBForwardLongRequestThroughTheEdge (branch sr-guard-copy-approved, 80a12b8d; docs and a test list only): "client side ended ... use of closed network connection" after "restored to 2 in 20.01s".

Both were rerun by an empty push.