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
LevelDB/LevelQueue could get stuck on NFS when NFS locking doesn't work properly #24684
Comments
It should be related with levelqueue and leveldb. But I don't think these data should be stored into NFS. They should be stored into local disk. |
It's related to the filesystem. |
Some additional context around the issue as it happened to me... I am using I'm unsure of what actually is stored in the leveldb, but could it be better served in a |
The queue is used to store different informations like what webhooks must be delivered. This is stored on disk to survive a Gitea restart. |
I suspect the problem is not related to Gitea itself (or version), but it seems that NFS doesn't handle the lock when the last Gitea exits. NFS locking is quite complicated. If you have a chance, you can use command line tool
https://docstore.mik.ua/orelly/networking_2ndEd/nfs/ch11_02.htm https://docstore.mik.ua/orelly/networking_2ndEd/nfs/ch07_05.htm |
I checked the NFS options on the QNAP and see that oplocks are enabled. But, as you mentioned, NFS ain't easy. |
Hmm, flock need a sub command.
|
With the subcommand, we've reproduced the issue. The command hangs regardless of the state of oplocks. |
Yup, so the problem should be fixed from NFS side. I can think about a workaround: remove your Another approach might be restarting your NFS server, or fix/reset some locking service? |
I just solved the issue...and it was completely to do with NFS. Did a ssh into the QNAP and saw that there were issues in the kernel log:
I did a little surgery to correct the situation:
After that, locking seems to work fine:
Sorry for the noise, and thank you so much for all of your help. I'm really excited about gitea and would love to help contribute to actions! |
Close #23654 Close #24684 @techknowlogick I still think we need to rename https://dl.gitea.com/gitea/1.20/ to https://dl.gitea.com/gitea/1.20-nightly/ `/gitea/1.20/` is quite confusing, it needs these words to explain why. If we call it `1.20-nightly`, the FAQ can be simplified a lot.
…25202) Close go-gitea#23654 Close go-gitea#24684 @techknowlogick I still think we need to rename https://dl.gitea.com/gitea/1.20/ to https://dl.gitea.com/gitea/1.20-nightly/ `/gitea/1.20/` is quite confusing, it needs these words to explain why. If we call it `1.20-nightly`, the FAQ can be simplified a lot.
…25204) Backport #25202 by @wxiaoguang Close #23654 Close #24684 @techknowlogick I still think we need to rename https://dl.gitea.com/gitea/1.20/ to https://dl.gitea.com/gitea/1.20-nightly/ `/gitea/1.20/` is quite confusing, it needs these words to explain why. If we call it `1.20-nightly`, the FAQ can be simplified a lot. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Description
Not only one user (for 1.19 and maybe early version) reports that Gitea gets stuck when starting, the log doesn't help (outputted logs are unrelated).
It seems related to NFS: NFS lock system is broken.
The leveldb code (3rd) does
syscall.Flock(int(f.Fd()), how|syscall.LOCK_NB)
, this call should never block, but it seems that NFS blocks it.Workaround
Reset NFS locking service:
#24684 (comment)
The Gitea stacktrace when blocking
The text was updated successfully, but these errors were encountered: