proc/test: disable DWARF compression on riscv64 to work around flate hang#4376
Draft
derekparker wants to merge 5 commits into
Draft
proc/test: disable DWARF compression on riscv64 to work around flate hang#4376derekparker wants to merge 5 commits into
derekparker wants to merge 5 commits into
Conversation
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.
…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.
This reverts commit 200ba58.
This reverts commit 220314d.
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.
386d146 to
88b48b9
Compare
Member
|
Ah, still marked a draft. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On riscv64, the Go stdlib compress/flate decompressor seems to hang 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:
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 is fine for now as riscv64 is still an experimental arch but will need
to be resolved before promoting.
This should fix the TestVariableEvaluation, TestSetVariable, and
TestPanickyIterator2 timeouts on riscv64.