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: conn() can cause a deadlock #2542

Closed
gopherbot opened this issue Dec 8, 2011 · 4 comments
Closed

database/sql: conn() can cause a deadlock #2542

gopherbot opened this issue Dec 8, 2011 · 4 comments
Assignees
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 8, 2011

by samuel.stauffer:

What steps will reproduce the problem?
1. open a db
2. close the db
3. exec a query (returns error that db is closed)
4. exec a query - causes deadlock

What is the expected output?
All goroutines deadlocked

What do you see instead?
The same error about db being closed

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g (though unrelated to compiler)

Which operating system are you using?
Linux/Ubuntu

Which revision are you using?  (hg identify)
5ea674d1b2ba+ tip

Please provide any additional information below.
conn() in exp/sql/sql.go:135 can return leaving db.mu locked if db.closed is true.

This is unlikely to show up in use as it requires ignoring the "closed" error
and trying again anyway.
@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Dec 8, 2011

Comment 1:

Owner changed to @bradfitz.

Status changed to Accepted.

@rsc
Copy link
Contributor

@rsc rsc commented Dec 9, 2011

Comment 2:

Labels changed: added priority-later, removed priority-medium.

@rsc
Copy link
Contributor

@rsc rsc commented Dec 12, 2011

Comment 3:

Labels changed: added priority-go1.

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Dec 12, 2011

Comment 4:

This issue was closed by revision 06a9bc6.

Status changed to Fixed.

@mikioh mikioh changed the title exp/sql - conn() can cause a deadlock database/sql: conn() can cause a deadlock Feb 18, 2015
@rsc rsc added this to the Go1 milestone Apr 10, 2015
@rsc rsc removed the priority-go1 label Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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
3 participants
You can’t perform that action at this time.