Skip to content

Visit gitea.com/iMartyn/helm-chart failure #17742

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
lunny opened this issue Nov 21, 2021 · 1 comment · Fixed by #17747
Closed

Visit gitea.com/iMartyn/helm-chart failure #17742

lunny opened this issue Nov 21, 2021 · 1 comment · Fixed by #17747

Comments

@lunny
Copy link
Member

lunny commented Nov 21, 2021

2021/11/21 20:12:26 ...ers/common/logger.go:21:1() [I] Started GET /iMartyn/helm-chart for 10.7.252.43:33941
2021/11/21 20:12:26 models/user.go:1388:getUserByID() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `email_notifications_preference`, `passwd`, `passwd_hash_algo`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `is_restricted`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `repo_admin_change_team_access`, `diff_view_style`, `theme`, `keep_activity_private` FROM `user` WHERE `id`=? LIMIT 1 [12511] - 1.103121ms
2021/11/21 20:12:26 ...s/issue_stopwatch.go:83:hasUserStopwatch() [I] [SQL] SELECT `id`, `issue_id`, `user_id`, `created_unix` FROM `stopwatch` WHERE (user_id = ?) LIMIT 1 [12511] - 554.456µs
2021/11/21 20:12:26 ...rm.io/xorm/engine.go:1139:Get() [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`, `num_projects`, `num_closed_projects`, `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`, `trust_model`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 [12511 helm-chart] - 723.652µs
2021/11/21 20:12:26 ...rm.io/xorm/engine.go:1139:Get() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode`, `created_unix`, `updated_unix` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 [16590 12511] - 419.643µs
2021/11/21 20:12:26 models/repo_unit.go:212:getUnitsByRepoID() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) [16590] - 431.749µs
2021/11/21 20:12:26 ...s/repo_pushmirror.go:102:GetPushMirrorsByRepoID() [I] [SQL] SELECT `id`, `repo_id`, `remote_name`, `interval`, `created_unix`, `last_update`, `last_error` FROM `push_mirror` WHERE (repo_id=?) [16590] - 448.668µs
2021/11/21 20:12:26 ...ules/context/repo.go:470:RepoAssignment() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? [16590 false] - 364.267µs
2021/11/21 20:12:26 ...ules/context/repo.go:477:RepoAssignment() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? AND is_tag=? [16590 false false] - 311.039µs
2021/11/21 20:12:26 models/org.go:512:getOwnedOrgsByUserID() [I] [SQL] SELECT * FROM `user` INNER JOIN `team_user` ON `team_user`.org_id=`user`.id INNER JOIN `team` ON `team`.id=`team_user`.team_id WHERE (`team_user`.uid=?) AND (`team`.authorize=?) ORDER BY `user`.`name` ASC [12511 owner] - 1.323065ms
2021/11/21 20:12:26 ...rm.io/xorm/engine.go:1139:Get() [I] [SQL] SELECT `id`, `user_id`, `repo_id`, `mode`, `created_unix`, `updated_unix` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 [12511 16590] - 374.266µs
2021/11/21 20:12:26 ...rm.io/xorm/engine.go:1139:Get() [I] [SQL] SELECT `id`, `uid`, `repo_id`, `created_unix` FROM `star` WHERE `uid`=? AND `repo_id`=? LIMIT 1 [12511 16590] - 331.249µs
2021/11/21 20:12:26 models/repo.go:1733:getRepositoryByID() [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`, `num_projects`, `num_closed_projects`, `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`, `trust_model`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 [15815] - 595.198µs
2021/11/21 20:12:26 models/user.go:1388:getUserByID() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `email_notifications_preference`, `passwd`, `passwd_hash_algo`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `is_restricted`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `repo_admin_change_team_access`, `diff_view_style`, `theme`, `keep_activity_private` FROM `user` WHERE `id`=? LIMIT 1 [3] - 551.253µs
2021/11/21 20:12:26 ...ules/context/repo.go:553:RepoAssignment() [E] GetTags: exit status 128 - fatal: not a git repository (or any parent up to mount point /)
	Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
	
	/source/modules/context/repo.go:553 (0x17767d1)
	/source/modules/web/route.go:56 (0x20825bb)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/vendor/github.com/go-chi/chi/v5/mux.go:442 (0x175f768)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/modules/web/route.go:113 (0x20829f6)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/modules/web/route.go:113 (0x20829f6)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/modules/web/route.go:113 (0x20829f6)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/vendor/github.com/go-chi/chi/middleware/get_head.go:37 (0x20a62a1)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/modules/web/route.go:113 (0x20829f6)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/modules/context/context.go:753 (0x17805a9)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/vendor/github.com/go-chi/chi/v5/mux.go:71 (0x175d2c9)
	/source/vendor/github.com/go-chi/chi/v5/mux.go:314 (0x1763735)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/vendor/github.com/go-chi/chi/v5/mux.go:442 (0x175f768)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/routers/web/base.go:177 (0x22cd130)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/vendor/gitea.com/go-chi/session/session.go:257 (0x14b308e)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/modules/public/public.go:42 (0x166da8e)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/vendor/github.com/go-chi/chi/v5/mux.go:71 (0x175d2c9)
	/source/vendor/github.com/go-chi/chi/v5/mux.go:314 (0x1763735)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/vendor/github.com/go-chi/chi/v5/mux.go:442 (0x175f768)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/routers/common/middleware.go:72 (0x20aacdd)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/routers/common/logger.go:23 (0x20a9f3b)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/vendor/github.com/go-chi/chi/middleware/strip.go:30 (0x20a6ba7)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/vendor/github.com/chi-middleware/proxy/middleware.go:37 (0x20a1ece)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/routers/common/middleware.go:25 (0x20aa83c)
	/usr/local/go/src/net/http/server.go:2049 (0x7bf063)
	/source/vendor/github.com/go-chi/chi/v5/mux.go:88 (0x175d04f)
	/source/modules/web/route.go:328 (0x2081753)
	/usr/local/go/src/net/http/server.go:2867 (0x7c2622)
	/usr/local/go/src/net/http/server.go:1932 (0x7bdb4c)
	/usr/local/go/src/runtime/asm_amd64.s:1371 (0x47aa40)
	

2021/11/21 20:12:26 ...dels/notification.go:733:GetNotificationCount() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) [12511 1] - 696.187µs
2021/11/21 20:12:26 ...ers/common/logger.go:30:1() [I] Completed GET /iMartyn/helm-chart 500 Internal Server Error in 15.651605ms
@zeripath
Copy link
Contributor

zeripath commented Nov 21, 2021

If the underlying git repository is totally broken there is not a lot we can do - it's fundamentally an internal server error.

I guess we can make a page similar to the empty repository or creating repository page - but it's worth noting that there is a potential issue regarding deadlocking things so we cannot expose the issues or pulls pages.

I will check the API to see what happens there. - API seems to be fine.

zeripath added a commit to zeripath/gitea that referenced this issue Nov 21, 2021
In go-gitea#17742 it was noted that there a completely invalid git repository underlying a
repo on gitea.com. This happened due to a problem during a migration however, it
is not beyond the realms of possibility that a corruption could occur to another
user.

This PR adds a check to RepoAssignment that will detect if a repository loading has
failed due to an absent git repository. It will then show a page suggesting the user
contacts the administrator or deletes the repository.

Fix go-gitea#17742

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit that referenced this issue Nov 22, 2021
* More pleasantly handle broken or missing git repositories

In #17742 it was noted that there a completely invalid git repository underlying a
repo on gitea.com. This happened due to a problem during a migration however, it
is not beyond the realms of possibility that a corruption could occur to another
user.

This PR adds a check to RepoAssignment that will detect if a repository loading has
failed due to an absent git repository. It will then show a page suggesting the user
contacts the administrator or deletes the repository.

Fix #17742

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

* Update options/locale/locale_en-US.ini

Co-authored-by: techknowlogick <techknowlogick@gitea.io>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
…7747)

* More pleasantly handle broken or missing git repositories

In go-gitea#17742 it was noted that there a completely invalid git repository underlying a
repo on gitea.com. This happened due to a problem during a migration however, it
is not beyond the realms of possibility that a corruption could occur to another
user.

This PR adds a check to RepoAssignment that will detect if a repository loading has
failed due to an absent git repository. It will then show a page suggesting the user
contacts the administrator or deletes the repository.

Fix go-gitea#17742

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

* Update options/locale/locale_en-US.ini

Co-authored-by: techknowlogick <techknowlogick@gitea.io>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@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.

2 participants