Skip to content
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

runtime: TestCgo* consistently failing on windows/arm64 #49188

Closed
bcmills opened this issue Oct 27, 2021 · 3 comments
Closed

runtime: TestCgo* consistently failing on windows/arm64 #49188

bcmills opened this issue Oct 27, 2021 · 3 comments
Labels
arch-arm64 FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Oct 27, 2021

--- FAIL: TestCgoDLLImports (5.51s)
    crash_test.go:54: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
--- FAIL: TestCgoPanicDeadlock (4.72s)
    crash_test.go:54: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
--- FAIL: TestCgoTracebackContextPreemption (4.72s)
    crash_test.go:54: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
--- FAIL: TestCgoTracebackContext (4.72s)
    crash_test.go:54: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
--- FAIL: TestBigStackCallbackCgo (0.00s)
    crash_test.go:54: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
--- FAIL: TestCgoPanicCallback (0.00s)
    crash_test.go:54: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
--- FAIL: TestCgoCCodeSIGPROF (4.72s)
    crash_test.go:54: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
--- FAIL: TestCgoCheckBytes (0.50s)
    crash_cgo_test.go:188: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
--- FAIL: TestCgoTraceback (0.34s)
    crash_test.go:54: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
--- FAIL: TestCgoExternalThreadPanic (5.31s)
    crash_test.go:54: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
--- FAIL: TestCgoCrashHandler (4.98s)
    crash_test.go:54: building testprogcgo []: exit status 2
        # runtime/testdata/testprogcgo
        In file included from _cgo_export.c:4:
        cgo-gcc-export-header-prolog:45:35: error: redeclaration of 'panic_callback' cannot add 'dllexport' attribute
        panic.go:9:6: note: previous declaration is here
        
FAIL
FAIL	runtime	25.494s

greplogs --dashboard -md -l -e 'redeclaration of '\''panic_callback'\'

2021-10-27T13:12:49-cfb5321/windows-arm64-10
2021-10-27T08:50:27-bdefb77/windows-arm64-10
2021-10-27T06:23:35-5786a54/windows-arm64-10
2021-10-27T05:33:58-ca5f65d/windows-arm64-10
2021-10-26T23:12:17-13eccaa/windows-arm64-10
2021-10-26T23:06:10-e5c5125/windows-arm64-10
2021-10-26T22:05:53-80be4a4/windows-arm64-10
2021-10-26T21:32:57-86f6bf1/windows-arm64-10
2021-10-26T21:17:38-091db63/windows-arm64-10

@bcmills bcmills added arch-arm64 NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows Soon This needs to be done soon. (regressions, serious bugs, outages) labels Oct 27, 2021
@bcmills bcmills added this to the Go1.18 milestone Oct 27, 2021
@bcmills
Copy link
Contributor Author

bcmills commented Oct 27, 2021

These started as of CL 339989. @prattmic, better to fix-forward, roll back, or add platform-specific skips for these tests?

@ianlancetaylor
Copy link
Contributor

A cgo file with //export declarations is not permitted to have function definitions in the cgo comment (see https://pkg.go.dev/cmd/cgo#hdr-C_references_to_Go). The call_callback function needs to move to a C file.

@gopherbot
Copy link

Change https://golang.org/cl/359195 mentions this issue: runtime/testdata/testprogcgo: fix TestCgoPanicCallback

@golang golang locked and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
None yet
Development

No branches or pull requests

3 participants