Skip to content

Internal Server Error 500: GetBranchCommit: packfile not found #34471

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

Open
er2off opened this issue May 15, 2025 · 3 comments
Open

Internal Server Error 500: GetBranchCommit: packfile not found #34471

er2off opened this issue May 15, 2025 · 3 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug

Comments

@er2off
Copy link

er2off commented May 15, 2025

Description

Technically it's a duplicate of existing issues like #8330 and #31443
but I can't append information about this bug because these issues limited conversation to collaborators.

So, this bug can happen on ANY repo (but for me this happens randomly on relatively big repositories like 200+MB. This time that happened with LLGL mirror, it happens for my local non-mirrored repositories too).
I think it's Windows-only bug, and looks like it only happens on repository garbage collection.

After garbage collection, at gitea-repositories/org/repo/objects/pack there is one .pack file that is older than others and is slightly less than other biggest .pack file in this directory.
To solve this bug by hand, just remove this file...
But why this file can't be renamed to something like .tmp-* so it can be fixed with go-git/go-git#6? Git for Windows bug? Windows permissions issue?

Gitea Version

1.23.8

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.46.0.windows.1

Operating System

Windows Server 2022 (win10 21H2)

How are you running Gitea?

Official Gitea executable from releases. Running as Windows Service.

Database

PostgreSQL

@er2off
Copy link
Author

er2off commented May 15, 2025

Yes, this looks like Windows permissions issue.
As you can see, git user have rights.

Image

And service runs using this user (and additionally RUN_USER = git in app.ini)
But logs said it's actually not?

25/05/15 12:10:17 .../repository/check.go:95:GitGcRepo() [E] Repository garbage collection failed for <Repository 18:.../...>. Stdout: 
Error: context deadline exceeded - fatal: renaming pack to 'objects/pack/pack-ccc2ceccb9b27787b75eb659c55aafc8830fac6a.pack' failed: Permission denied
fatal: failed to run repack
 - fatal: renaming pack to 'objects/pack/pack-ccc2ceccb9b27787b75eb659c55aafc8830fac6a.pack' failed: Permission denied
fatal: failed to run repack

@KazzmanK
Copy link
Contributor

never experienced this issue

@lunny
Copy link
Member

lunny commented May 15, 2025

Looks like it's a permission configuration problem.

@lunny lunny added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug
Projects
None yet
Development

No branches or pull requests

3 participants