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

Unable to Delete Repository Archives (zip, gz, etc) #16932

Closed
1 of 6 tasks
SoulSeekkor opened this issue Sep 2, 2021 · 2 comments · Fixed by #16934
Closed
1 of 6 tasks

Unable to Delete Repository Archives (zip, gz, etc) #16932

SoulSeekkor opened this issue Sep 2, 2021 · 2 comments · Fixed by #16934
Milestone

Comments

@SoulSeekkor
Copy link

SoulSeekkor commented Sep 2, 2021

  • Gitea version (or commit ref): 1.15.0 built with GNU Make 4.1, go1.16.7 : bindata, sqlite, sqlite_unlock_notify
  • Git version: 2.33.0.2
  • Operating system: Windows Server 2012 R2
    Running using your pre-build Win x64 binary. This is being started/stopped using a Windows service created per your installation instructions running as a local user with 'full control' of relevant folders.
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (Couldn't register or email was taking a super long time to come. May have to try this later.)
  • Log gist:
    Error in Task: Delete all repositories' archives (ZIP, TAR.GZ, etc..): remove C:\Gitea\data\repo-archive\10\a9\a9fa0ba947cb74b2654735a233ae41974582ffc5.tar.gz: The process cannot access the file because it is being used by another process.

Description

Whenever I run the "Delete all repositories' archives (ZIP, TAR.GZ, etc..)" maintenance operation under dashboard it fails to actually delete the repo archives with the error above shown under system notices.

@SoulSeekkor
Copy link
Author

Note that stopping, starting the service, then attempting this again right after made no difference (to ensure the file was not locked). It appears to lock the file just before trying to delete it causing it to fail.

@SoulSeekkor
Copy link
Author

Just tested this in 1.15.1 and it still occurs in that version as well.

zeripath added a commit to zeripath/gitea that referenced this issue Sep 2, 2021
Storage.Iterate provides the path and an open object. On windows using
local storage means that the objects will be locked thus preventing clean
from deleting them.

This PR simply closes the objects early.

Fix go-gitea#16932

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.15.2 milestone Sep 2, 2021
zeripath added a commit that referenced this issue Sep 3, 2021
Storage.Iterate provides the path and an open object. On windows using
local storage means that the objects will be locked thus preventing clean
from deleting them.

This PR simply closes the objects early.

Fix #16932

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this issue Sep 3, 2021
Backport go-gitea#16934

Storage.Iterate provides the path and an open object. On windows using
local storage means that the objects will be locked thus preventing clean
from deleting them.

This PR simply closes the objects early.

Fix go-gitea#16932

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit that referenced this issue Sep 3, 2021
Backport #16934

Storage.Iterate provides the path and an open object. On windows using
local storage means that the objects will be locked thus preventing clean
from deleting them.

This PR simply closes the objects early.

Fix #16932

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants