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

database/sql: TestPendingConnsAfterErr flaky on darwin/arm64 #15684

Closed
eliasnaur opened this issue May 14, 2016 · 7 comments
Closed

database/sql: TestPendingConnsAfterErr flaky on darwin/arm64 #15684

eliasnaur opened this issue May 14, 2016 · 7 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@eliasnaur
Copy link
Contributor

eliasnaur commented May 14, 2016

darwin/arm64 regularly fails with:

--- FAIL: TestPendingConnsAfterErr (0.01s)

sql_test.go:147: 1 connections still open after closing DB

FAIL

Process 279 exited with status = 1 (0x00000001)
go_darwin_arm_exec: exited (test completion: exit status 253)
FAIL database/sql 29.053s

Some builder logs:
https://build.golang.org/log/c3fae67a950cd6415bf39ccece80799814852c80
https://build.golang.org/log/fcb2c8b603b28d81ec5ab6ccba4bd12b4da28bce

@mikioh mikioh added the Testing An issue that has been verified to require only test changes, not just a test failure. label May 14, 2016
@mikioh mikioh changed the title database/sql TestPendingConnsAfterErr flaky on darwin/arm64 database/sql: TestPendingConnsAfterErr flaky on darwin/arm64 May 14, 2016
@bradfitz bradfitz added this to the Go1.7Maybe milestone May 14, 2016
@eliasnaur
Copy link
Contributor Author

Here's a similar recent trace from freebsd/arm:

https://build.golang.org/log/372776e543edae8bfda51d2ec70146a943eb71b6

@gopherbot
Copy link

CL https://golang.org/cl/24550 mentions this issue.

@bradfitz
Copy link
Contributor

@bradfitz bradfitz reopened this Aug 19, 2016
@bradfitz bradfitz modified the milestones: Go1.8Maybe, Go1.7Maybe Aug 19, 2016
@quentinmit quentinmit added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 10, 2016
@bradfitz
Copy link
Contributor

@kardianos, maybe you can take a look at this too? (if you don't have enough on your plate)

But I figure all this stuff is currently more in your head than mine.

@kardianos
Copy link
Contributor

@bradfitz I'll look into this shortly. Thanks.

@rsc rsc modified the milestones: Go1.9, Go1.8Maybe Nov 11, 2016
@kardianos
Copy link
Contributor

kardianos commented Nov 19, 2016

I'm able to reproduce this. By adding the following:

+++ b/src/database/sql/sql_test.go
@@ -1509,6 +1509,7 @@ func TestPendingConnsAfterErr(t *testing.T) {
        unblock := make(chan struct{})
        setHookOpenErr(func() error {
                <-unblock // block until all connections are in flight
+               runtime.Gosched()
                return errOffline
        })

It reliably fails with sql_test.go:148: 1 connections still open after closing DB. However adding runtime.Gosched() to the last line of the func allows the test to pass again (this is all on a std linux amd64 laptop).

My assumption is that we are seeing the failures on slower machines that have slightly different scheduler patterns due to load. I'll look into updating the test soon.

@gopherbot
Copy link

CL https://golang.org/cl/33418 mentions this issue.

@golang golang locked and limited conversation to collaborators Nov 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

7 participants