Skip to content

PR Diff View takes a very long time to load: failed to run attr-check: context deadline exceeded #31600

Closed
@engaltori

Description

@engaltori

Description

Hello,

Since the update from 1.21.11 to 1.22.1 I have a problem displaying the differences of commits/PRs.
It takes several minutes for the pages to appear at all.

On the Stacktrace Page of Gitea i see that Gitea stuck on these commands:

  • /usr/bin/git cat-file --batch-check [repo_path: /data/git/repositories/test/test.git] (modules/gitrepo/gitrepo.go:31)
  • /usr/bin/git cat-file --batch [repo_path: /data/git/repositories/test/test.git] (modules/gitrepo/gitrepo.go:31)
  • git(dir:/data/git/repositories/test/test.git): /usr/bin/git -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= check-attr --stdin -z --cached linguist-vendored linguist-generated linguist-documentation linguist-detectable linguist-language gitlab-language

image
All these Git processes are in sleep state according to the system.

The Full log of Gitea is in the Gist. The Git check-attr Command start on line 17421 and Ends on Line 53584 with a Error : failed to run attr-check. Error: context deadline exceeded

I cannot reproduce this issue in other Repos. The Issue is only in some PRs of this Repo (Mostly the ones with many files (>50)). The Repo has more than 9909 Commit with currently 280 Branches with a Size of 360 MiB (Git 152 MiB, LFS: 208 MiB).

Other Fact: When i run strace on the Gitea Process with all Childs, then this Issue does not occur.

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/andre-bergemann/580e08a7a4fdb44b67b3a1664375c6d7

Screenshots

No response

Git Version

2.45.2

Operating System

Ubuntu

How are you running Gitea?

Custom Container (For Gitea Config Changes) of the Gitea Docker Image (gitea/gitea:1.22.1) on Ubuntu 22.04.2 VM with Docker Engine 23.0.1

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 detailissue/regressionIndicates a previously functioning feature or behavior that has broken or regressed after a changeperformance/bigrepoPerformance Issues affecting Big Repositoriesperformance/speedperformance issues with slow downstype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions