-
-
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
pubring.db.lock after unclean shutdown breaks gpg related actions #30781
Comments
Can confirm. Downgrading to previous version (for us that was 1.21.5) didn't resolve issue. |
fwiw i experienced this on forgejo too. a workaround that worked for me was to specify a different services:
gitea:
image: gitea/gitea:latest
environment:
GNUPGHOME: /.gnupg
# ...
volumes:
- ./data/gitea/gnupg:/.gnupg |
Maybe we can have a check to delete these lock files when Gitea startup. |
I run into this sporadically as well, despite not having an unclean shutdown (from my perspective). The Gitea server is stopped every night for backup using A check for stale lock files would be very useful |
I also have this issue when I do My current setup is based on the version: "3"
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:1.22.3
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"
+ command: sh -c "rm /data/gitea/home/.gnupg/public-keys.d/pubring.db.lock; /bin/s6-svscan /etc/s6" The path When the lock file does not exist, it just logs a message and continues. |
Description
Commits page loads for a very, very long time if unclean shutdown has happened before.
Reason:
Since gpg creates lock file in /var/lib/gitea/home/.gnupg/public-keys.d/ , which is on a persistent volume, unclean shutdown leaves
pubring.db.lock
, and after following startup gpg operations fail because of the locked database.Proposed fix:
I would suggest checking for the gpg database lock file during container startup, and remove it if it exists.
Gitea Version
1.21.11
Can you reproduce the bug on the Gitea demo site?
No, requires ability to crash the container
How are you running Gitea?
Docker compose with /var/lib/gitea persisted in volume
The text was updated successfully, but these errors were encountered: