Skip to content

Error on open last repository commit: "Unable to open checker for ..." #18997

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

Closed
henrythebuilder opened this issue Mar 4, 2022 · 9 comments · Fixed by #19006
Closed

Error on open last repository commit: "Unable to open checker for ..." #18997

henrythebuilder opened this issue Mar 4, 2022 · 9 comments · Fixed by #19006
Milestone

Comments

@henrythebuilder
Copy link

henrythebuilder commented Mar 4, 2022

Gitea Version

Gitea v1.16.3

Git Version

Git Version: 2.34.1

Operating System

Debian GNU/Linux 11 (bullseye) x86_64

How are you running Gitea?

Gitea package from "Gitea v1.16.3 release assets": gitea-1.16.3-linux-amd64.xz

Gitea is running on external disk (sd card) mounted as local media via command line:

export GITEA_WORK_DIR=/media/user/sdportable/gitea/home
/media/user/sdportable/gitea/bin/gitea web -c /media/user/sdportable/gitea/home/app.ini
...

2022/03/04 10:43:34 cmd/web.go:102:runWeb() [I] Starting Gitea on PID: 174594
2022/03/04 10:43:34 cmd/web.go:150:runWeb() [I] Global init
2022/03/04 10:43:34 routers/init.go:106:GlobalInitInstalled() [I] Git Version: 2.34.1, Wire Protocol Version 2 Enabled
2022/03/04 10:43:34 routers/init.go:109:GlobalInitInstalled() [I] AppPath: /media/user/sdportable/gitea/bin/gitea
2022/03/04 10:43:34 routers/init.go:110:GlobalInitInstalled() [I] AppWorkPath: /media/user/sdportable/gitea/home
2022/03/04 10:43:34 routers/init.go:111:GlobalInitInstalled() [I] Custom path: /media/user/sdportable/gitea/home/custom
2022/03/04 10:43:34 routers/init.go:112:GlobalInitInstalled() [I] Log path: /media/user/sdportable/gitea/home/log
2022/03/04 10:43:34 routers/init.go:113:GlobalInitInstalled() [I] Configuration file: /media/user/sdportable/gitea/home/app.ini
2022/03/04 10:43:34 routers/init.go:114:GlobalInitInstalled() [I] Run Mode: Prod
2022/03/04 10:43:34 ...dules/setting/log.go:283:newLogService() [I] Gitea v1.16.3 built with GNU Make 4.1, go1.17.7 : bindata, sqlite, sqlite_unlock_notify
2022/03/04 10:43:34 ...dules/setting/log.go:330:newLogService() [I] Gitea Log Mode: Console(Console:)
2022/03/04 10:43:34 ...dules/setting/log.go:246:generateNamedLogger() [I] Router Log: Console(console:)
...

Database

SQLite

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

Sometimes, not systematically, an error appears in the logs, when I click on the the last commit id in any repository, from all places: from 'user activity', from the specific repository 'home page', from the 'commits list', ...
When it happens the error is always the same:

2022/03/04 10:35:56 ...s/gitdiff/gitdiff.go:1418:func1() [E] Unable to open checker for 8fd941c7454eb37aafcac4a6d410d68669efdc5b. Error: failed to run attr-check. Error: context canceled
	Stderr: 

My 'report' was to know if this type of error can affect the integrity of the 'git repository'.

Note: as much as I could check the problem is only for the last commit of the repository!

I attach the complete log of a request that generated the error.

Thanks in advance.
Enrico

Screenshots

A sample console log for the error request:

2022/03/04 10:35:56 Started GET /user/alpha/commit/8fd941c7454eb37aafcac4a6d410d68669efdc5b for [::1]:56774
2022/03/04 10:35:56 ...dules/git/command.go:143:RunWithContext() [D] /media/user/sdportable/gitea/home/data/gitea-repositories/user/alpha.git: /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true rev-parse
2022/03/04 10:35:56 ...dules/git/command.go:143:RunWithContext() [D] /media/user/sdportable/gitea/home/data/gitea-repositories/user/alpha.git: /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true show-ref --tags
2022/03/04 10:35:56 ...dules/git/command.go:143:RunWithContext() [D] /media/user/sdportable/gitea/home/data/gitea-repositories/user/alpha.git: /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true cat-file --batch
2022/03/04 10:35:56 ...dules/git/command.go:143:RunWithContext() [D] /media/user/sdportable/gitea/home/data/gitea-repositories/user/alpha.git: /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true cat-file --batch-check
2022/03/04 10:35:56 ...dules/git/command.go:143:RunWithContext() [D] /media/user/sdportable/gitea/home/data/gitea-repositories/user/alpha.git: /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true show-ref --heads
2022/03/04 10:35:56 ...s/gitdiff/gitdiff.go:718:ParsePatch() [D] ParsePatch(1000, 5000, 100, ..., )
2022/03/04 10:35:56 ...s/charset/charset.go:135:DetectEncoding() [D] Detected encoding: utf-8 (fast)
2022/03/04 10:35:56 ...s/charset/charset.go:135:DetectEncoding() [D] Detected encoding: utf-8 (fast)
2022/03/04 10:35:56 ...dules/git/command.go:143:RunWithContext() [D] /media/user/sdportable/gitea/home/data/gitea-repositories/user/alpha.git: /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true read-tree 8fd941c7454eb37aafcac4a6d410d68669efdc5b
2022/03/04 10:35:56 ...dules/git/command.go:143:RunWithContext() [D] /media/user/sdportable/gitea/home/data/gitea-repositories/user/alpha.git: /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true check-attr --stdin -z --cached linguist-vendored linguist-generated linguist-language gitlab-language --
2022/03/04 10:35:56 ...dules/git/command.go:143:RunWithContext() [D] /media/user/sdportable/gitea/home/data/gitea-repositories/user/alpha.git: /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true diff --shortstat 1ef546dfd6d69709e3a5a101415d9bce1c2c2001...8fd941c7454eb37aafcac4a6d410d68669efdc5b
2022/03/04 10:35:56 ...s/gitdiff/gitdiff.go:1418:func1() [E] Unable to open checker for 8fd941c7454eb37aafcac4a6d410d68669efdc5b. Error: failed to run attr-check. Error: context canceled
	Stderr: 
2022/03/04 10:35:56 ...dules/git/command.go:143:RunWithContext() [D] /media/user/sdportable/gitea/home/data/gitea-repositories/user/alpha.git: /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true name-rev --exclude refs/tags/* --name-only --no-undefined 8fd941c7454eb37aafcac4a6d410d68669efdc5b
2022/03/04 10:35:56 ...dules/git/command.go:143:RunWithContext() [D] /media/user/sdportable/gitea/home/data/gitea-repositories/user/alpha.git: /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true describe --exact-match --tags --always 8fd941c7454eb37aafcac4a6d410d68669efdc5b
2022/03/04 10:35:56 ...s/context/context.go:198:HTML() [D] Template: repo/commit_page
2022/03/04 10:35:56 Completed GET /user/alpha/commit/8fd941c7454eb37aafcac4a6d410d68669efdc5b 200 OK in 30.093522ms
@zeripath
Copy link
Contributor

zeripath commented Mar 4, 2022

This can be safely ignored.

@fnetX
Copy link
Contributor

fnetX commented Mar 4, 2022

Just because I'm curious: What is it about? It's spamming the log every few seconds. Aborted web requests?

@zeripath
Copy link
Contributor

zeripath commented Mar 4, 2022

I'll get a fix in - it's my fault they shouldn't have been error level logged.

zeripath added a commit to zeripath/gitea that referenced this issue Mar 4, 2022
Fix go-gitea#18997

Signed-off-by: Andrew Thornton <art27@cantab.net>
@robertranjan
Copy link

Seeing similar error messages on macOS install as well. (gitea 1.16.3)

@henrythebuilder
Copy link
Author

Thanks for support and all Gitea contributors 👍

@robertranjan
Copy link

@henrythebuilder, is the commit count on the webpage changes when you push new commits?

It's not changing in my local deployment, not sure it happens to others as well or not? Can you please check in you local deployment of v1.16.3?

@henrythebuilder
Copy link
Author

Hi @robertranjan, the commit change after 'manually' refresh the 'home' page of the repo, this seems normal to me, but trying the action you suggest, when I pushed new commits from local repo to gitea I had again the same error:

2022/03/06 17:15:07 ...age_stats_nogogit.go:86:func2() [E] Unable to open checker for 5a6834a4f114de82489eeb3d994663516fe0e42d. Error: failed to run attr-check. Error: context canceled
	Stderr: 

I hope this will help you.

... but according to @zeripath "This can be safely ignored" and it seems that the problem has been identified (#19006) so it probably will be solved early.

@robertranjan
Copy link

thanks for checking out the commits counts @henrythebuilder ; refreshing browser didn't update the commit counts for me. It may be related to my upgrade from 1.15.9 to 1.16.3.

zeripath added a commit that referenced this issue Mar 8, 2022
Fix #18997

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
zeripath added a commit to zeripath/gitea that referenced this issue Mar 8, 2022
Backport go-gitea#19006

Fix go-gitea#18997

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@henrythebuilder
Copy link
Author

Thanks! 👍

lunny pushed a commit that referenced this issue Mar 8, 2022
)

Backport #19006

Fix #18997

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@lunny lunny added this to the 1.16.4 milestone Mar 8, 2022
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
Fix go-gitea#18997

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants