Repository navigation
test: avoid DWARF linking for temporary race binaries - #29032
Merged
XuPeng-SH merged 4 commits intoSep 17, 2026
Merged
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
fengttt
approved these changes
Sep 17, 2026
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
XuPeng-SH
commented
Sep 17, 2026
XuPeng-SH
left a comment
Contributor
Author
There was a problem hiding this comment.
GPT-6 Astra medium deep review for exact head 8711eb5.
Astra reviewed the complete diff and design/CI evidence.
Conclusion: no evidence-backed P0/P1/P2 blocker.
- -ldflags=-w is limited to the three temporary race-binary compilation sites. It removes DWARF while preserving race support, and the tradeoff is documented.
- Binary lifecycle, cleanup, failure propagation, concurrency, test selection, sharding, and reproducibility are unchanged.
- Exact-head Linux UT passed with the expected engine and plan test discovery, and CI Required passed.
This is a comment-only review because the PR is authored by the review requester. Code review conclusion is approve, subject to the normal CI gate.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…9032) ## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to matrixorigin#28419. This does not close the overall UT runtime/timeout issue. ## What this PR does / why we need it: A global review of the successful 47m28s race-UT trace found that the engine, plan and optional embedded prebuild paths pay for DWARF linking that ordinary `go test` already omits. Their `go test -c` outputs are temporary executables, not debugger artifacts. Use `-ldflags=-w` only for those compile-only commands. Preserve race instrumentation, every dynamically discovered test, all assertions, process isolation, single-runner and concurrency budgets, timeouts, native flags, cancellation, report ownership and failure propagation. Embedded prebuild remains off by default. No production, coverage or SCA build is changed. Local Go 1.26.4 darwin/arm64 plan build pairs (warm compilation, forced links, sequential commands and reversed order in pair 2): | Pair | Before | After | | --- | ---: | ---: | | 1 | 44.68s | 17.44s | | 2 | 31.18s | 16.89s | | Total | 75.86s | 34.33s | Measured build-command time decreased **54.7%**, and the binary decreased from approximately 232 MiB to 190 MiB. **This is not an end-to-end CI speedup claim.** Linux/amd64 results and total CI impact remain unmeasured; peak RSS was not consistently reduced. See [scope, cost review and evidence](https://github.com/XuPeng-SH/matrixone/blob/95d2a2c23a/docs/design/RACE_UT_LINK_COST.md). Validation: - Full candidate plan race binary: 3,020 top-level passes; identical default/ candidate test-name lists. - Full candidate engine race binary: 160 top-level passes, three existing skips. - Intentional-race probe: still fails with function/file/line diagnostics; runtime stack-frame probe preserves function/file/line metadata. - Mock-based runner contracts verify flags, build-failure propagation and existing prebuild success/failure/cancellation behavior without adding MO compilations to CI. - Incremental golangci-lint: zero issues; `go vet ./optools`, shell syntax, gofmt and diff checks pass. - Full optools race validation: isolated run passed in 53.160s. The initial run concurrent with an engine build timed out in the existing 15-second cancellation-diagnostics harness; the single-test isolated rerun passed in 1.350s. No timeout is increased to hide this observation. Tradeoff: temporary CI binaries no longer support DWARF-based variable inspection in Delve/GDB. Rebuild normally for interactive debugging. This does not strip the Go symbol table (`-s` is deliberately not used). Review classification: focused build maintenance; no new scheduler, lifecycle, cache format or production contract. Broader stage overlap and additional runners are deliberately not enabled. CI is not being waited on for this PR. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…9032) ## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to matrixorigin#28419. This does not close the overall UT runtime/timeout issue. ## What this PR does / why we need it: A global review of the successful 47m28s race-UT trace found that the engine, plan and optional embedded prebuild paths pay for DWARF linking that ordinary `go test` already omits. Their `go test -c` outputs are temporary executables, not debugger artifacts. Use `-ldflags=-w` only for those compile-only commands. Preserve race instrumentation, every dynamically discovered test, all assertions, process isolation, single-runner and concurrency budgets, timeouts, native flags, cancellation, report ownership and failure propagation. Embedded prebuild remains off by default. No production, coverage or SCA build is changed. Local Go 1.26.4 darwin/arm64 plan build pairs (warm compilation, forced links, sequential commands and reversed order in pair 2): | Pair | Before | After | | --- | ---: | ---: | | 1 | 44.68s | 17.44s | | 2 | 31.18s | 16.89s | | Total | 75.86s | 34.33s | Measured build-command time decreased **54.7%**, and the binary decreased from approximately 232 MiB to 190 MiB. **This is not an end-to-end CI speedup claim.** Linux/amd64 results and total CI impact remain unmeasured; peak RSS was not consistently reduced. See [scope, cost review and evidence](https://github.com/XuPeng-SH/matrixone/blob/95d2a2c23a/docs/design/RACE_UT_LINK_COST.md). Validation: - Full candidate plan race binary: 3,020 top-level passes; identical default/ candidate test-name lists. - Full candidate engine race binary: 160 top-level passes, three existing skips. - Intentional-race probe: still fails with function/file/line diagnostics; runtime stack-frame probe preserves function/file/line metadata. - Mock-based runner contracts verify flags, build-failure propagation and existing prebuild success/failure/cancellation behavior without adding MO compilations to CI. - Incremental golangci-lint: zero issues; `go vet ./optools`, shell syntax, gofmt and diff checks pass. - Full optools race validation: isolated run passed in 53.160s. The initial run concurrent with an engine build timed out in the existing 15-second cancellation-diagnostics harness; the single-test isolated rerun passed in 1.350s. No timeout is increased to hide this observation. Tradeoff: temporary CI binaries no longer support DWARF-based variable inspection in Delve/GDB. Rebuild normally for interactive debugging. This does not strip the Go symbol table (`-s` is deliberately not used). Review classification: focused build maintenance; no new scheduler, lifecycle, cache format or production contract. Broader stage overlap and additional runners are deliberately not enabled. CI is not being waited on for this PR. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 task done
This branch had an error being deployed
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.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #28419. This does not close the overall UT runtime/timeout issue.
What this PR does / why we need it:
A global review of the successful 47m28s race-UT trace found that the engine,
plan and optional embedded prebuild paths pay for DWARF linking that ordinary
go testalready omits. Theirgo test -coutputs are temporary executables,not debugger artifacts.
Use
-ldflags=-wonly for those compile-only commands. Preserve raceinstrumentation, every dynamically discovered test, all assertions, process
isolation, single-runner and concurrency budgets, timeouts, native flags,
cancellation, report ownership and failure propagation. Embedded prebuild
remains off by default. No production, coverage or SCA build is changed.
Local Go 1.26.4 darwin/arm64 plan build pairs (warm compilation, forced links,
sequential commands and reversed order in pair 2):
Measured build-command time decreased 54.7%, and the binary decreased from
approximately 232 MiB to 190 MiB. This is not an end-to-end CI speedup claim.
Linux/amd64 results and total CI impact remain unmeasured; peak RSS was not
consistently reduced. See scope, cost review and evidence.
Validation:
candidate test-name lists.
runtime stack-frame probe preserves function/file/line metadata.
existing prebuild success/failure/cancellation behavior without adding MO
compilations to CI.
go vet ./optools, shell syntax,gofmt and diff checks pass.
The initial run concurrent with an engine build timed out in the existing
15-second cancellation-diagnostics harness; the single-test isolated rerun
passed in 1.350s. No timeout is increased to hide this observation.
Tradeoff: temporary CI binaries no longer support DWARF-based variable
inspection in Delve/GDB. Rebuild normally for interactive debugging. This
does not strip the Go symbol table (
-sis deliberately not used).Review classification: focused build maintenance; no new scheduler, lifecycle,
cache format or production contract. Broader stage overlap and additional
runners are deliberately not enabled. CI is not being waited on for this PR.