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

[3.1.10] - Frequent UI hangs when downloading torrent #2003

Closed
BaBoop opened this issue Oct 4, 2014 · 86 comments
Closed

[3.1.10] - Frequent UI hangs when downloading torrent #2003

BaBoop opened this issue Oct 4, 2014 · 86 comments
Milestone

Comments

@BaBoop
Copy link

BaBoop commented Oct 4, 2014

After updating to 3.1.10 I noticed that when I'm downloading a torrent, the UI frequently hangs when I click on it(shows not responding on the titlebar). The client still works and doesn't crash, it just takes a while before it "gets" the click.

This doesn't seem to happen when I'm not downloading something.

edit: Win7 x64, SP1

@junpet
Copy link

junpet commented Oct 5, 2014

I've the same problem. Tried completely reinstall, but not helping.
Win7 x86
edit: SP1 here too.

@nhasbun
Copy link

nhasbun commented Oct 5, 2014

Same issue here. Qbittorrent works and torrents are downloading but UI freezes randomly for about 5-20 sec. Tried reinstall... same problem.

Win 7 64bits, SP1, no firewall.

@sledgehammer999
Copy link
Member

Do you see a cpu spike in that period?

@chrishirst
Copy link
Contributor

and are you using operating system caching?

@junpet
Copy link

junpet commented Oct 5, 2014

@chrishirst First time I thought this is the problem, but with/without the problem is appears/remains.

@sledgehammer999 I couldn't see any (or a very very little, somebody else also check please). I have an old Dual-Core E5200 2,5GHz cpu.

@ghost
Copy link

ghost commented Oct 5, 2014

Yes that is the problem with this version.
I have the same on the diagnostic version.
And there is no CPU loadings or spikes (28% av.).
All functinality of Windows are delayed!
Windows 7 Ultimate SP 1; RAM 6GB, CPU:Quad 2 c. 2.5 GHz
Hope it helped!

@sledgehammer999
Copy link
Member

Just so you know I have no idea what causes this. I don't experience it on my system (Windows XP dual core, 1.5GB RAM).

@nhasbun
Copy link

nhasbun commented Oct 5, 2014

I have AMD Phenom II X4 B55 (Quad-core at 3.2Ghz) and 8GB of RAM.

Cpu stays at ~5%-11% when UI hangs. I dont see any notorius spikes of cpu use neither of ram.

@sledgehammer999
Copy link
Member

What is the interval between the freezes?
Do have any rss feeds setup?

@nhasbun
Copy link

nhasbun commented Oct 6, 2014

I dont have any RSS. Interval between freezes is: 5-7 secs working for me then it hangs for about 15~20 secs, then works then hangs.

I disabled anti-virus and no help. I dont see anymore details i dont know how to help. Im going to try an older version for now.

@BaBoop
Copy link
Author

BaBoop commented Oct 6, 2014

My experience is pretty much the same as nhasbun as well.

Since you're not experiencing this sledge, it's probably related to Win7.

@ghost
Copy link

ghost commented Oct 6, 2014

I think that someone made mistake with waiting to long for announce the next version with overmuch changes and corrections so now it is imposible to spot the cause.
Old rule of trial and error is the best one for programing and in this case there is no otherway.
Programer must take the PC which show this error and rip of one by one changes which he made from 3.1.9.2 to 3.1.10.
In this moment it is the best solution.
Best wishes!
Drasko, Croatia

@sledgehammer999
Copy link
Member

At everyone: What happens if you downgrade to 3.1.9.2 ? Does this freeze still happen?
Quick link to 3.1.9.2: http://sourceforge.net/projects/qbittorrent/files/qbittorrent-win32/qbittorrent-3.1.9.2/
Please also try this:

  1. Remove all torrents from the list (if possible) and rss feeds
  2. Disable dht/lsd/pex
  3. Close qbt
  4. Reset your router so you will get a new ip from your ISP
  5. Open qbt and don't add anything to it.

Does it still freeze? (I am wondering if this is an issue in the networking code)

@BaBoop
Copy link
Author

BaBoop commented Oct 6, 2014

Sledge, removing all torrents will fix it, since as I said it only happens when something is downloading.

Right now, I'm seeding some stuff. The freeze doesn't happen because nothing is downloading. But as soon as I add a new torrent to download, it will happen until it finishes.

@sledgehammer999
Copy link
Member

So only on downloading not on uploading, right?
If yes, go to advanced settings and play with the enable os cache setting.

@BaBoop
Copy link
Author

BaBoop commented Oct 6, 2014

It happens with os cache disabled as well.

@sledgehammer999
Copy link
Member

OK I am waiting for someone to try with 3.1.9.2 so I can narrow it down.

@nhasbun
Copy link

nhasbun commented Oct 6, 2014

Problem happens with uTP disabled, DHT disabled, local discovery disabled, pex disabled, encryption disabled, os cache disabled.

Happens too while seeding.

Only stops when deleting all torrents.

Downgraded to 3.1.8 and no problems.
Currently running 3.1.9.2 and doing fine

@ghost
Copy link

ghost commented Oct 6, 2014

As I say: to much changes that could be discovered!!
Every changes would have to be tested on every thusands PC s.
From that arises that you must generate everytime one new version but thats not popular!
Likewise maybe droped in code generating and writing the some kind of error?
The only way is: BACK TO 3.1.9.2 VER. and test one by one supplement or change.
Best wishes!
Let that be a lesson!

@sledgehammer999
Copy link
Member

OK. I am building a v3.1.10 using the same version of libtorrent used in 3.1.9.2 to see if that is the problem. It will take a while to complete.

@anyN don't worry there is a far quicker way of testing each change to find the culprit. All I need is you guys to test. What is the faster way? Let's say I made 20 changes. I do a build based on the first 10. (ie half of the total). If the problem persists I know that the rest 10 aren't the problem. Then I'll create a new build for the first 5 and test again. Each time excluding a huge chunk of commits. Then at worst after 4 or 5 tries I'll know which commit has the problem.
But first I need to ensure that it isn't a problem with other components of the program(eg libtorrent).

@sledgehammer999
Copy link
Member

v3.1.10 with libtorrent r9872(same as 3.1.9.2): http://builds.shiki.hu/temp/qbittorrent_v3.1.10_libtorent_r9872.7z
Run it from any dir. Report if the freeze still happens.

@nhasbun
Copy link

nhasbun commented Oct 6, 2014

problem solved for me !

@ghost
Copy link

ghost commented Oct 6, 2014

Sorry not for me.
I finaly got Crashing!
qBittorrent has crashed

qBittorrent version: v3.1.10
Libtorrent version: 0.16.16.0
Qt version: 4.8.6
Boost version: 1.56.0

#  0 qbittorrent.exe      0x0123d28d  0x0123d28d()
#  1 qbittorrent.exe      0x0123e5fd  0x0123e5fd()
#  2 qbittorrent.exe      0x018aacde  boost::asio::detail::win_iocp_socket_service_base::start_null_buffers_receive_op()
#  3 qbittorrent.exe      0x0189afbe  boost::asio::detail::win_iocp_socket_service_base::start_null_buffers_receive_op()
#  4 kernel32.dll         0x760aee1c  BaseThreadInitThunk()
#  5 ntdll.dll            0x770537eb  RtlInitializeExceptionChain()
#  6 ntdll.dll            0x770537be  RtlInitializeExceptionChain()


List of linked Modules:
qbittorrent    0x011a0000    Image: C:\Users\Tata\Desktop\Test\qbittorrent.exe
ntdll          0x76ff0000    Image: C:\Windows\SYSTEM32\ntdll.dll
kernel32       0x76060000    Image: C:\Windows\system32\kernel32.dll
KERNELBASE     0x751f0000    Image: C:\Windows\system32\KERNELBASE.dll
dbghelp        0x743a0000    Image: C:\Windows\system32\dbghelp.dll
msvcrt         0x75a20000    Image: C:\Windows\system32\msvcrt.dll
ADVAPI32       0x75790000    Image: C:\Windows\system32\ADVAPI32.dll
sechost        0x75390000    Image: C:\Windows\SYSTEM32\sechost.dll
RPCRT4         0x77170000    Image: C:\Windows\system32\RPCRT4.dll
SHELL32        0x76300000    Image: C:\Windows\system32\SHELL32.dll
SHLWAPI        0x75830000    Image: C:\Windows\system32\SHLWAPI.dll
GDI32          0x75b60000    Image: C:\Windows\system32\GDI32.dll
USER32         0x75630000    Image: C:\Windows\system32\USER32.dll
LPK            0x77140000    Image: C:\Windows\system32\LPK.dll
USP10          0x76f50000    Image: C:\Windows\system32\USP10.dll
POWRPROF       0x73e10000    Image: C:\Windows\system32\POWRPROF.dll
SETUPAPI       0x75440000    Image: C:\Windows\system32\SETUPAPI.dll
CFGMGR32       0x75120000    Image: C:\Windows\system32\CFGMGR32.dll
OLEAUT32       0x75700000    Image: C:\Windows\system32\OLEAUT32.dll
ole32          0x75bb0000    Image: C:\Windows\system32\ole32.dll
DEVOBJ         0x75370000    Image: C:\Windows\system32\DEVOBJ.dll
COMDLG32       0x75d10000    Image: C:\Windows\system32\COMDLG32.dll
COMCTL32       0x73bf0000    Image: C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\COMCTL32.dll
IMM32          0x755e0000    Image: C:\Windows\system32\IMM32.dll
MSCTF          0x75f90000    Image: C:\Windows\system32\MSCTF.dll
WINMM          0x71600000    Image: C:\Windows\system32\WINMM.dll
WS2_32         0x75400000    Image: C:\Windows\system32\WS2_32.dll
NSI            0x77130000    Image: C:\Windows\system32\NSI.dll
MSWSOCK        0x74a40000    Image: C:\Windows\system32\MSWSOCK.dll
CRYPT32        0x75250000    Image: C:\Windows\system32\CRYPT32.dll
MSASN1         0x75070000    Image: C:\Windows\system32\MSASN1.dll
SspiCli        0x74ef0000    Image: C:\Windows\system32\SspiCli.dll
uxtheme        0x73a90000    Image: C:\Windows\system32\uxtheme.dll
dwmapi         0x737b0000    Image: C:\Windows\system32\dwmapi.dll
CRYPTBASE      0x74f60000    Image: C:\Windows\system32\CRYPTBASE.dll
userenv        0x75160000    Image: C:\Windows\system32\userenv.dll
profapi        0x75080000    Image: C:\Windows\system32\profapi.dll
CRYPTSP        0x74a80000    Image: C:\Windows\system32\CRYPTSP.dll
rsaenh         0x74820000    Image: C:\Windows\system32\rsaenh.dll
wship6         0x74a30000    Image: C:\Windows\System32\wship6.dll
wshtcpip       0x74560000    Image: C:\Windows\System32\wshtcpip.dll
DNSAPI         0x74900000    Image: C:\Windows\system32\DNSAPI.dll
WLIDNSP        0x72be0000    Image: C:\Program Files\Common Files\Microsoft Shared\Windows Live\WLIDNSP.DLL
PSAPI          0x77150000    Image: C:\Windows\system32\PSAPI.DLL
nimdnsNSP      0x63560000    Image: C:\Program Files\National Instruments\Shared\mDNS Responder\nimdnsNSP.dll
nimdnsResponder 0x63550000    Image: C:\Windows\system32\nimdnsResponder.dll
MSVCR90        0x70bb0000    Image: C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll
Iphlpapi       0x72e40000    Image: C:\Windows\system32\Iphlpapi.DLL
WINNSI         0x72e00000    Image: C:\Windows\system32\WINNSI.DLL
rasadhlp       0x72b00000    Image: C:\Windows\system32\rasadhlp.dll
fwpuclnt       0x72ab0000    Image: C:\Windows\System32\fwpuclnt.dll
RpcRtRemote    0x75000000    Image: C:\Windows\system32\RpcRtRemote.dll
comctl32       0x70910000    Image: C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\comctl32.dll

@sledgehammer999
Copy link
Member

@anyN does it happen frequently?
That particular crash is inside Boost (used by libtorrent). I wonder if that changed boost version is at fault...

@ghost
Copy link

ghost commented Oct 6, 2014

Well I suppose not frequently. Last sesion in the morning I did not get any crash but now imediatly.
I will try now a few downloads.

@ghost
Copy link

ghost commented Oct 6, 2014

Not frequently I will say. In fact this was only one. But laging or delaying or shorttime hangig persist!

@nhasbun
Copy link

nhasbun commented Oct 6, 2014

Difference was pretty noticeable for me. Just going for a pretty disfunctional and tiltish menu navigation to zero lags-freezes.

Im going to try it for more time anyways...keep running with a couple of torrents and going to tell later.

PS:

Im sorry but problem is still there. UI is hanging out again with same behavior than before.

@junpet
Copy link

junpet commented Oct 7, 2014

v3.1.10 with libtorrent r9872(same as 3.1.9.2): http://builds.shiki.hu/temp/qbittorrent_v3.1.10_libtorent_r9872.7z
Run it from any dir. Report if the freeze still happens.

Problem still exists.

@sorokin
Copy link
Contributor

sorokin commented Oct 7, 2014

@sledgehammer999 could we measure a time of each event handled by main loop and log all event that takes more then, say, 20 ms?

http://stackoverflow.com/questions/15097861/qt-measure-event-handling-time

@sledgehammer999
Copy link
Member

@sledgehammer999 could we measure a time of each event handled by main loop and log all event these takes more then, say, 20 ms?

Probably yes. It seems quite simple. However I cannot provide a build with this before weekend. I can only do builds based on the git commits atm.

@sledgehammer999
Copy link
Member

OK. In a couple hours I'll post builds depending on the commits chriskohlhoff mentioned.

@sledgehammer999
Copy link
Member

Best would be if you somehow capture the callstack during a freeze.

@chriskohlhoff Do you know of any tool that is easy for someone inexperienced to use?
NOTE: My test builds use gcc but the official release uses msvc2010. (it takes ages to produce a binary with msvc that's why I fall back to gcc)

@sledgehammer999
Copy link
Member

@junpet Can you test this final build? It should re-introduce the freeze.
Link: http://builds.shiki.hu/temp/qbittorrent_20141018_v3.1.10_with_boost.asio_git048496.7z

@junpet
Copy link

junpet commented Oct 18, 2014

@junpet Can you test this final build? It should re-introduce the freeze.
Link: http://builds.shiki.hu/temp/qbittorrent_20141018_v3.1.10_with_boost.asio_git048496.7z

Just like you said. It's freezing like hell.

@sledgehammer999
Copy link
Member

@chriskohlhoff we have found the offending commit. It is boostorg/asio@0484963 . If/when you push a fix, please leave a message here so I can provide a test build and confirm. Btw, do I have to open a bug report to the official boost bug tracker?

@ everyone else. I am closing this. Until a fix is provided, all future qBittorrent releases will use Boost 1.55, which doesn't have the freezing problem. Thank you all for your cooperation.

@chriskohlhoff
Copy link

Please raise a ticket if you can. However, it's currently a long way from having enough information for me to attack the problem. Does your program have some logging or tracing facility? If you do, it would be great if you could please instrument the function bodies of boost::asio::detail::win_iocp_socket_service_base::start_connect_op() and boost::asio::detail::win_iocp_socket_connect_op::do_complete() with trace between every line so that we can identify which call is freezing. Thanks.

@sledgehammer999
Copy link
Member

Please raise a ticket if you can.

This is the best I could do. I cannot add the urls as I mentioned there: https://svn.boost.org/trac/boost/ticket/10674

Does your program have some logging or tracing facility?

My official release(based on 1.56) ships with debug symbols in the a .pdb file. Will this be enough if a user runs WinDbg? If yes, please provide instructions on what a user has to do to capture a callstack. I am totally a noob on working with debuggers.

@chriskohlhoff
Copy link

I think you can right click the process in Task Manager and choose Create Dump File.

http://support.microsoft.com/kb/931673

Getting a dump while it's frozen, plus the .exe/.dlls and .pdb, might be enough.

@sledgehammer999
Copy link
Member

@junpet Can you install the official v3.1.10 release? (not the one posted here). If yes, follow the instructions of chriskohlhoff above, and post the dumped file somewhere or send it to my email: sledgehammer999 (at) qbittorrent (dot) org.

@junpet
Copy link

junpet commented Oct 19, 2014

@sledgehammer999 I sent you a mail with .dmp, .exe and .pdg files.

@sledgehammer999
Copy link
Member

@chriskohlhoff since I can't post urls in the boost bug tracker, here are the files you requested: https://www.dropbox.com/sh/br6q1x5xu08muea/AACMMcEYJaJy4hOIcuPxdH_Ka?dl=0

@ghost
Copy link

ghost commented Oct 19, 2014

You cannot wait to close any problematic case? If this library is suspicious for god sake put in the official setup the 1.55 booster version.

With all my apology!

Sorry for bothering you!

Best Regards!

From: sledgehammer999 [mailto:notifications@github.com]
Sent: Sunday, October 19, 2014 1:32 PM
To: qbittorrent/qBittorrent
Cc: Drasko
Subject: Re: [qBittorrent] [3.1.10] - Frequent UI hangs when downloading torrent (#2003)

Closed #2003 #2003 .


Reply to this email directly or view it on GitHub #2003 (comment) . https://github.com/notifications/beacon/5621943__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyOTMzNzUwOCwiZGF0YSI6eyJpZCI6NDQ3OTE2NDV9fQ==--2f5d27121e017a27c8761e413f486ac1af5e5e26.gif

@sledgehammer999
Copy link
Member

@anyN read again what I have written in my comments and you'll understand.

@ghost
Copy link

ghost commented Oct 19, 2014

O.K.

Best Regards!

From: sledgehammer999 [mailto:notifications@github.com]
Sent: Sunday, October 19, 2014 5:50 PM
To: qbittorrent/qBittorrent
Cc: Drasko
Subject: Re: [qBittorrent] [3.1.10] - Frequent UI hangs when downloading torrent (#2003)

@anyN https://github.com/Anyn read again what I have written in my comments and you'll understand.


Reply to this email directly or view it on GitHub #2003 (comment) . https://github.com/notifications/beacon/5621943__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyOTM1Mjk4NiwiZGF0YSI6eyJpZCI6NDQ3OTE2NDV9fQ==--6fa01d92c41625a9577692ad1897b4a0d005c678.gif

@gubatron
Copy link

gubatron commented Dec 3, 2014

we just went through 2 weeks of hell until we found this thread, we had the very same issue.

@sledgehammer999
Copy link
Member

@gubatron were you also using boost 1.56?

@chriskohlhoff
Copy link

@gubatron if you are also able to capture a debug .dmp (as described above) at the time when the UI hangs it would be helpful. Unfortunately the one I have now does not by itself provide sufficient information to isolate the problem.

@gubatron
Copy link

gubatron commented Dec 3, 2014

we had built libtorrent using boost 1.56 and 1.57 from source, it wasn't until we turned off every CPU consuming routine, every disk IO consuming routine that we could narrow down the issue to libtorrent's networking IO being the culprit.

Then a google with the magic combination of keywords lead us to this conversation, we went back to building with libtorrent using boost 1.55, voilá problem gone.

Lost two weeks trying to find this, and probably a load of users.

aldenml added a commit to frostwire/frostwire-jlibtorrent that referenced this issue Dec 4, 2014
…st IO in Windows. Very similar to a qBittorrent issue and fixed using boost 1.55.

Updated Windows binary.
Relevant links:
qbittorrent/qBittorrent#2003
boostorg/asio@0484963
https://svn.boost.org/trac/boost/ticket/10674
@Lilfut
Copy link

Lilfut commented Aug 26, 2015

Still having problem on 3.2.3.

@Chocobo1
Copy link
Member

@Lilfut
Open a new issue, this one is already closed.

@sledgehammer999
Copy link
Member

@ everyone who had freezing problems due to boost 1.56. Can you help me test new versions?
Download the linked archive. It contains 3 folders. Please try the 1.56 folder first to confirm that the freeze still happens on your machine. Then try the other 2 and report back. Thank you.
Link: http://builds.shiki.hu/temp/qbittorrent_3.2.5_for_issue_2003.7z

@junpet
Copy link

junpet commented Nov 14, 2015

@sledgehammer999 Sorry for late answer, here my test.

The first two .exe-s causes freezin, the third one (1.59-NO_CONNECTEX) works well. I'll continue using this. I'll report if something goes wrong.

Thank you! I ♥ qBittorrent!

@sledgehammer999
Copy link
Member

Thanks for report. I'll change to more recent boost version in next release.

@HarryS
Copy link

HarryS commented Dec 14, 2015

Hi, did you use 1.59-NO_CONNECTEX Boost version on the official Windows v3.3.1 installer?

I have been getting this issue (or something similar) on Windows 10 x64 for a while with the official release. I downloaded version 3.2.5 above and tried only the 1.59-NO_CONNECTEX version and it has been working great for a few hours now -- whereas if I use the official binary, my entire system begins to stop responding within 5 to 10 minutes, and I am pretty much forced to reboot.

Maybe it's an entirely different issue, but all I know is the version in the 1.59-NO_CONNECTEX folder works great so far, so I post it here. Please let me know if there is any other information that would be useful, and thank you! :)

Edit: nevermind, happened after a few more hours.

Edit2: if I disable DHT, the issue never happens again. Been over a week uptime now.

@qbittorrent qbittorrent locked and limited conversation to collaborators Feb 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests