Skip to content

Gitea lockup on adopting repository with sqlite #33561

Closed
@TheFox0x7

Description

@TheFox0x7

Description

If someone tries to adopt a repository on their instance that has a large amount of tags (tested on linux repository) the entire instance hangs.

Reproduction steps:

  1. Configure gitea with sqlite
  2. Copy a repository to any user directory where it can be adopted
  3. Adopt the repository
  4. Try to access any gitea page with browser or curl an endpoint which requires a database query - /explore/repos seems to work as demo

Expected behavior:
Gitea returns a page for visitor as normal and continues to adopt the repository

Actual behavior:
Entire instance doesn't respond to any requests except those which don't need database query - curl on homepage for anonymous user works but /explore/repos endpoint doesn't.

It does not happen with postgres, so I think it's sqlite specific - probably something to do with the entire thing being in transaction but I'm speculating at this point as I don't know enough about that area.

This does not happen with regular repository migration.

gitea-diagnosis-20250211-173242.zip

Gitea Version

1.23.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

linux

How are you running Gitea?

selfbuild, reproduced in container.

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