Skip to content

Hang with 1.20.2/1.20.3 #26684

Closed
Closed
@elburb

Description

@elburb

Description

I run a medium sized, public gitea instance, we have approx 2.5k users with 1k repositories (about 6GB in total).

Starting with 1.20.2 we started experiencing an issue where, after some seemingly random period, trying to access repositories appears to hang or deadlock, both via the web interface or via SSH. We've got nothing to correlate when the issue occurs, sometimes it happens within a few minutes of restarting, sometimes hours. When it does occur we still seem able to access the web interface for non repository things (i.e. admin admin pages).
I've confirmed the issue still happens in 1.20.3 but it no longer occurs after rolling back to 1.20.1.

So far, I've not been able to properly narrow down what is causing the hang.
I see some 'slow' requests in the router logs which just seem indicative of the hanging, but nothing else that seems unusual:

2023/08/23 02:25:04 ...eb/routing/logger.go:68:func1() [W] router: slow      POST /api/internal/ssh/1985/update/3 for <redacted>:0, elapsed 3354.7ms @ private/key.go:16(private.UpdatePublicKeyInRepo)
2023/08/23 02:25:06 ...eb/routing/logger.go:68:func1() [W] router: slow      POST /api/internal/ssh/1985/update/3 for <redacted>:0, elapsed 3269.4ms @ private/key.go:16(private.UpdatePublicKeyInRepo)

On the host, I see a bunch of waiting processes, but I think that is also just showing normal activity that is hung ?

git      1251330 1251329  0 Aug22 ?        00:00:00 -bash
git      1405726       1  0 06:58 ?        00:01:58 /home/git/gitea web
git      1417492 1405726  0 07:44 ?        00:00:00 /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
git      1417493 1405726  0 07:44 ?        00:00:00 /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
git      1417628 1405726  0 07:44 ?        00:00:00 /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
git      1417629 1405726  0 07:44 ?        00:00:01 /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
git      1420047       1  0 07:58 ?        00:00:00 /usr/lib/git-core/git remote-https origin https://oauth2:<redacted>@git.dn42.dev/dn42/registry.git
git      1420048 1420047  0 07:58 ?        00:00:02 /usr/lib/git-core/git-remote-https origin https://oauth2:<redacted>@git.dn42.dev/dn42/registry.git
git      1421921       1  0 08:08 ?        00:00:00 /usr/lib/git-core/git remote-https origin https://oauth2:<redacted>@git.dn42.dev/dn42/registry.git
git      1421922 1421921  0 08:08 ?        00:00:01 /usr/lib/git-core/git-remote-https origin https://oauth2:<redacted>@git.dn42.dev/dn42/registry.git
git      1422176       1  0 08:10 ?        00:00:00 /lib/systemd/systemd --user
git      1422177 1422176  0 08:10 ?        00:00:00 (sd-pam)
git      1423695       1  0 08:18 ?        00:00:00 /usr/lib/git-core/git remote-https origin https://oauth2:<redacted>@git.dn42.dev/dn42/registry.git
git      1423696 1423695  0 08:18 ?        00:00:01 /usr/lib/git-core/git-remote-https origin https://oauth2:<redacted>@git.dn42.dev/dn42/registry.git
git      1425427       1  0 08:28 ?        00:00:00 /usr/lib/git-core/git remote-https origin https://oauth2:<redacted>@git.dn42.dev/dn42/registry.git
git      1425428 1425427  0 08:28 ?        00:00:00 /usr/lib/git-core/git-remote-https origin https://oauth2:<redacted>@git.dn42.dev/dn42/registry.git
git      1428317 1405726  0 08:44 ?        00:00:00 /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
git      1428318 1405726  0 08:44 ?        00:00:00 /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
git      1428442       1  0 08:44 ?        00:00:00 /home/git/gitea --config=/home/git/custom/conf/app.ini serv key-1478
git      1428470 1428455  0 08:45 ?        00:00:00 sshd: git@notty
git      1428471 1428470  0 08:45 ?        00:00:00 /home/git/gitea --config=/home/git/custom/conf/app.ini serv key-1985
git      1428498 1428457  0 08:45 ?        00:00:00 sshd: git@notty
git      1428499 1428498  0 08:45 ?        00:00:00 /home/git/gitea --config=/home/git/custom/conf/app.ini serv key-358
git      1428521 1428485  0 08:45 ?        00:00:00 sshd: git@notty
git      1428531 1428487  0 08:45 ?        00:00:00 sshd: git@notty
git      1428532 1428521  0 08:45 ?        00:00:00 /home/git/gitea --config=/home/git/custom/conf/app.ini serv key-237
git      1428546 1428531  0 08:45 ?        00:00:00 /home/git/gitea --config=/home/git/custom/conf/app.ini serv key-586
git      1428571 1428557  0 08:45 ?        00:00:00 sshd: git@notty
git      1428572 1428571  0 08:45 ?        00:00:00 /home/git/gitea --config=/home/git/custom/conf/app.ini serv key-1985
git      1428599 1428588  0 08:45 ?        00:00:00 sshd: git@notty
git      1428600 1428599  0 08:45 ?        00:00:00 /home/git/gitea --config=/home/git/custom/conf/app.ini serv key-357

gitea doctor check --all came back clean and I've also run gitea doctor recreate-table without any obvious impact.

Without seeing a specific error, I'm at a loss as to what else to look for so would appreciate some initial advice or guide on what I can do to get some additional information and narrow down what the root cause would be ?

Gitea Version

1.20.2 & 1.20.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.34.1

Operating System

No response

How are you running Gitea?

We are running gitea downloaded as a binary from https://github.com/go-gitea/gitea/releases as a systemd service under ubuntu 22.04.3. Gitea is proxied by traefik for web connections.

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions