-
Notifications
You must be signed in to change notification settings - Fork 452
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
[7.6.1] RuntimeError: TorrentState cannot be stored in the database #5928
Comments
This type of error can be reproduced by replacing normal |
The root cause of the corrupted file still remains unknown. One possible workaround in case of this error:
|
@kozlovsky what do you think, what is the best approach here? |
The root cause is indeed unclear. According to some reports, corruption on OS X can be caused by using memory-mapped I/O in SQLite, and in that case, we can recompile SQLite to turn off using memory-mapped I/O.
Looks like a correct approach. In principle, it is possible to save at least partial data from the corrupted database by performing backup and then restore. But this way we cannot be sure that the resulted database contains all data. So it is probably not worth it, and we just need to create afresh database so the user can start Tribler without experiencing the same error again. It may be not easy to rename the database file correctly, as another thread may hold a second connection to the database. Because of this, renaming should be performed at the next startup. As a flag that the renaming is necessary, we can create a file, like Beside |
@kozlovsky yes... Why I offered "rename" — because it should work even there is no free disk space. But this is just a rough idea. |
Indeed, we don't have to try to save the Channels DB data, because all the data is duplicated in the The solutionIn case of DB crash, we can show the user a dialog window offering them to "drop the database and restore personal channel from disk". After that, we create the DB anew and read the user's channel from disk. |
Actually, duplicate of #5252 |
Sentry issue: TRIBLER-17 A corrupted database seems like the most frequently reported issue now. |
the Sentry issue is not there. Closing this one |
Sentry Issue: TRIBLER-5M
The text was updated successfully, but these errors were encountered: