-
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
Download state are asynchronized in Tribler and libtorrent #3463
Comments
Update: adding time.sleep(2) after calling session.remove_download() could prevent this problem. |
@EinNarr note that adding a |
@devos50 I know that. And the sad news is that after running that for a whole day, I found the problem is still there. time.sleep() might have helped a bit, but it didn't solve the problem. |
there are some cases where deleting a torrent may legitimately take a very long time, but in normal circumstances is should not happen. For instance, on MacOS using the HFS+ filesystem, closing a file handle may take arbitrarily long. Since HFS+ doesn't support sparse files, closing the file will synchronise with the kernel zero-filling the gaps. There may be hints of why the torrent is still around in the libtorrent alerts. |
@arvidn thanks for that info, good to know! |
I monitored such problem that several minutes after removing a torrent by calling session.remove_download(), libtorrent still regard this download as existing, returning a valid handle when requested. However, Tribler regards this download not existing, returning false when LaunchManyCore.download_exists() is called, returning None when torrent handle is queried.
This problem is estimated to be caused by the ineffectiveness of removing download functions. remove_download is a asynchronized function in libtorrent, while when in Tribler handle and other record is immediately removed without waiting for the deferred. However, why the download is still there in libtorrent after several minutes is still a myth to me.
The text was updated successfully, but these errors were encountered: