Skip to content
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

Windows only: Unable to open checker for <commit id>. Error: failed to run attr-check. Error: exit status 1 #33550

Open
yp05327 opened this issue Feb 10, 2025 · 13 comments
Labels

Comments

@yp05327
Copy link
Contributor

yp05327 commented Feb 10, 2025

Description

Image

binary file: gitea-1.23.3-windows-4.0-amd64.exe
git version: git version 2.47.1.windows.1

Gitea Version

1.23.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

windows binary file

Database

None

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Feb 12, 2025

Are you able to reproduce in 1.24? I have refactored many legacy "repo" middlewares.


Maybe it's not related to 1.23/1.24 and it only happens randomly, but we need to know how to reproduce it.

@wxiaoguang wxiaoguang added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail labels Feb 12, 2025
@yp05327
Copy link
Contributor Author

yp05327 commented Feb 26, 2025

I only met this error once for test other things in a clean newly installed instance, and didn't try it in 1.24.
But I saw others who is running 1.23.4-windows also got this error today.

It is hard to say how to completely reproduce it.

@yp05327
Copy link
Contributor Author

yp05327 commented Feb 26, 2025

Image
This is the log, it seems that every time reviewing the PR, this error will occur.

Then I ask let him to try it again, and he got the error again:

Image

@yp05327
Copy link
Contributor Author

yp05327 commented Feb 26, 2025

I tried again in 1.23.4, I found this:
Image

@lunny
Copy link
Member

lunny commented Mar 16, 2025

related to #31600

@wxiaoguang
Copy link
Contributor

I do not think it's related, this error is "exit status 1", it could be caused by incorrect git command or incorrect git repo.

@chris-08154711
Copy link

chris-08154711 commented Mar 19, 2025

This error occurs once in every GET https://[gitea]/[org]/[repo]/commit/[hash] request cycle.
Found in: 1.21.11, 1.23.5, 100% reproducible

@wxiaoguang
Copy link
Contributor

This error occurs once in every GET https://[gitea]/[org]/[repo]/commit/[hash] request cycle. Found in: 1.21.11, 1.23.5, 100% reproducible

How do you run Gitea? Windows or not? Docker or not?

@chris-08154711
Copy link

Windows Server 2016, no Docker, MariaDB

Log attached: gitea.log

@wxiaoguang
Copy link
Contributor

Windows Server 2016, no Docker, MariaDB

So I think the attr-check error is only related to Windows servers. Unfortunately, it seems that there is few contributors using Windows to run Gitea server, so the Windows release is not well maintained.

@wxiaoguang wxiaoguang changed the title Unable to open checker for xxxx Error: failed to run attr-check. Error: exit status 1 Windows only: Unable to open checker for <commit id>. Error: failed to run attr-check. Error: exit status 1 Mar 26, 2025
@eeyrjmr
Copy link
Contributor

eeyrjmr commented Mar 26, 2025

@yp05327 are you using LFS?
I ask because this week a colleague created a new repo and pushed using LFS and now I have this in my logs and when I increase the logging fidelity it is when the LFS data is checked.
When I then run gitea doctor check --all --fix it would

  1. flag orphaned LFS data
  2. delete the LFS data :( (luckily only 5 LFS files and a backup was created just after the creation)

I am not 100% sure but almost ... ALMOST this is associated with LFS and some metadata isn't being stored and likely windows only :(

@yp05327
Copy link
Contributor Author

yp05327 commented Mar 27, 2025

@eeyrjmr
No. My log is just from a newly installed instance which is for the test.
Only created a new repo, a new branch for a PR, and a PR review.

wxiaoguang pushed a commit that referenced this issue Mar 27, 2025
… on Windows OS. (#34035)

Close #34022 , #33550 

This error message always appears when using the `check-attr` command,
even though it works correctly.
The issue occurs when the stdin writer is closed, so I added a special
case to handle and check the error message when the exit code is 1.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Mar 27, 2025
… on Windows OS. (go-gitea#34035)

Close go-gitea#34022 , go-gitea#33550 

This error message always appears when using the `check-attr` command,
even though it works correctly.
The issue occurs when the stdin writer is closed, so I added a special
case to handle and check the error message when the exit code is 1.
wxiaoguang pushed a commit that referenced this issue Mar 27, 2025
… on Windows OS. (#34035) (#34036)

Backport #34035 by charles7668

Close #34022 , #33550 

This error message always appears when using the `check-attr` command,
even though it works correctly.
The issue occurs when the stdin writer is closed, so I added a special
case to handle and check the error message when the exit code is 1.

Co-authored-by: charles <[email protected]>
@eeyrjmr
Copy link
Contributor

eeyrjmr commented Mar 27, 2025

@eeyrjmr No. My log is just from a newly installed instance which is for the test. Only created a new repo, a new branch for a PR, and a PR review.

ok :(
I am facing two issues then but the common one about attr-check appears to resolve and it looks like a good fix. It might have been co-incidence when I ran into this with regards to orphaned LFS.
It still could be the same thing because if attr-check is used in orphan check then I will also be hitting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants