-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Migration stuck for some repos #8812
Comments
@lunny The migration fails silently and the animation is running forever. |
I think we can add a |
@lunny |
it works on gitea.com ( 1.11.0+dev-110-gc4bc5abda) |
maby some space limitations based on user? or something like that? |
@lunny what happen wen a user run out of granted space when he has a migration job? |
@6543 The repository should be deleted if any error found on the migrating. And a notice will be displayed on admin panel notices. |
As an enhancements for the migration process, I will send another PRs to split the process as serval parts. |
@6543
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:
|
Imho problem is that if Gitea is restarted while migration is running it will be left unfinished |
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 |
@ashimokawa I will try that repository. |
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: gitea/vendor/xorm.io/xorm/session_delete.go Line 211 in 45f2192
And then the it hits this code and seems to never really do anything after that: gitea/vendor/xorm.io/xorm/session_raw.go Lines 177 to 179 in 45f2192
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) |
@mrsdizzie 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. |
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. |
@mrsdizzie Thanks for your work!
means there are duplicated releases on that repository??? I will take a look at that code. |
I can confirm that migrating the repository without releases works. |
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). |
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. |
#9319 shoud fix another bug but not this one. But @ashimokawa , you can still try it. |
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 |
@mrsdizzie it could be deleted from admin panel currently. :) |
@lunny |
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. |
@ashimokawa :) |
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! |
I faced the issue while migrating https://github.com/jitsi/jitsi-meet. |
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 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 |
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 have been using 1.1 now going to try upgrading to 1.96. |
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 admin notices could be deleted after your problem resolved. |
@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. |
I found the bug like this.
|
@qdzhaov What version of Gogs are you migrating from? (I take it's not an upgrade but a site-to-site migration) |
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. |
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. |
Currently Gitea is version |
@1byte2bytes found a bug related to DefaultBranch != "master" - it could have hit you ... (#12843) |
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 :) |
[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
Settings
tab either, so it is impossible to cancel the migration or delete the broken repo.Screenshots
The text was updated successfully, but these errors were encountered: