-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: go1.4 introduces locking issue in gosqlite #9380
Comments
@bradfitz thoughts? |
If you try to replace sqlite3 driver, we can isolate the problem whether caused in Go or driver, I guess. https://github.com/docker/docker/blob/v1.4.1/pkg/graphdb/conn_sqlite3.go#L8 |
@mattn I've tried this and I was getting errors even earlier. I'll try this again and update this comment with the output. With Go 1.4 and
|
I had a quick look at this, and I didn't bother to see if I'm looking at the code that causes the problem in this case, but this is absolutely broken. It's assuming both that subsequent executions of *sql.DB.Exec() operate on the same connection, and that nobody else can operate on the same connection between the two invocations. Both assumptions are wrong. The answer here might just be that the code was relying on undefined behaviour before and just happened to not break pre-1.4. But I'm personally not going to spend any more time on this issue until there's a reproducible, small test case. |
@johto thanks for the comment. @unclejack has fixed that now and the issue went away. |
Still working on isolating the exact issue, but have bisected the culprit to this commit 6fb6f4e (or hg commit a701ced4b6da)
In docker, the graphdb uses
code.google.com/p/gosqlite/sqlite3
. If you build using the above commit to go1.4 release, the first docker run will produceFATA[0000] Error response from daemon: The database file is locked: database is locked
Here is the callgrind image of the graphdb callgraph:
Related issue moby/moby#9615 (comment)
presently this is a blocker for docker to use go1.4
The text was updated successfully, but these errors were encountered: