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: Stmt.Close() causing segfault #14681
Comments
We need much more info. Please provide the complete yet minimal source code to cause the crash. Also: which driver? (although that would be obvious from a complete example) |
The driver in question is https://github.com/go-sql-driver/mysql As said I haven't actually been able to reliable reproduce it. The code in question is running on a couple dozen machines serving thousands if not millions of requests a day that run this code path and I have seen the crash happen only once in the last 5 days or so. The codebase this happens in is quite extensive but the basic flow is something like: |
So I still haven't been able to reliably reproduce the crasher yet but the following code runs into the similar other issues I've noticed. If I remove the SetConnMaxLifeTime and ensure MaxOpen and MaxIdle are equal most of the issues seem to disappear.
|
What are "similar other issues"? Can you show errors/panics? If they're different from the original issue, they should probably be separate bugs. |
@RobinGeuze "similar other issue" is #16019, isn't it? |
Could be yes, tbh I have removed prepared statement based queries from my codebase, which "Fixed" the issue. |
I suspect this is fixed now when #16019 was closed. If it is still failing on master/go1.8 please re-open. |
I encountered a crash in a defered Stmt.Close().
Go version:
go1.6 freebsd/amd64
Connection is of the type *sql.DB. Am I doing something wrong or is this a weird bug.
Stack trace:
The text was updated successfully, but these errors were encountered: