Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
database/sql: conn() can cause a deadlock #2542
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.