-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
A deadlock code path #5116
Comments
@lunny Here is probably another.
|
@typeless updated, please try again. |
@lunny It passes all tests now. 👍 |
Here is another change I made to make the tests pass. But I am not sure it is correct or makes sense at all.
Without this change, the transaction could fail and turn to ROLLBACK. |
@typeless please send another PR. |
Gitea version (or commit ref):
Gitea version 1.5.0+rc1-242-gfb3954f9a built with: bindata, sqlite, sqlite_unlock_notify
(Customized version)
Git version:
2.19.0
Operating system:
Ubuntu 16.04.5 LTS (Xenial Xerus)
Database (use
[x]
):Can you reproduce the bug at https://try.gitea.io:
Log gist:
Description
Looking at
models/repo.go:2439
in the backtrace, you can see that this is in anxorm
session.But at
models/repo.go:2004
GetRepositoryByID
, it uses the global db connection in the middle of the session.IIUC, since the session has not completed yet, this
GetRepositoryByID
would always fail (or block if SQLite's unlock_noitfy is implemented)....
Screenshots
The text was updated successfully, but these errors were encountered: