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: segfault in connection pool when the driver frequently fails to connect [1.10 backport] #25235

Closed
gopherbot opened this issue May 3, 2018 · 3 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented May 3, 2018

@andybons requested issue #24445 to be considered for backport to the next 1.10 minor release.

@gopherbot please backport to 1.10 with CL https://golang.org/cl/102477

@katiehockman
Copy link
Member

@katiehockman katiehockman commented Oct 29, 2018

Approved since this is a regression. Please follow the instructions at https://github.com/golang/go/wiki/MinorReleases to create the cherrypick CL.

@dmitshur dmitshur modified the milestones: Go1.10.5, Go1.10.6 Nov 1, 2018
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Nov 1, 2018

Change https://golang.org/cl/146778 mentions this issue: [release-branch.go1.10] database/sql: check for nil connRequest.conn before use

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Nov 1, 2018

Closed by merging edd28f1 to release-branch.go1.10.

@gopherbot gopherbot closed this Nov 1, 2018
gopherbot pushed a commit that referenced this issue Nov 1, 2018
…before use

The connRequest may return a nil conn value. However in a rare
case that is difficult to test for it was being passed to
DB.putConn without a nil check. This was an error as this
made no sense if the driverConn is nil. This also caused
a panic in putConn.

A test for this would be nice, but didn't find a sane
way to test for this condition.

Updates #24445
Fixes #25235

Change-Id: I827316e856788a5a3ced913f129bb5869b7bcf68
Reviewed-on: https://go-review.googlesource.com/102477
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit b98ffdf)
Reviewed-on: https://go-review.googlesource.com/c/146778
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
@golang golang locked and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.