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

cmd/cgo/internal/testcshared: TestSignalHandlersWithNotify failures with Go handler did not see SIGIO #61264

Closed
gopherbot opened this issue Jul 10, 2023 · 4 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@gopherbot
Copy link

gopherbot commented Jul 10, 2023

#!watchflakes
post <- pkg == "cmd/cgo/internal/testcshared" && test == "TestSignalHandlersWithNotify" && `Go handler did not see SIGIO`

Issue created automatically to collect these failures.

Example (log):

--- FAIL: TestSignalHandlersWithNotify (5.36s)
    cshared_test.go:658: run: [go build -buildmode=c-shared -installsuffix testcshared -o ./libgo5.a ./libgo5]
    cshared_test.go:667: run: [gcc -fPIC -m64 -march=z196 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/data/golang/workdir/tmp/go-build545101366=/tmp/go-build -gno-record-gcc-switches -I pkg/linux_s390x_shared -pthread -o testp5 main5.c -ldl]
    cshared_test.go:679: command failed: [./testp5 ././libgo5.a]
        exit status 1
        Go handler did not see SIGIO

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 10, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "cmd/cgo/internal/testcshared" && test == "TestSignalHandlersWithNotify"
2023-05-19 02:47 linux-s390x-ibm go@d0c72c23 cmd/cgo/internal/testcshared.TestSignalHandlersWithNotify (log)
--- FAIL: TestSignalHandlersWithNotify (5.36s)
    cshared_test.go:658: run: [go build -buildmode=c-shared -installsuffix testcshared -o ./libgo5.a ./libgo5]
    cshared_test.go:667: run: [gcc -fPIC -m64 -march=z196 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/data/golang/workdir/tmp/go-build545101366=/tmp/go-build -gno-record-gcc-switches -I pkg/linux_s390x_shared -pthread -o testp5 main5.c -ldl]
    cshared_test.go:679: command failed: [./testp5 ././libgo5.a]
        exit status 1
        Go handler did not see SIGIO

watchflakes

@bcmills bcmills added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 10, 2023
@bcmills
Copy link
Contributor

bcmills commented Jul 10, 2023

I think this is just a flaky test. The test has an arbitrary 100ms timeout for receiving from sigioChan:
https://cs.opensource.google/go/go/+/master:src/cmd/cgo/internal/testcshared/testdata/libgo5/libgo5.go;l=41;drc=bf6c55a8b313752667b51194485fa206110d71f9

If the Go runtime doesn't finish delivering the signal to the channel before that timeout expires — or if the test just happens to get descheduled for 100ms so that both channels are unblocked! — then the test can fail spuriously.

@bcmills bcmills added the Testing An issue that has been verified to require only test changes, not just a test failure. label Jul 10, 2023
@bcmills bcmills changed the title cmd/cgo/internal/testcshared: TestSignalHandlersWithNotify failures cmd/cgo/internal/testcshared: TestSignalHandlersWithNotify failures with Go handler did not see SIGIO Jul 11, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "cmd/cgo/internal/testcshared" && test == "TestSignalHandlersWithNotify" && `Go handler did not see SIGIO`
2023-07-13 23:11 linux-s390x-ibm-race go@089e37a9 cmd/cgo/internal/testcshared.TestSignalHandlersWithNotify (log)
--- FAIL: TestSignalHandlersWithNotify (6.52s)
    cshared_test.go:586: run: [go build -buildmode=c-shared -installsuffix testcshared -o ./libgo5.a ./libgo5]
    cshared_test.go:594: run: [gcc -fPIC -m64 -march=z196 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/data/golang/workdir/tmp/go-build2990363013=/tmp/go-build -gno-record-gcc-switches -I pkg/linux_s390x_shared -pthread -o testp5 main5.c -ldl]
    cshared_test.go:605: command failed: [./testp5 ././libgo5.a]
        exit status 1
        Go handler did not see SIGIO

watchflakes

@bcmills bcmills added this to the Go1.22 milestone Jul 14, 2023
@bcmills bcmills self-assigned this Jul 14, 2023
@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Jul 14, 2023
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 14, 2023
@gopherbot
Copy link
Author

Change https://go.dev/cl/509636 mentions this issue: cmd/cgo/internal/testcshared: remove an arbitrary timeout in TestSignalHandlersWithNotify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
Status: Done
Development

No branches or pull requests

2 participants