mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-15 20:09:18 -05:00
Migration stuck for some repos #4235
Closed
opened 2025-11-02 05:43:22 -06:00 by GiteaMirror
·
40 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16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1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#4235
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Codeberg-org on GitHub (Nov 3, 2019).
[x]): whatever runs on try.gitea.ioDescription
Trying to migrate https://github.com/kriztan/Pix-Art-Messenger with issues, wiki, pull requests and releases to Gitea, the migration is stuck, and the repo inaccessible.
No
Settingstab either, so it is impossible to cancel the migration or delete the broken repo.Screenshots
@ashimokawa commented on GitHub (Nov 4, 2019):
@lunny
This is clearly a kind/bug.
The migration fails silently and the animation is running forever.
Not even the first issue (which is a PR with deleted branches) is migrated properly.
@lunny commented on GitHub (Nov 4, 2019):
I think we can add a
cancelbutton here.@ashimokawa commented on GitHub (Nov 4, 2019):
@lunny
Sure, but that does not fix the underlying problem. The migrations fails somehow, always, reproducible with the repo mentioned above https://github.com/kriztan/Pix-Art-Messenger
@6543 commented on GitHub (Nov 4, 2019):
it works on gitea.com ( 1.11.0+dev-110-gc4bc5abda)
and 1.9.5 (with a timeout message but it works)
and https://try.gitea.io/abcKing/s
@6543 commented on GitHub (Nov 4, 2019):
maby some space limitations based on user? or something like that?
@6543 commented on GitHub (Nov 4, 2019):
@lunny what happen wen a user run out of granted space when he has a migration job?
@lunny commented on GitHub (Nov 5, 2019):
@6543 The repository should be deleted if any error found on the migrating. And a notice will be displayed on admin panel notices.
@lunny commented on GitHub (Nov 5, 2019):
As an enhancements for the migration process, I will send another PRs to split the process as serval parts.
@ashimokawa commented on GitHub (Nov 5, 2019):
@6543
No it does not work when migration with issues and pr, please read the original issue description:
EDIT: This also has nothing to do with space restrictions, happens on all gitea instances, always. I think above repository is perfect for testing and fixing the problem.
Maybe it was not wise to create a 2-in-1 issue, actually these should be two:
@lafriks commented on GitHub (Nov 5, 2019):
Imho problem is that if Gitea is restarted while migration is running it will be left unfinished
@ashimokawa commented on GitHub (Nov 5, 2019):
@lafriks
@lunny
No, it happens always on any instance, not only when restarting.
We did not restart try.gitea.io (we can't) and it happens on our test instance also. You can reproduce it easily by migrating https://github.com/kriztan/Pix-Art-Messenger
@lunny commented on GitHub (Nov 5, 2019):
@ashimokawa I will try that repository.
@mrsdizzie commented on GitHub (Nov 5, 2019):
I started to debug this a bit and ran out of time but if it is helpful for you @lunny what is happening is that at some point inserting a batch of releases from this repo is throwing the error:
And then it goes into rollback but never comes out. It seems to get here:
45f219239e/vendor/xorm.io/xorm/session_delete.go (L211)And then the it hits this code and seems to never really do anything after that:
45f219239e/vendor/xorm.io/xorm/session_raw.go (L177-L179)That runs some code in the specific driver for the database, but I'm able to reproduce on sqlite3 and assume try.gitea.io and codeberg are using something else so I wonder if it just isn't returning an error where it should at some point. Not familiar with xorm at all though :-/
I tried with lafriks patch too but seems unrelated in this case (though helpful in general)
@ashimokawa commented on GitHub (Nov 5, 2019):
@mrsdizzie
Yep, codeberg.org runs mariadb and not sqlite.
I assume you tried the repo I mentioned with full migration?
The only thing a saw in logs is that a rollback failed (timout? stuck?), I really do not remember because I was also in a hurry.
@mrsdizzie commented on GitHub (Nov 5, 2019):
Yes, it is specifically the releases that are causing the initial migration of this particular repo to fail and then there is a separate (and much worse) problem of the rollback not finishing properly after the migration fails.
@lunny commented on GitHub (Nov 6, 2019):
@mrsdizzie Thanks for your work!
So
means there are duplicated releases on that repository??? I will take a look at that code.
@ashimokawa commented on GitHub (Nov 6, 2019):
I can confirm that migrating the repository without releases works.
@techknowlogick commented on GitHub (Dec 2, 2019):
It seems unusual that there would be a duplicate release, as I'm not sure that git allows same tag to be used twice. Regardless of that assumption, I am able to replicate same error as above, but able to have successful migration when release is unchecked (I tested on sqlite as that's what I am using on my dev instance, but will try with postgres later, as that's whats on my prod instance).
@mrsdizzie commented on GitHub (Dec 2, 2019):
It could be a bug in the migrating that perhaps tries to insert the same release twice as well.
The 100% certain bug is that the rollback isn't finishing but I didn't know enough about xorm etc to really figure out why that is happening here.
@lunny commented on GitHub (Dec 11, 2019):
#9319 shoud fix another bug but not this one. But @ashimokawa , you can still try it.
@mrsdizzie commented on GitHub (Dec 11, 2019):
The specific example from this issue should be fixd, see:
https://try.gitea.io/mrsdizzie/Pix-Art-Messenger
But the original issue exposed a lower level bug in rollback that is still present (though not triggered anymore through this issue) and should probably stay open until that is fixed.
Plus there are the other aspects like not being able to cancel a migration that is stuck for any reason which should be possible
@lunny commented on GitHub (Dec 11, 2019):
@mrsdizzie it could be deleted from admin panel currently. :)
@ashimokawa commented on GitHub (Dec 12, 2019):
@lunny
I can confirm that the specific case I opened this issue for is fixed. So normally I would close this one.
@ashimokawa commented on GitHub (Dec 12, 2019):
@lunny @mrsdizzie
Stuck repos can be deleted by the user by just manually navigating to his settings, even in that stuck state.
https://try.gitea.io/mrsdizzie/Pix-Art-Messenger/settings (example, I tried this with a real stuck repo)
Don't know if that is good or not.
@lunny commented on GitHub (Dec 12, 2019):
@ashimokawa :)
@mrsdizzie commented on GitHub (Dec 12, 2019):
There is no link to that settings page if it is stuck migrating (though visiting the URL directly works). So it is good but could be better.
I think the general bug still exists that it shouldn't be possible for it to get stuck at all (it should work or fail), but now this example will not trigger it so perhaps harder to reproduce. @lunny maybe if you have time to look at the xorm code from above, if not then I'm not sure : ) Glad that this example helped fix the bug causing it anyway so thanks!
@saurasambit commented on GitHub (Feb 9, 2020):
I faced the issue while migrating https://github.com/jitsi/jitsi-meet.
See https://try.gitea.io/dashadsh/jitsi-meet for the reproduced problem.
@dkebler commented on GitHub (Mar 16, 2020):
Just had this happen to me after migrating many repos to my backup site. How does one get rid of this aborted migration? Not via the webui as there is no access to "settings" since the migration was not completed. I restarted my instance and web server but it must be in the db itself. How can on repair the
git.db?Of Note. I see that I had 7000+ pages of system notices all one date all about not being able to access the main git from which the migrations come. This backup install has been acting funny too. Slow page loads, popup notices above loosing data if moving to another page which I wasn't. I'm guessing this is a corrupted data base maybe from loading up on all those system notifications. 7000 pages is excessive no :-). Luckily I have daily backups and a backup from when I upgraded in Jan. Will try those if I can solve this otherwise.
Of real note is that my main gitea db is only 2mb
but the backup gitea (of the same repos as migrations) is 47mb! Maybe 7000 pages i.e. 45mb of system notifications? Anyway something has gone horribly wrong with the db of my backup gitea install. It's look more and more like the logging system gone amok. Today's gitea.log is 179mb! with unending entries like so
2020/03/16 00:00:11 ...eue/queue_wrapped.go:69:setInternal() [W] [Attempt: 706] Failed to create queue: level for task cfg: {/mnt/data/git/data/queues/task 1000 20 1 6 1s 5m0s 5 task-level} error: leveldb: manifest corrupted (field 'comparer'): missing [file=MANIFEST-000020]@dkebler commented on GitHub (Mar 16, 2020):
I was able to delete all the notifications via the UI and under site administration /admin/repos I was able to delete the offending migration.
I then attempted to make anew the migration and it was the same issue :-(
I have been using 1.1 now going to try upgrading to 1.96.
@dkebler commented on GitHub (Mar 17, 2020):
I upgraded both installs to 1.9.6. I deleted and recreated the offending repo on the main gitea install and pushed it again from local. Then tried again to make a migration on my backup gitea from main gitea install and YEA that worked.
So only 2 issues for me now.
that my git.db on my backup install is still 47mb. Apparently sqlite has no way to compact after deleting all those pages of notifications? https://www.recoveryandmanagement.com/repair-sqlite-database-manually/
Why did gitea create 7000 pages worth of notifications/logs. Was that 'bug' fixed going from 1.1 to 1.9.6?
@lunny commented on GitHub (Mar 17, 2020):
That admin notices could be deleted after your problem resolved.
@guillep2k commented on GitHub (Mar 17, 2020):
@dkebler Sincerely, 1.1 was so long ago... so many things have changed since then: refactors, rewriting, updating libraries... I'd even suggest you upgrade to 1.11.3 while you're at it; a lot of good features and bugfixes were added since 1.9.6 already.
@qdzhaov commented on GitHub (Apr 14, 2020):
I found the bug like this.
When I Migration a Repositories from gogs(,need a user name a password ,but I don't give,so
the task is in dead loop.(This bug is also in gogs.)
@guillep2k commented on GitHub (Apr 15, 2020):
@qdzhaov What version of Gogs are you migrating from? (I take it's not an upgrade but a site-to-site migration)
@stale[bot] commented on GitHub (Jun 14, 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.
@theAkito commented on GitHub (Jul 5, 2020):
I've upgraded from
6af13dbacto15d3aa7b95, because I had this issue on the former version. Now the issue is gone and mirroring works.I encountered that issue with another repository. The mirroring worked after restarting Gitea.
@1byte2bytes commented on GitHub (Sep 14, 2020):
I encounter the issue of migration getting stuck while trying to mirror https://github.com/apache/spamassassin to my Gitea instance, using Gitea 1.14.8 on Debian 10. Restarting the Gitea server did not fix the importing for me.
@jolheiser commented on GitHub (Sep 14, 2020):
Currently Gitea is version
1.12.4heading towards1.13.@6543 commented on GitHub (Sep 14, 2020):
@1byte2bytes found a bug related to DefaultBranch != "master" - it could have hit you ...
(#12843)
@6543 commented on GitHub (Sep 15, 2020):
ok since Pix-Art-Messenger can be migrated (tested) I think it's time to close this issue
@1byte2bytes if gitea v1.12.5 has ben released and it still does not work, feel free to create an issue :)
and for cancel suggestions: (#12845)