Page 1 of 1

All torrents drop to 0 bits/s

Posted: Sun Mar 23, 2014 8:28 pm
by gregor
Hello

I'm using windows 7 64-bit with qbittorrent 3.1.9.  I've been using it for awhile and it has been great but the other day I added about 100 torrents to the watch folder.  About 30 of them appear to be active and qbittorrent runs for about 5-10 min downloading at max speeds. After that everything just stops and both download and upload speeds goto 0.  At that point I'm unable to stop qbittorrent.  I can close the GUI but the qbittorrent.exe still appears in task manager.  I'm also unable to stop windows, it will just goto the shutting down screen but never actually shut down.  If I cut the power and reboot I can download again for another 5-10 min before things repeat themselves.

Does qbittorrent have a concept of overloading a disk? I used to use utorrent and it would say disk usage was at 100% and then refuse to do anything more.  Might qbittorrent be doing something similar? There is nothing in the execution log unfortunately.

Have others hit this? I've searched but haven't found much like this.  Thanks so much for any thoughts.

Re: All torrents drop to 0 bits/s

Posted: Sun Mar 23, 2014 9:00 pm
by sledgehammer_999
Are you willing to help debug this? If yes, then please do the following
1. Download and install WinDbg 64bits
2. Launch WinDbg and qbittorrent
3. In WinDbg File->Attach to a process and choose the qbittorrent process
4. Debug->Go (qbittorrent should continue to run now)
5. Wait for the hang-during-exit thing
6. In WinDbg Debug->Break
7. In the command subwindows enter "!wow64exts.sw" and then "~*kc 0x14"
8. Copy the output here inside code tags

Re: All torrents drop to 0 bits/s

Posted: Sun Mar 23, 2014 11:06 pm
by gregor
Sure, happy to help debug.  Thank you for your willingness to assist me.  I followed the steps and here is the output I saw after the problem started to occur.  Please tell me if I did something wrong or if you need me to do something else.

I should mention that I performed step 6 after the torrent speeds went to 0 for both upload and download and I attempted to close the UI.  The qtorrent process remained running and I executed the debug->break

Code: Select all

ModLoad: 00000000`67ad0000 00000000`6871a000   C:\Windows\SysWOW64\shell32.dll
(5cc.1160): Break instruction exception - code 80000003 (first chance)
ntdll!DbgBreakPoint:
00000000`77c30590 cc              int     3
0:009> !wow64exts.sw
Switched to 32bit mode
0:009:x86> ~*kc 0x14

   0  Id: 5cc.1054 Suspend: 1 Teb: 7efdb000 Unfrozen
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll - 
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for KERNELBASE.dll - 

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!NtDelayExecution
KERNELBASE!Sleep
qbittorrent!libtorrent::sleep
qbittorrent!libtorrent::alert_manager::wait_for_alert
qbittorrent!libtorrent::aux::session_impl::wait_for_alert
qbittorrent!libtorrent::session::wait_for_alert
qbittorrent!QBtSession::saveFastResumeData
qbittorrent!QBtSession::~QBtSession
qbittorrent!QBtSession::`scalar deleting destructor'
qbittorrent!MainWindow::shutdownCleanUp
qbittorrent!MainWindow::qt_static_metacall
qbittorrent!QMetaObject::activate
qbittorrent!QCoreApplication::exec
qbittorrent!main
qbittorrent!WinMain
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for KERNEL32.dll - 
qbittorrent!__tmainCRTStartup
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

   1  Id: 5cc.1028 Suspend: 1 Teb: 7efd8000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!ZwWaitForMultipleObjects
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

   2  Id: 5cc.88c Suspend: 1 Teb: 7efad000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!NtFsControlFile
KERNEL32!DeviceIoControl
qbittorrent!libtorrent::file::close
qbittorrent!libtorrent::file_pool::open_file
qbittorrent!libtorrent::default_storage::open_file
qbittorrent!libtorrent::default_storage::readwritev
qbittorrent!libtorrent::default_storage::readv
qbittorrent!libtorrent::piece_manager::hash_for_slot
qbittorrent!libtorrent::piece_manager::hash_for_piece_impl
qbittorrent!libtorrent::disk_io_thread::thread_fun
qbittorrent!boost::asio::detail::win_thread_function
qbittorrent!_callthreadstartex
qbittorrent!_threadstartex
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

   3  Id: 5cc.18b0 Suspend: 1 Teb: 7efaa000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!ZwWaitForSingleObject
KERNEL32!WaitForSingleObjectEx
KERNEL32!WaitForSingleObject
qbittorrent!boost::asio::detail::win_iocp_io_service::timer_thread_function::operator()
qbittorrent!boost::asio::detail::win_thread_function
qbittorrent!_callthreadstartex
qbittorrent!_threadstartex
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

   4  Id: 5cc.1bb8 Suspend: 1 Teb: 7efa7000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!NtRemoveIoCompletion
qbittorrent!boost::asio::detail::win_iocp_io_service::do_one
qbittorrent!boost::asio::detail::win_iocp_io_service::run
qbittorrent!boost::asio::detail::win_thread_function
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

   5  Id: 5cc.1ad4 Suspend: 1 Teb: 7efa4000 Unfrozen
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for RPCRT4.dll - 

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!NtAlpcSendWaitReceivePort
RPCRT4!I_RpcAllocate
RPCRT4!I_RpcAllocate
RPCRT4!UuidCreate
RPCRT4!I_RpcSendReceive
RPCRT4!NdrSendReceive
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for DNSAPI.dll - 
RPCRT4!NdrGetBuffer
DNSAPI!DnsValidateName_W
DNSAPI!DnsValidateName_W
DNSAPI!DnsQueryExW
DNSAPI!DnsQueryExW
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSWSOCK.dll - 
DNSAPI!DnsQueryExW
MSWSOCK
MSWSOCK
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WS2_32.dll - 
MSWSOCK
WS2_32!FreeAddrInfoW
WS2_32!FreeAddrInfoW
WS2_32!WSALookupServiceNextW
WS2_32!WSALookupServiceNextW
WS2_32!WSALookupServiceNextW

   6  Id: 5cc.ed0 Suspend: 1 Teb: 7efa1000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!ZwWaitForSingleObject
MSWSOCK
WS2_32!select
qbittorrent!boost::asio::detail::socket_ops::select
qbittorrent!boost::asio::detail::select_reactor::run
qbittorrent!boost::asio::detail::select_reactor::run_thread
ntdll_77dc0000!LdrGetProcedureAddressEx
qbittorrent!boost::asio::detail::win_thread::func<boost::asio::detail::binder1<void (__cdecl*)(boost::asio::detail::select_reactor *),boost::asio::detail::select_reactor *> >::run
qbittorrent!boost::asio::detail::win_thread_function
qbittorrent!_callthreadstartex
qbittorrent!_threadstartex
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

   7  Id: 5cc.1004 Suspend: 1 Teb: 7ef9e000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!NtRemoveIoCompletion
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

   8  Id: 5cc.1098 Suspend: 1 Teb: 7ef9b000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!ZwWaitForMultipleObjects
KERNEL32!WaitForMultipleObjectsEx
KERNEL32!WaitForMultipleObjects
qbittorrent!QWindowsFileSystemWatcherEngineThread::run
qbittorrent!QThreadPrivate::start
qbittorrent!_callthreadstartex
qbittorrent!_threadstartex
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

#  9  Id: 5cc.1160 Suspend: 1 Teb: 7ef98000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!RtlUserThreadStart

  10  Id: 5cc.be4 Suspend: 1 Teb: 7ef95000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!ZwWaitForMultipleObjects
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for USER32.dll - 
KERNEL32!WaitForMultipleObjectsEx
USER32!PeekMessageW
qbittorrent!QEventDispatcherWin32::processEvents
qbittorrent!QEventLoop::processEvents
qbittorrent!QEventLoop::exec
qbittorrent!QThread::exec
qbittorrent!QThread::run
qbittorrent!QThreadPrivate::start
qbittorrent!_callthreadstartex
qbittorrent!_threadstartex
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

  11  Id: 5cc.1724 Suspend: 1 Teb: 7ef92000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!NtWaitForWorkViaWorkerFactory
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

  12  Id: 5cc.804 Suspend: 1 Teb: 7ef83000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!ZwWaitForMultipleObjects
KERNEL32!WaitForMultipleObjectsEx
KERNEL32!WaitForMultipleObjects
qbittorrent!QWindowsFileSystemWatcherEngineThread::run
qbittorrent!QThreadPrivate::start
qbittorrent!_callthreadstartex
qbittorrent!_threadstartex
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

  13  Id: 5cc.16c0 Suspend: 1 Teb: 7ef80000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!NtWaitForWorkViaWorkerFactory
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

  14  Id: 5cc.129c Suspend: 1 Teb: 7ef8c000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!NtRemoveIoCompletion
qbittorrent!boost::asio::detail::win_iocp_io_service::do_one
qbittorrent!boost::asio::detail::win_iocp_io_service::run
qbittorrent!boost::asio::detail::win_thread::func<boost::asio::detail::resolver_service_base::work_io_service_runner>::run
qbittorrent!boost::asio::detail::win_thread_function
qbittorrent!_callthreadstartex
qbittorrent!_threadstartex
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

  15  Id: 5cc.fbc Suspend: 1 Teb: 7ef89000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!NtWaitForWorkViaWorkerFactory
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

  16  Id: 5cc.ae8 Suspend: 1 Teb: 7efd5000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!NtWaitForWorkViaWorkerFactory
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

  17  Id: 5cc.1a14 Suspend: 1 Teb: 7ef8f000 Unfrozen

WARNING: Stack unwind information not available. Following frames may be wrong.
ntdll_77dc0000!ZwWaitForMultipleObjects
KERNEL32!BaseThreadInitThunk
ntdll_77dc0000!RtlInitializeExceptionChain
ntdll_77dc0000!RtlInitializeExceptionChain

Re: All torrents drop to 0 bits/s

Posted: Mon Mar 24, 2014 1:21 pm
by sledgehammer_999

Re: All torrents drop to 0 bits/s

Posted: Mon Mar 24, 2014 2:45 pm
by gregor
Thanks very much for the quick reply, I'll follow the thread you linked to

Re: All torrents drop to 0 bits/s

Posted: Tue Mar 25, 2014 9:54 am
by sledgehammer_999
I hope you saw arvid's reply.
How big are your stalled torrent's individual files? Do you use preallocation?
What happens if you wait eg 30mins - 1h during the hang? Is there any disk activity?

Re: All torrents drop to 0 bits/s

Posted: Thu Mar 27, 2014 3:31 am
by gregor
Thank you for your replies and your continued willingness to help me.  I did see arvid's reply but I'm not really sure how to react.  It might be a driver issue? What driver would that be? The intel SATA software driver? The disk's firmware? I'm not sure what to try.

As for your questions I wouldn't say the torrents are huge, probably about 500 mb to 1.5 gb on average.  I do two things that might be considered bad:

1) I keep a lot of torrents running at a time.  Most of my torrents are not popular so I like to leave them running in case seeds appear.  I probably have about 1000 torrents right now.  Is there an upper limit?

2) I often add a lot of torrents at once.  So those relatively small torrents could be considered a large amount of data when I add about 40 or so at a time.  Only about 20% of those are active but maybe starting 10 torrents at a time causes too much stress on my disk?

I don't believe I use preallocation...I use whatever default qbittorent comes with for allocating the files.  I believe it makes use of sparse files? I always see my space on disk lower than the size on disk. 

Today I had the problem occur, the UI reported all torrents download/uploading at 0 bit/s.  I closed qbittorrent and the UI went away but the process remained in task manager.  If I look in resource manager I can see that qbittorrent.exe is still writing about 20 MB/s to disk.  I'm not sure what it is doing...this is about an hour after I closed it. 

The disk it is writing to is a seagate 4 TB 5400 RPM drive.  It's one of the newest models. 

Just trying to include a lot of info in case it helps.

Please let me know if you need any other information. 

Re: All torrents drop to 0 bits/s

Posted: Thu Mar 27, 2014 6:43 pm
by gregor
In addition to the above information I'm sadly able to reproduce this on another system.  Again windows 7 64-bit but here I'm using an older qbittorrent 3.1.5.  This system had very few torrents on it, about 20.  I then added about 200 magnet links, maybe excessive but I was curious to see if it could handle it. 

Things went well for about 5 minutes and then everything dropped to 0 bits.  If I use resource manager I can see it is slamming my disk, about 98 MB/s writes.  It says it is accessing these files

E:\$LogFile (NTFS Volume Log)
E:\$BitMap (NTFS Free Space Map)
E:\$Mft (NTFS Master File Table)
E:\$Extend\$UsnJrnl:$J

I checked and I don't have the preallocate option selected so I'm not sure why it would be writing so much data to these files.  Is it really trying to allocate things?

Hope some of the info in this post and the above one are of use.  Thanks for any help!

Re: All torrents drop to 0 bits/s

Posted: Fri Mar 28, 2014 10:22 pm
by gregor
perhaps another interesting tidbit is that I moved to 3.0.6 and it has been handling things like a champ on both systems.  I'm not sure if I'm losing anything by going to an older version like this but it has solved the problem that was making the program unusable for me.

Re: All torrents drop to 0 bits/s

Posted: Sun Mar 30, 2014 10:53 am
by sledgehammer_999
Can you update the github issue with your findings and tag again arvidn? He doesn't look at the forums.

Re: All torrents drop to 0 bits/s

Posted: Mon Mar 31, 2014 4:55 am
by ralphonzo
Same problem (0/0, can't kill process, hangs at shutdown), different trigger: http://qbforums.shiki.hu/index.php/topic,2156.0.html

Re: All torrents drop to 0 bits/s

Posted: Tue May 27, 2014 8:15 pm
by fusk
How did you make it stop with the constant $logfile writing ?
I just got this issue with 3.9.1.2

Edit: think i fixed it, ran check disk on all drives (nothing found) rebooted, restarted the torrent that would cause it, let it check the files, close qbit and reboot. Now everything seems fine again.