-
-
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
Error 500 when viewing a commit by its ID #23872
Comments
Is your patch a public one? Could you upload it to help the investigation? |
@lunny Sorry, what do you mean by patch? |
This bug appears to be a regression. When I downgrade my Gitea instance back to 1.18.0 (with the exact same settings) I cannot reproduce this issue. Upgrading to 1.19.0 again causes it to happen. |
I was able to re-produce this issue on the official Gitea demo site. It is much more difficult to make it happen on there and it is super easy for me to reproduce on my local instance, so I believe the available CPU power has something to do with it. Check out this repository: https://try.gitea.io/a20eac1d/bug1190/commits/branch/main Under the SHA1 header you can find a button that says "f8269d2a24". Pressing this will take you to that specific commit. You need to press that button with your middle mouse button 5-15 times so that you have many tabs open trying to load that commit at the same time. If you are lucky, at some point at least one of those tabs will crash with an "Error 500". This happens rarely on a powerful instance like the Gitea demo, but it happens extremely often on my local instance which has less CPU power available. This does not happen on 1.18.0 and it only started happening in 1.19.0 |
Regression of go-gitea#19676 and go-gitea#21814 Fix go-gitea#23872 `cases.Title` is not thread-safe, it has internal state, so it can't be used as a global shared variable.
Backport #23885 by @wxiaoguang Regression of #19676 and #21814 Fix #23872 `cases.Title` is not thread-safe, it has internal state, so it can't be used as a global shared variable. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Description
When trying to view commits by their ID, Gitea sometimes crashes and shows an "Error 500" page.
I can make this issue appear very reliably when I have multiple requests open at the same time (click on multiple commit IDs in short time) or if I abort the current page load and then reload it immediately. It seems like the previous request is still going on the server and the new request is messing it up.
The error:
Gitea Version
1.19.0
Can you reproduce the bug on the Gitea demo site?
YES! See comment below
Log Gist
Updated Gist with more info:
https://gist.github.com/a20eac1d/4f2037bdfe147d2ad8c7ea375724f72a
Screenshots
https://i.imgur.com/BDd2x90.png
Git Version
2.38.4, Wire Protocol Version 2 Enabled
Operating System
Ubuntu 22.04 LTS
How are you running Gitea?
Gitea is running in a Docker container, created with the official tutorial at: https://docs.gitea.io/en-us/install-with-docker/
Database
SQLite
The text was updated successfully, but these errors were encountered: