Skip to content
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

Paused torrents become active after app restart in 4.2.2 (only with libtorrent 1.1.x) #12322

Closed
Kolcha opened this issue Mar 29, 2020 · 9 comments · Fixed by #12363
Closed

Paused torrents become active after app restart in 4.2.2 (only with libtorrent 1.1.x) #12322

Kolcha opened this issue Mar 29, 2020 · 9 comments · Fixed by #12363
Labels
Confirmed bug An issue confirmed by project team to be considered as a bug Core

Comments

@Kolcha
Copy link
Contributor

Kolcha commented Mar 29, 2020

qBittorrent version and Operating System

qBittorrent 4.2.2, compiled from source, release-4.2.2 tag
qbittorrent-nox on Debian Unstable (sid)

If on linux, libtorrent-rasterbar and Qt version

everything from official Debian repo
libtorrent 1.1.13, Qt 5.12.5

What is the problem

after upgrade 4.2.1 -> 4.2.2 all completed paused torrents (I had ~30) became active (started seeding). I paused them again, but after app restart they became active again. 100% reproducible with each restart.

What is the expected behavior

paused state is saved

Steps to reproduce

  • have few paused completed torrents added in older version
  • upgrade to 4.2.2
  • restart app

Extra info

only old torrents seems to be affected, bug is not reproducible at least on macOS with any newly added torrents, paused state is preserved.
reverting to 4.2.1 (with the same libraries) solved the problem, so problem somewhere in saved data interpretation.
I found nothing interesting in logs, nothing was reported in both cases (active or paused torrent), I saw only "'some torrent name' restored" messages, nothing more.
can't do any experiments on target system, this is almost "production" server, and any downtime is not acceptable.
looks like #12321 at least similar

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Mar 29, 2020

#12321 says:

if libtorrent 1.2.5 - all good

Can you please confirm this is the case for you as well (you only tested with 1.1.x)? If so, the other issue can be closed as a duplicate.

@FranciscoPombal FranciscoPombal added Confirmed bug An issue confirmed by project team to be considered as a bug Core labels Mar 29, 2020
@Kolcha
Copy link
Contributor Author

Kolcha commented Mar 29, 2020

confirm, bug is reproducible only with 1.1.x, with 1.2.5 is fine

  • installed 4.1.7 on KUbuntu 19.10, downloaded ArchLinux, paused it, restarted few times, ensured that everything is fine (i.e. torrent is paused)
  • upgraded it to 4.2.1 with libtorrent 1.1.x from own repo, restarted it few times, ensured that everything is fine (torrent still paused)
  • build 4.2.2 from sources, using libraries from repo (i.e. libtorrent 1.1.x), started it. paused torrent became active. paused it, restarted, torrent is active again
  • removed self-compiled qbittorrent, run 4.2.1, paused torrent again
  • added official ppa, upgraded from it to 4.2.2 with libtorrent 1.2.5, torrent is still paused!

upd: can test anything on this KUbuntu system, this is development VM

@FranciscoPombal FranciscoPombal changed the title paused torrents become active after app restart Paused torrents become active after app restart in 4.2.2 (only with libtorrent 1.1.x) Mar 29, 2020
@FranciscoPombal
Copy link
Member

FranciscoPombal commented Mar 29, 2020

@Kolcha
Ok, so this is a a regression specific to 4.2.1->4.2.2, only when using libtorrent 1.1.x. It's good that you've managed to narrow down the cause so much.
Do you mind git bisect'ing to find the exact commit that introduced this regression? If you can't, I'll do it, but later.

@Kolcha
Copy link
Contributor Author

Kolcha commented Mar 29, 2020

first of all, I don't know what is git bisect and how it can help to find specific commit, I have to learn it.
and right now I can't do it, I can do it only later, not early than tomorrows evening...

@FranciscoPombal
Copy link
Member

first of all, I don't know what is git bisect and how it can help to find specific commit, I have to learn it.
and right now I can't do it, I can do it only later, not early than tomorrows evening...

I'll do it then, no problem.

@FranciscoPombal
Copy link
Member

@Kolcha Ok I haven't got around to bisecting it yet, but I need to know one thing first: does this only happen with torrents that were initially added in 4.1.x? Or does this also happen with a torrent that is first added to a clean 4.2.2+libtorrent 1.1.x install/build?

@Kolcha
Copy link
Contributor Author

Kolcha commented Mar 29, 2020

so, I removed previously added ArchLinux torrent, and re-download it again with 4.2.2 + libtorrent 1.1, paused and restarted the app -> torrent is active!
so I was wrong that only old torrents are affected, any torrent is affected.
maybe I just don't restart yet qBittorrent on my server after adding few new torrents, so they were paused...

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Mar 29, 2020

Ok, I reached the following result with git bisect, which does make sense:

b160b563069c47a6f79ca92b675b200a1a503fdd is the first bad commit
commit b160b563069c47a6f79ca92b675b200a1a503fdd
Author: Vladimir Golovnev (Glassez) <glassez@yandex.ru>
Date:   Fri Jan 3 18:57:41 2020 +0300

    Redesign torrent startup handling

:040000 040000 1d36dfceaadf5f085d7ddbc2a5c75cdbce106084 f52e515269da1a0b9f1048c15c0c6dbcf8f9933a M      src

@glassez Looks like this commit of yours introduced this regression.
Here is the summary:

  • Paused torrents get resumed when qBIttorrent is started next time
  • Only happens when using libtorrent 1.1.x (in my testing I used 1.1.14, but @Kolcha reproduced with 1.1.13, I really don't think the specific point release of 1.1.x used is important)
  • This behavior is only observed when using a revision of qBittorrent that includes this commit or higher.
  • Happens for both torrents that are added before or after this commit.

@zywo
Copy link
Contributor

zywo commented Mar 29, 2020

@FranciscoPombal
I have the same result as you after running git bisect

b160b563069c47a6f79ca92b675b200a1a503fdd is the first bad commit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Confirmed bug An issue confirmed by project team to be considered as a bug Core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants