mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-12 10:39:38 -05:00
SyncRepositoryHooks failing due to EINTR #5456
Closed
opened 2025-11-02 06:25:23 -06:00 by GiteaMirror
·
21 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1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4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
issue/confirmed
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#5456
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sshaikh on GitHub (May 25, 2020).
[x]):2020/05/25 18:52:08 ...dules/setting/git.go:93:newGit() [I] Git Version: 2.20.1, Wire Protocol Version 2 Enabled
2020/05/25 18:52:08 .../repository/hooks.go:156:SyncRepositoryHooks() [T] Doing: SyncRepositoryHooks
2020/05/25 18:52:08 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE id>$1 LIMIT 50 [0] - 7.145921ms
2020/05/25 18:52:08 main.go:111:main() [F] Failed to run app with [./gitea admin --config /home/gitea/gitea-config/gitea/app.ini regenerate hooks]: SyncRepositoryHook: write old hook file '/appdata/repositories/config.git/hooks/pre-receive': close /appdata/repositories/config.git/hooks/pre-receive: interrupted system call
Description
After moving my app.ini, I needed to sync hooks. This failed from webgui so did it from command line:
./gitea admin --config /home/gitea/gitea-config/gitea/app.ini regenerate hooks
Thais also fails with the above error, although it appears that some hooks may have changed before the failure. Thus repeated runs of the above will eventually get through all the hooks (as the order of attempts are not fixed).
Environment
I'm running Gitea in an LXC container, and my repos are on a bind mount (which in turn is an autofs CIFS mount on the LXC host). The repo files are mounted -rwxr-xr-x and owned by the same user that runs gitea.
@zeripath commented on GitHub (May 25, 2020):
So this has to do with changes in go 1.14 that mean that CIFS has problems.
See:
https://github.com/golang/go/issues/39026#event-3329295983
https://github.com/golang/go/issues/38033
https://github.com/golang/go/issues/20400
It appears that
GODEBUG=asyncpreemptoff=1will reduce this from happening.Rather disappointingly:
It looks like the only way to fix this to either:
GODEBUG=asyncpreemptoff=1in the environment (!)(!)this is highly irritating.
@sshaikh commented on GitHub (May 25, 2020):
Ill have a play - this may be why I'm seeing another issue:
https://github.com/go-gitea/gitea/issues/11606
@zeripath commented on GitHub (May 25, 2020):
I suspect it's the same underlying issue.
@sshaikh commented on GitHub (May 25, 2020):
I can confirm that setting GODEBUG=asyncpreemptoff=1 fixed at least this issue.
Will monitor the other behaviours I noticed going forward.
@zeripath commented on GitHub (May 25, 2020):
I'm sorry it's a crap "solution" hopefully go 1.15 will fix it properly otherwise we're gonna have to wrap every call that could return an EINTR which will be beyond tiresome!
@stale[bot] commented on GitHub (Jul 25, 2020):
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
@zeripath commented on GitHub (Oct 11, 2020):
It would be useful to know if this is still happening as we've done a number of things to avoid this.
@sshaikh commented on GitHub (Oct 11, 2020):
So, update to latest version and remove GODEBUG=asyncpreemptoff=1?
If so I can give it a go over the next few days.
@zeripath commented on GitHub (Oct 11, 2020):
yeah that would be helpful
@sshaikh commented on GitHub (Oct 12, 2020):
I removed the GODEBUG and reproduced the issue with 1.12.
I then updated to 1.12.5 and did a repo sync, but unfortunately got the same "interrupted system call" error. I'll keep it as is for the time being to see if I get those random 500s too.
@zeripath commented on GitHub (Oct 12, 2020):
are you building with Go 1.15.x
@sshaikh commented on GitHub (Oct 12, 2020):
I used the binaries from the downloads page.
@sshaikh commented on GitHub (Oct 13, 2020):
Oh and I have seen the random 500s since too, so I've readded the env variable (which has done the tick again).
@sshaikh commented on GitHub (Jan 5, 2021):
I've removed
GODEBUG=asyncpreemptoff=1with 1.13.1 and can't see any immediate signs of the interruptions. I'll monitor and update if I see any further issues.@zeripath commented on GitHub (Jan 6, 2021):
OK I'll remove the confirmed label so this can go stale and we can close it if so
@sshaikh commented on GitHub (Jan 9, 2021):
Confirmed I'm afraid:
2021/01/09 18:13:31 routers/repo/repo.go:183:handleCreateError() [E] CreatePost: initRepository: createDelegateHooks: write new hook file '/appdata/repositories/user/repo.git/hooks/update.d/gitea': close /appdata/repositories/user/repo.git/hooks/update.d/gitea: interrupted system call@zeripath commented on GitHub (Jan 9, 2021):
if you confirm you have to tell us what version you are running.
@sshaikh commented on GitHub (Jan 9, 2021):
Version unchanged from my last report at 1.13.1.
@zeripath commented on GitHub (Jan 9, 2021):
damn.
@lunny commented on GitHub (Jan 14, 2021):
Have you stopped Gitea when you execute that command line?
@sshaikh commented on GitHub (Jan 14, 2021):
No, I haven't. But:
I don't actually use the command line, but so far it's been 100% correlated with the real GUI issues so is a deterministic enough test.
When I reconfirmed the issue on the 9th, it was after experiencing the issue creating a repo via the web, after which I recreated the issue on the command line in order to provide logs here.