-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cgo/internal/test: TestCallbackCallersSEH failures #65116
Comments
I've tracked down the failure to an issue with how the .pdata entries are laid on disk. The docs says that these entries should be sorted using the function start address, but the Go linker not always honor this when copying the .pdata entries from the host objects, which makes the Windows runtime to find the wrong entry, therefore producing an incorrect unwinding. Details of how the unsorted case happens: the Go linker concatenates .pdata sections from host objects without modifying them, relying on the host compiler to produce sorted entries (which they do). The host objects can contain unreachable function with their corresponding .pdata entries, which will eventually be replaced by the Go linker for It is already too late to fix this issue for go1.22, considering that the release is in ~3 weeks. We could disable cgo stack unwinding when using internal linking and reenable it for go1.23, but I would suggest to just skip @golang/release @golang/windows |
Thanks for the analysis.
Interesting. The intention of I agree that for the moment skipping the test is good. We could skip just in internal linking mode. I think cmd/dist (all.bat) passes |
Change https://go.dev/cl/556635 mentions this issue: |
TestCallbackCallersSEH is flaky when using the internal linker. Skip it for now until the flakiness is resolved. Updates #65116 Change-Id: I7628b07eaff8be00757d5604722f30aede25fce5 Reviewed-on: https://go-review.googlesource.com/c/go/+/556635 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/557815 mentions this issue: |
…rsSEH when internal linking TestCallbackCallersSEH is flaky when using the internal linker. Skip it for now until the flakiness is resolved. Updates #65116 Change-Id: I7628b07eaff8be00757d5604722f30aede25fce5 Reviewed-on: https://go-review.googlesource.com/c/go/+/556635 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> (cherry picked from commit adead1a) Reviewed-on: https://go-review.googlesource.com/c/go/+/557815
Closed by merging 10e9ab5 to release-branch.go1.22. |
The skip is submitted. Reopen for proper fix in Go 1.23. |
TestCallbackCallersSEH is flaky when using the internal linker. Skip it for now until the flakiness is resolved. Updates golang#65116 Change-Id: I7628b07eaff8be00757d5604722f30aede25fce5 Reviewed-on: https://go-review.googlesource.com/c/go/+/556635 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Go version
go version devel go1.22-e9b3ff15f4 Wed Jan 10 17:35:49 2024 +0000 windows/amd64
Output of
go env
in your module/workspace:What did you do?
go test --ldflags=-linkmode=internal -run=TestCallbackCallersSEH ./cmd/cgo/internal/test
What did you see happen?
--- FAIL: TestCallbackCallersSEH (0.00s) callback_windows.go:107: incorrect backtrace: want: [test._Cfunc_backtrace test.testCallbackCallersSEH.func1.1 test.testCallbackCallersSEH.func1 test.goCallback test._Cfunc_callback test.nestedCall.func1 test.nestedCall test.testCallbackCallersSEH test.TestCallbackCallersSEH] got: [] FAIL FAIL cmd/cgo/internal/test 2.527s FAIL
What did you expect to see?
=== RUN TestCallbackCallersSEH --- PASS: TestCallbackCallersSEH (0.00s) PASS ok cmd/cgo/internal/test 2.286s
Some more context:
The text was updated successfully, but these errors were encountered: