Skip to content

Repositories with (big?) editorconfig can't load #29402

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
MarkusAmshove opened this issue Feb 25, 2024 · 7 comments
Closed

Repositories with (big?) editorconfig can't load #29402

MarkusAmshove opened this issue Feb 25, 2024 · 7 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug

Comments

@MarkusAmshove
Copy link
Contributor

Description

Since the update to 1.21.6 I can't view some "home" pages of repositories, resulting in the following logs:

2024/02/25 19:13:22 ...eb/routing/logger.go:68:func1() [W] router: slow      GET /org/repo for ....:0, elapsed 3280.9ms @ repo/middlewares.go:17(repo.SetEditorconfigIfExists)
2024/02/25 19:14:18 ...ers/web/repo/view.go:675:checkHomeCodeViewable() [E] ReadBy: context canceled
2024/02/25 19:14:18 .../context_response.go:68:HTML() [D] Template: status/500
2024/02/25 19:14:18 ...dules/git/command.go:344:Run() [D] slow git.Command.Run: /usr/bin/git -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= cat-file --batch-check (1m0.028896423s)
2024/02/25 19:14:18 ...dules/git/command.go:344:Run() [D] slow git.Command.Run: /usr/bin/git -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= cat-file --batch (1m0.029096177s)
2024/02/25 19:14:18 ...eb/routing/logger.go:102:func1() [I] router: completed GET /org/repo for ....:0, 500 Internal Server Error in 60041.7ms @ repo/view.go:730(repo.Home)
2024/02/25 19:14:18 .../context_response.go:68:HTML() [D] Template: status/404
2024/02/25 19:14:18 ...eb/routing/logger.go:102:func1() [I] router: completed GET /error/HTTP_BAD_GATEWAY.html.var for 10.120.28.76:0, 404 Not Found in 8.9ms @ context/repo.go:425(context.RepoAssignment)

I've cloned one repository that doesn't work in our instance to try.gitea, but there it works fine:
https://try.gitea.io/MarkusAmshove/natls

If I open /org/repo/pulls in the browser I instantly get the pulls site. I can even go into pull requests, but once I click on the Files changed tab it hangs again.
I guess that it has something to do with the editorconfig, since its logged as warning and both the Files changed tab and home view of the repository might use it (for the README?).

In the example repository on try.gitea you can see that the editorconfig is quite big. Some other repositories that have rather small editorconfigs work fine.

Reverting to 1.21.5 resolved the issue.

Gitea Version

1.21.6

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?

Downloaded amd64 linux binary, using systemd.

Database

PostgreSQL

@delvh
Copy link
Member

delvh commented Feb 25, 2024

Hmm… according to the logs, my primary suspicion is #29310.
However, I have no idea how that might be related.
Could it be that your Gitea instance is run on Windows?

@MarkusAmshove
Copy link
Contributor Author

MarkusAmshove commented Feb 25, 2024

It's SLES 15, run with the amd64 ELF binary, no docker.

Might it be hanging because it's waiting for more Output that has been discarded?

@derelm
Copy link
Contributor

derelm commented Feb 25, 2024

Thanks @MarkusAmshove i am experiencing something similar; for me the page just never finishes (or maybe i have just never been patient enough to wait for more than a couple of minutes).
The logs are roughly the same - no real error message but just a warning that the router is slow.

Platform is amd64 binary, no reverse proxy

@RouxAntoine
Copy link

same for me on repository home page: gitea version v1.21.6

2024/02/25 23:57:36 ...eb/routing/logger.go:102:func1() [I] router: completed GET /kotlin/nextcloud-uploader for 192.168.2.254:0, 500 Internal Server Error in 228.1ms @ repo/view.go:730(repo.Home)
2024/02/25 23:57:36 ...ers/web/repo/view.go:675:checkHomeCodeViewable() [E] ReadBy: context canceled

@achikhv
Copy link

achikhv commented Feb 26, 2024

Same problem. editorconfig is 144 lines and 6.8kB if it is relevant.

@wxiaoguang
Copy link
Contributor

Please use Gitea 1.21 nightly, it should have been fixed there.

@wxiaoguang wxiaoguang added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Feb 26, 2024
@lunny
Copy link
Member

lunny commented Feb 26, 2024

Fixed by #29370 and will be released on v1.21.7

@lunny lunny closed this as completed Feb 26, 2024
lunny added a commit that referenced this issue Feb 26, 2024
This is an emergency release to fix the bug #29402.

---------

Co-authored-by: wxiaoguang <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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

7 participants