Skip to content

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

Closed
@MarkusAmshove

Description

@MarkusAmshove

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions