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

Corrupted download archives #11380

Closed
2 of 7 tasks
japettyjohn opened this issue May 11, 2020 · 5 comments
Closed
2 of 7 tasks

Corrupted download archives #11380

japettyjohn opened this issue May 11, 2020 · 5 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@japettyjohn
Copy link

  • Gitea version (or commit ref): 1.11.3
  • Git version: 2.11.0
  • Operating system: 9.12
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

The API to download a zip/tgz archive does not cleanup the archive made in the case of an error. So while a 500 will result from the first attempt, all subsequent attempts on the same commit ID will get the corrupted file from the disk and a 200 OK. This is not addressed in master (b7c82cd1a9) either.

Reproducing this is a requires making the git archive command fail. In my case this was from a timeout.

Screenshots

No UI elements involved.

@kevans91
Copy link
Contributor

This can or will be alleviated by #11296, perhaps, which starts generating the archives off in tmpdir then quickly copying them over to their final location upon success.

@heindl-solutions
Copy link

timeout settings added in #6015 might help

@stale
Copy link

stale bot commented Jul 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Jul 12, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Jul 18, 2020
@stale stale bot removed the issue/stale label Jul 18, 2020
@lunny lunny closed this as completed Apr 24, 2021
@OzWookiee
Copy link

Can confirm I have this issue with the latest version of Gitea. We have a large repo but have limited the archive to a single directory with .gitattributes however the release archive creates a broken zip/tar of 580Mb when it should be around 1.7Gb

[git.timeout]
DEFAUlT = 720
MIGRATE = 1200
MIRROR = 600
CLONE = 600
PULL = 600
GC = 120

these changes to the app.ini have not had an impact on the archive creation.

@zeripath
Copy link
Contributor

Please don't comment on closed issues - open a new one referring to the closed issue so that we get full information.

Gitea generates >100 notifications a day - commenting on closed issues is a good way to get ignored.

@go-gitea go-gitea locked as resolved and limited conversation to collaborators May 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

No branches or pull requests

7 participants