Skip to content
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

Edit file times out for large files after recent cat-file bugfix #29346

Closed
brechtvl opened this issue Feb 23, 2024 · 4 comments · Fixed by #29354
Closed

Edit file times out for large files after recent cat-file bugfix #29346

brechtvl opened this issue Feb 23, 2024 · 4 comments · Fixed by #29354
Labels
Milestone

Comments

@brechtvl
Copy link
Contributor

Description

To reproduce:

  • Create new new repository with Apache 2.0 license
  • Click LICENSE file and Edit File
  • Operation times out

Happens for any larger text file, works fine for a small file.

I bisected the cause down to #29297.

Gitea Version

1.21.6

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Running locally on Linux with own build, but also happens on try.gitea.io.

Database

None

@brechtvl
Copy link
Contributor Author

CC @KN4CK3R as the author of this pull request.

I imagine this could affect more than just editing files.

@Joey291
Copy link

Joey291 commented Feb 23, 2024

can confirm. same here

i downgraded back to 1.21.5 and working fine again.

cant open "larger" files. editor hangs and nothing loads. with bigger files i mean for example (117 lines 6.9 KiB) or (2409 lines 39 KiB)
on the other side smaller files like (27 lines 895 B) works fine

running on a docker container. official image.

@KN4CK3R
Copy link
Member

KN4CK3R commented Feb 23, 2024

Nice... talked about that problem in the note here #29297 (comment) Calling Close multiple times is undefined behaviour.

@KN4CK3R
Copy link
Member

KN4CK3R commented Feb 23, 2024

Fixed in #29354

@lunny lunny added this to the 1.21.7 milestone Feb 24, 2024
wxiaoguang added a commit that referenced this issue Feb 24, 2024
Fixes #29346

---------

Co-authored-by: wxiaoguang <[email protected]>
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Feb 24, 2024
silverwind pushed a commit that referenced this issue Feb 24, 2024
Backport #29354 by @KN4CK3R

Fixes #29346

Co-authored-by: KN4CK3R <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants