From 221b6dd0bd7067406c20d9454fdbdeb70a14df02 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Tue, 23 Jun 2026 07:52:48 -0700 Subject: [PATCH 1/5] pkg/proc: skip TestVariableEvaluation on riscv64 TestVariableEvaluation experiences flaky timeouts on linux/riscv64 during process initialization, similar to TestSetVariable. The test hangs immediately after starting, before any test logic executes, indicating a hang during the native.Launch initialization phase. This is the same root cause as TestSetVariable - a riscv64-specific issue with process initialization, likely in DWARF reading or goroutine cache initialization. Skip this test on riscv64 until the root cause can be investigated. Fixes timeout in TestVariableEvaluation on linux/riscv64. --- pkg/proc/variables_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/proc/variables_test.go b/pkg/proc/variables_test.go index 41b63f5e4a..e484dfd166 100644 --- a/pkg/proc/variables_test.go +++ b/pkg/proc/variables_test.go @@ -114,6 +114,7 @@ func multiLineVar(v *proc.Variable) string { } func TestVariableEvaluation(t *testing.T) { + skipOn(t, "flaky timeout during process initialization", "riscv64") protest.AllowRecording(t) testcases := []struct { name string From d10af7a8d3706317410857965f81316ef4cabab8 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Tue, 23 Jun 2026 14:27:34 -0700 Subject: [PATCH 2/5] proc/test: disable DWARF compression on riscv64 to work around flate hang On riscv64, the Go 1.26.4 stdlib compress/flate decompressor hangs in an infinite loop when decompressing DWARF sections from test fixture binaries. Stack trace shows the hang occurs in: compress/flate.(*decompressor).huffSym compress/flate.(*decompressor).huffmanBlock compress/flate.(*decompressor).Read debug/elf.(*File).DWARF github.com/go-delve/delve/pkg/proc.loadBinaryInfoElf The goroutine is stuck in huffSym's infinite loop trying to decode a Huffman-encoded symbol. This suggests either: 1. The Go linker on riscv64 generates corrupted compressed DWARF data 2. There's a bug in the flate decompressor on riscv64 Workaround: disable DWARF compression for all test fixtures built on riscv64 by adding -ldflags=-compressdwarf=false. This allows tests to run successfully by avoiding the decompression code path entirely. This should fix the TestVariableEvaluation, TestSetVariable, and TestPanickyIterator2 timeouts on riscv64. --- pkg/proc/test/support.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/proc/test/support.go b/pkg/proc/test/support.go index 522c6c2160..223321ed98 100644 --- a/pkg/proc/test/support.go +++ b/pkg/proc/test/support.go @@ -187,6 +187,11 @@ func BuildFixture(t testing.TB, name string, flags BuildFlags) Fixture { buildFlags = append(buildFlags, "-ldflags=-compressdwarf=false") } } + // Disable DWARF compression on riscv64 due to flate decompressor hangs + // in CI: https://delve.teamcity.com/buildConfiguration/Delve_AggregatorBuild/78674 + if runtime.GOARCH == "riscv64" { + buildFlags = append(buildFlags, "-ldflags=-compressdwarf=false") + } if flags&Trimpath != 0 { buildFlags = append(buildFlags, "-trimpath") } From 5f7bfc67c9f9dcac9d559e4a0c3540478e9d6d9a Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Tue, 23 Jun 2026 14:27:58 -0700 Subject: [PATCH 3/5] Revert "pkg/proc: skip TestVariableEvaluation on riscv64" This reverts commit 200ba58e93f3ee8353b069d94ef620fc487f41f4. --- pkg/proc/variables_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/proc/variables_test.go b/pkg/proc/variables_test.go index e484dfd166..41b63f5e4a 100644 --- a/pkg/proc/variables_test.go +++ b/pkg/proc/variables_test.go @@ -114,7 +114,6 @@ func multiLineVar(v *proc.Variable) string { } func TestVariableEvaluation(t *testing.T) { - skipOn(t, "flaky timeout during process initialization", "riscv64") protest.AllowRecording(t) testcases := []struct { name string From d26c67b2a5082f09162cb4501c454d353af0f540 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Tue, 23 Jun 2026 14:27:58 -0700 Subject: [PATCH 4/5] Revert "pkg/proc: skip TestSetVariable on riscv64" This reverts commit 220314de7dde4e62147b2c7932b9d6f6c2eb5a25. --- pkg/proc/variables_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/proc/variables_test.go b/pkg/proc/variables_test.go index 41b63f5e4a..57cc5a2a46 100644 --- a/pkg/proc/variables_test.go +++ b/pkg/proc/variables_test.go @@ -278,7 +278,6 @@ func TestVariableEvaluation2(t *testing.T) { } func TestSetVariable(t *testing.T) { - skipOn(t, "flaky timeout during process initialization", "riscv64") const errorPrefix = "ERROR:" var testcases = []struct { name string From 88b48b918ee62678b622aa8315db786d17347670 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Wed, 24 Jun 2026 10:02:02 -0700 Subject: [PATCH 5/5] Revert "pkg/proc: skip TestPanickyIterator2 on riscv64" This reverts commit 28e0ea14dfb080eef34b61a1f1937ef7c99f86df. The underlying issue causing the timeout is fixed by disabling DWARF compression for riscv64 test fixtures, so the skip is no longer needed. --- pkg/proc/stepping_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/proc/stepping_test.go b/pkg/proc/stepping_test.go index 63ff0dcc54..f67b60ae2b 100644 --- a/pkg/proc/stepping_test.go +++ b/pkg/proc/stepping_test.go @@ -1049,7 +1049,6 @@ func TestRangeOverFuncNext(t *testing.T) { }) t.Run("TestPanickyIterator2", func(t *testing.T) { - skipOn(t, "flaky stepping timeout", "riscv64") testseq2intl(t, fixture, grp, p, nil, []seqTest{ funcBreak(t, "main.TestPanickyIterator2"), {contContinue, 125}, @@ -1604,7 +1603,6 @@ func TestRangeOverFuncNextInlined(t *testing.T) { }) t.Run("TestPanickyIterator2", func(t *testing.T) { - skipOn(t, "flaky stepping timeout", "riscv64") testseq2intl(t, fixture, grp, p, nil, []seqTest{ funcBreak(t, "main.TestPanickyIterator2"), {contContinue, 125},