-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
qBittorrent crashes on start: check_invariant: current_stats_state() == ... #4665
Comments
I think that invariant check is probably wrong. It's clear that the torrent is just about to not be in checking mode anymore. I imagine the torrent state is updated slightly out-of-sync with the counters there, causing the invariant to be broken. Does this happen when a file that's being checked encounters some kind of disk error? (that would explain why this case doesn't have good test coverage) |
Is missing files constitutes such an error? I do have several torrents permanently errored due to missing files. I can check which torrent it is and what seems wrong with it.
…On May 22, 2020 12:24:31 AM GMT+03:00, Arvid Norberg ***@***.***> wrote:
I think that invariant check is probably wrong. It's clear that the
torrent is just about to not be in checking mode anymore. I imagine the
torrent state is updated slightly out-of-sync with the counters there,
causing the invariant to be broken.
Does this happen when a file that's being checked encounters some kind
of disk error? (that would explain why this case doesn't have good test
coverage)
|
you could try to build with invariant checks disabled, or comment out that specific invariant check that's failing to see. Also, the error should be visible in the debugger (whatever is causing the call to Actually, come to think of it, this could be caused by the |
This is is
Yes, the torrent indeed has missing files, because I usually don't bother deleting torrents from the qBittorrent interface. |
I just noticed this stack frame:
Is that part of qbt? That's probably why I haven't been able to reproduce this |
Could you (or someone else seeing this having this problem) give this a try? #4677 |
@arvidn I applied the patch, and I've got another stack trace for you. It's the same torrent file with missing files.
|
|
I'm going to iteratively add
|
For me I have this:
|
The original issue of this ticket appears to be caused by a plugin altering the libtorrent state in one of its callbacks. This is reasonable and expected behavior from a plugin, but it's not something that the current invariant checks sprinkled throughout libtorrent has taken into account. I made an effort to address this, but it turns out to be non-trivial. I'm tempted to simply suggest disabling invariant checks when using plugins. At least for now. @zywo is your case also when using a plugin? |
@zywo ping 👆 |
libtorrent version (or branch): version: 1.2.6.0 ac4dd41
platform/architecture: Linux/amd64
compiler and compiler version: gcc 9.3.0
I'm not sure whether this is qBittorrent's or libtorrent's problem, but the error message asks to report to both.
I have a debug build of libtorrent with invariant checks enabled, and qBittorrent crashes a few seconds after start.
See also qbittorrent/qBittorrent#12867
The text was updated successfully, but these errors were encountered: