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

qBittorrent process never ends #5097

Closed
ngosang opened this issue Apr 10, 2016 · 165 comments
Closed

qBittorrent process never ends #5097

ngosang opened this issue Apr 10, 2016 · 165 comments
Labels
Confirmed bug An issue confirmed by project team to be considered as a bug Libtorrent OS: Linux Issues specific to Linux distributions OS: Windows Issues specific to Windows

Comments

@ngosang
Copy link
Member

ngosang commented Apr 10, 2016

Windows 10 x64
qBittorrent 3.3.4

When I click FIle => Exit the tray icon disappears but the process is running forever... If I want to start qBittorrent again I have to kill the old process in the task manager.
When I shutdown the pc many times the pc never goes off because it's waiting for qBittorrent (the message is saving torrent...)

I don't know if it's caused by qBittorrent or by libtorrent but I think we should add a timeout (for example 5 seconds) and force exit if the task are not completed within that time.
@qbittorrent/qbittorrent-frequent-contributors

@Misiek304
Copy link

It should exit after some time.
From what I know in that time qBittorrent tries to close all of it connections so if you have many of them it can take some time.

@ngosang
Copy link
Member Author

ngosang commented Apr 10, 2016

I saw qBittorrent waiting for more than 10 minutes. It's too much.

@ngosang ngosang changed the title qBittorrent process never end qBittorrent process never ends Apr 10, 2016
@sledgehammer999
Copy link
Member

You should attach a debugger or add debug prints to see where it locks.
I highly suspect that it locks inside the libtorrent::session destructor. In the past arvidn has mentioned that some network operations(like dns lookups) are really hard to cancel and they can potentially take much time to complete. Especially on configurations with slow networks.
If it indeed gets stuck in that destructor we cannot force close it ourselves.

@ngosang
Copy link
Member Author

ngosang commented Apr 10, 2016

You should attach a debugger or add debug prints to see where it locks.

I don't know how to do that in windows.

If it indeed gets stuck in that destructor we cannot force close it ourselves.

Sure? http://stackoverflow.com/a/9920452

@sledgehammer999
Copy link
Member

I don't know how to do that in windows.

If you have MSVC2015 installed then you have WinDbg installed too. Choose the same 32/64 bit version as the qbittorrent binary(ignore OS).
You should find it in Start->All Programs->Windows Kits->Debugging tools for Windows

  1. Open Windbg (the 32 bits variant)
  2. File->Symbol File Path... and then input srv*c:\mss*http://msdl.microsoft.com/download/symbols
  3. File->open executable...
  4. Choose the qbittorrent.exe
  5. Debug->Go
  6. You'll see some output in the "Command" subwindow. Try to quit qbittorrent and wait until it freezes. Then in debugger choose Debug->Break
  7. Now you should be able to input commands in the bottom of the "Command" subwindow.
  8. Issue: |* ~* kp

This will give a backtrace of all threads. Usually the first one is the main thread.

Sure? http://stackoverflow.com/a/9920452

If your main thread is stuck how are you going to kill it? Spawn a different thread beforehand?

@ngosang
Copy link
Member Author

ngosang commented Apr 10, 2016

Sorry I don't have any compiler in Windows.

Spawn a different thread beforehand?

I know it's really dirty but yes.

@sledgehammer999
Copy link
Member

If you can:
Go here. Scroll down to "Standalone Debugging Tools for Windows (WinDbg)". Select "Get the standalone debugging tools (WinDbg) as part of Windows 8.1 SDK". It is a "downloading" setup. Choose to install Windbg.

@ngosang
Copy link
Member Author

ngosang commented Apr 10, 2016

I will next week.

@zeule
Copy link
Contributor

zeule commented Apr 10, 2016

Here is a backtrace from Linux:

(gdb) thread apply all bt 

Thread 10 (Thread 0x7f38a0b21700 (LWP 22659)):
#0  0x00007f38ab858d3d in poll () from /lib64/libc.so.6
#1  0x00007f38a5cc3ac2 in _xcb_conn_wait () from /usr/lib64/libxcb.so.1
#2  0x00007f38a5cc5747 in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007f38a2853239 in QXcbEventReader::run() () from /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007f38ac44c9ec in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#5  0x00007f38ad4e2424 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f38ab861dbd in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7f38910cc700 (LWP 22660)):
#0  0x00007f38ab858d3d in poll () from /lib64/libc.so.6
#1  0x00007f38a93c70bc in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f38a93c71cc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f38ac639f0b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x00007f38ac5e9d1a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x00007f38ac448544 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#6  0x00007f38ae3dd395 in QDBusConnectionManager::run() () from /usr/lib64/libQt5DBus.so.5
#7  0x00007f38ac44c9ec in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#8  0x00007f38ad4e2424 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f38ab861dbd in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f3889cd1700 (LWP 22662)):
#0  0x00007f38ab858d3d in poll () from /lib64/libc.so.6
#1  0x00007f38a93c70bc in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f38a93c71cc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f38ac639eef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x00007f38ac5e9d1a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x00007f38ac448544 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#6  0x00007f38ac44c9ec in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#7  0x00007f38ad4e2424 in start_thread () from /lib64/libpthread.so.0
#8  0x00007f38ab861dbd in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f3888ccf700 (LWP 22664)):
#0  0x00007f38ab8623a3 in epoll_wait () from /lib64/libc.so.6
#1  0x00007f38adb87729 in boost::asio::detail::epoll_reactor::run(bool, boost::asio::detail::op_queue<boost::asio::detail::task_io_service_operation>&) ()
   from /usr/lib64/libtorrent-rasterbar.so.8
#2  0x00007f38adb88217 in boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&) () from /usr/lib64/libtorrent-rasterbar.so.8
#3  0x00007f38adb885a1 in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /usr/lib64/libtorrent-rasterbar.so.8
#4  0x00007f38adccaacc in libtorrent::aux::session_impl::main_thread() () from /usr/lib64/libtorrent-rasterbar.so.8
#5  0x00007f38adb8bd5a in boost_asio_detail_posix_thread_function () from /usr/lib64/libtorrent-rasterbar.so.8
#6  0x00007f38ad4e2424 in start_thread () from /lib64/libpthread.so.0
#7  0x00007f38ab861dbd in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f387bfff700 (LWP 22665)):
#0  0x00007f38ab858d3d in poll () from /lib64/libc.so.6
#1  0x00007f38a31cabd9 in __libc_res_nsend () from /lib64/libresolv.so.2
#2  0x00007f38a31c8c62 in __libc_res_nquery () from /lib64/libresolv.so.2
#3  0x00007f38a31c92a5 in __libc_res_nquerydomain () from /lib64/libresolv.so.2
#4  0x00007f38a31c9761 in __libc_res_nsearch () from /lib64/libresolv.so.2
#5  0x00007f3888261b09 in _nss_dns_gethostbyname4_r () from /lib64/libnss_dns.so.2
#6  0x00007f38ab84ccd1 in gaih_inet () from /lib64/libc.so.6
#7  0x00007f38ab84ec7e in getaddrinfo () from /lib64/libc.so.6
#8  0x00007f38adb85b2e in boost::asio::detail::socket_ops::getaddrinfo(char const*, char const*, addrinfo const&, addrinfo**, boost::system::error_code&) ()
   from /usr/lib64/libtorrent-rasterbar.so.8
#9  0x00007f38adb85c3b in boost::asio::detail::socket_ops::background_getaddrinfo(boost::weak_ptr<void> const&, char const*, char const*, addrinfo const&, addrinfo**, boost::system::error_code&) () from /usr/lib64/libtorrent-rasterbar.so.8
#10 0x00007f38add8fe39 in boost::asio::detail::resolve_op<boost::asio::ip::tcp, boost::_bi::bind_t<void, boost::_mfi::mf2<void, libtorrent::udp_tracker_connection, boost::system::error_code const&, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp> >, boost::_bi::list3<boost::_bi::value<boost::intrusive_ptr<libtorrent::udp_tracker_connection> >, boost::arg<1>, boost::arg<2> > > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long) () from /usr/lib64/libtorrent-rasterbar.so.8
#11 0x00007f38adb88463 in boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&) () from /usr/lib64/libtorrent-rasterbar.so.8
#12 0x00007f38adb885a1 in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /usr/lib64/libtorrent-rasterbar.so.8
#13 0x00007f38adb8bce6 in boost::asio::io_service::run() () from /usr/lib64/libtorrent-rasterbar.so.8
#14 0x00007f38adb8bd42 in boost_asio_detail_posix_thread_function () from /usr/lib64/libtorrent-rasterbar.so.8
#15 0x00007f38ad4e2424 in start_thread () from /lib64/libpthread.so.0
#16 0x00007f38ab861dbd in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f387b7fe700 (LWP 22666)):
#0  0x00007f38ab858d3d in poll () from /lib64/libc.so.6
#1  0x00007f38a93c70bc in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f38a93c71cc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f38ac639eef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x00007f38ac5e9d1a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x00007f38ac448544 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#6  0x00007f38ac44c9ec in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#7  0x00007f38ad4e2424 in start_thread () from /lib64/libpthread.so.0
#8  0x00007f38ab861dbd in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f387affd700 (LWP 22671)):
#0  0x00007f38ad4e7faf in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007f38adb883e8 in boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&) () from /usr/lib64/libtorrent-rasterbar.so.8
#2  0x00007f38adb885a1 in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /usr/lib64/libtorrent-rasterbar.so.8
#3  0x00007f38adb8bce6 in boost::asio::io_service::run() () from /usr/lib64/libtorrent-rasterbar.so.8
#4  0x00007f38adb8bd42 in boost_asio_detail_posix_thread_function () from /usr/lib64/libtorrent-rasterbar.so.8
#5  0x00007f38ad4e2424 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f38ab861dbd in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f387a5d8700 (LWP 22672)):
#0  0x00007f38ad4e8358 in pthread_cond_timedwait () from /lib64/libpthread.so.0
#1  0x00007f38ac44d038 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQt5Core.so.5
#2  0x00007f38ac449a72 in QThreadPoolThread::run() () from /usr/lib64/libQt5Core.so.5
#3  0x00007f38ac44c9ec in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#4  0x00007f38ad4e2424 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f38ab861dbd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f3879dd7700 (LWP 22674)):
#0  0x00007f38ab858d3d in poll () from /lib64/libc.so.6
#1  0x00007f38a93c70bc in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f38a93c71cc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f38ac639eef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x00007f38ac5e9d1a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x00007f38ac448544 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#6  0x00007f38ac44c9ec in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#7  0x00007f38ad4e2424 in start_thread () from /lib64/libpthread.so.0
#8  0x00007f38ab861dbd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f38ae35d800 (LWP 22658)):
#0  0x00007f38ad4e365d in pthread_join () from /lib64/libpthread.so.0
#1  0x00007f38adb824ce in boost::asio::detail::posix_thread::join() () from /usr/lib64/libtorrent-rasterbar.so.8
#2  0x00007f38adcc52d7 in libtorrent::aux::session_impl::~session_impl() () from /usr/lib64/libtorrent-rasterbar.so.8
#3  0x00007f38adcc5ed9 in libtorrent::aux::session_impl::~session_impl() () from /usr/lib64/libtorrent-rasterbar.so.8
#4  0x00007f38adc94736 in boost::detail::sp_counted_base::release() [clone .part.17] [clone .constprop.792] () from /usr/lib64/libtorrent-rasterbar.so.8
#5  0x00007f38adc95635 in libtorrent::session::~session() () from /usr/lib64/libtorrent-rasterbar.so.8
#6  0x000000000051dc49 in BitTorrent::Session::~Session() ()
#7  0x000000000051de19 in BitTorrent::Session::~Session() ()
#8  0x000000000050d176 in BitTorrent::Session::freeInstance() ()
#9  0x00000000004b62f3 in Application::cleanup() ()
#10 0x00007f38ac612848 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#11 0x00007f38ac5f18b3 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#12 0x00000000004b80d0 in Application::exec(QStringList const&) ()
#13 0x00000000004afe20 in main ()
(gdb) 

@zeule
Copy link
Contributor

zeule commented Apr 10, 2016

The thread #6 apparently shows a stalled DNS request.

@sledgehammer999
Copy link
Member

@evsh Congrats you just referenced a bunch of issues on github :p Next time wrap such content in triple backticks:

<content>

@zeule
Copy link
Contributor

zeule commented Apr 10, 2016

Ups... Thanks for correcting the post!

@k79e
Copy link

k79e commented Apr 11, 2016

@sledgehammer999
Seems qb exit many tcp connections slowly on my system. After it closed all connection it will terminate. I remember the longest time it takes is that it makes my win7 can't shotdown for minutes.

   0  Id: 1548.cbc Suspend: 1 Teb: 7efdd000 Unfrozen
ChildEBP RetAddr  
013ff474 76d115bf ntdll!NtWaitForSingleObject+0x15
013ff4e0 770e1194 KERNELBASE!WaitForSingleObjectEx+0x98
**\* WARNING: Unable to verify checksum for qbittorrent.exe
013ff4f8 0065e4f7 kernel32!WaitForSingleObjectExImplementation+0x75
013ff530 000e5a11 qbittorrent!QWaitCondition::wait+0x74
013ff560 000e28f5 qbittorrent!BitTorrent::Session::getPendingAlerts(class QVector<libtorrent::alert *> \* out = 0x013ff598, unsigned long time = 0x7530)+0x49 [g:\qbittorrent\qbittorrent-3.3.4\src\base\bittorrent\session.cpp @ 2005]
013ff5dc 000deb5c qbittorrent!BitTorrent::Session::saveResumeData(void)+0x3f [g:\qbittorrent\qbittorrent-3.3.4\src\base\bittorrent\session.cpp @ 1326]
013ff600 000deae4 qbittorrent!BitTorrent::Session::~Session(void)+0x32 [g:\qbittorrent\qbittorrent-3.3.4\src\base\bittorrent\session.cpp @ 270]
013ff60c 000b851b qbittorrent!BitTorrent::Session::`scalar deleting destructor'(void)+0xb
013ff658 00194667 qbittorrent!Application::cleanup(void)+0x167 [g:\qbittorrent\qbittorrent-3.3.4\src\app\application.cpp @ 483]
013ff660 005fbc98 qbittorrent!Application::qt_static_metacall(class QObject \* _o = 0x017a7770, QMetaObject::Call _c = InvokeMetaMethod (0), int _id = 4, void *\* _a = 0x013ff6f0)+0x55 [g:\qbittorrent\build-qbittorrent334-qt5_msvc2015-release\src\release\moc_application.cpp @ 97]
013ff708 005fb83c qbittorrent!QMetaObject::activate+0x455
013ff724 006a4a09 qbittorrent!QMetaObject::activate+0x20
013ff730 0061d884 qbittorrent!QCoreApplication::aboutToQuit+0xe
013ff778 000b7df5 qbittorrent!QCoreApplication::exec+0x10e
013ff7a4 000bc8aa qbittorrent!Application::exec(class QStringList \* params = 0x013ff7c8)+0x28b [g:\qbittorrent\qbittorrent-3.3.4\src\app\application.cpp @ 305]
013ff804 00711990 qbittorrent!main(int argc = 0, char *\* argv = 0x00000000)+0x29b [g:\qbittorrent\qbittorrent-3.3.4\src\app\main.cpp @ 269]
013ff830 008915a8 qbittorrent!WinMain+0xc7
013ff87c 770e338a qbittorrent!__scrt_common_main_seh(void)+0xfd [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 264]
013ff888 77c29a02 kernel32!BaseThreadInitThunk+0xe
013ff8c8 77c299d5 ntdll!__RtlUserThreadStart+0x70

   1  Id: 1548.c78 Suspend: 1 Teb: 7efda000 Unfrozen
ChildEBP RetAddr  
037df62c 77c2c803 ntdll!NtWaitForMultipleObjects+0x15
037df7c0 770e338a ntdll!TppWaiterpThread+0x33d
037df7cc 77c29a02 kernel32!BaseThreadInitThunk+0xe
037df80c 77c299d5 ntdll!__RtlUserThreadStart+0x70
037df824 00000000 ntdll!_RtlUserThreadStart+0x1b

   2  Id: 1548.15e4 Suspend: 1 Teb: 7efd7000 Unfrozen
ChildEBP RetAddr  
036dd994 76d1170b ntdll!NtWaitForMultipleObjects+0x15
036dda30 770e1a0c KERNELBASE!WaitForMultipleObjectsEx+0x100
036dda78 76d7087a kernel32!WaitForMultipleObjectsExImplementation+0xe0
036ddacc 006a32e0 USER32!RealMsgWaitForMultipleObjectsEx+0x14d
036df890 00687dc9 qbittorrent!QEventDispatcherWin32::processEvents+0x53a
036df8e0 0065dff8 qbittorrent!QEventLoop::exec+0x145
036df918 0065d01c qbittorrent!QThread::exec+0x81
036df93c 0089cccf qbittorrent!QThreadPrivate::start+0xa9
036df978 770e338a qbittorrent!thread_start<unsigned int (void \* parameter = 0x017d6210)+0x57 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
036df984 77c29a02 kernel32!BaseThreadInitThunk+0xe
036df9c4 77c299d5 ntdll!__RtlUserThreadStart+0x70
036df9dc 00000000 ntdll!_RtlUserThreadStart+0x1b

   3  Id: 1548.e74 Suspend: 1 Teb: 7ef9f000 Unfrozen
ChildEBP RetAddr  
0918f72c 77c41ecb ntdll!NtWaitForWorkViaWorkerFactory+0x12
0918f88c 770e338a ntdll!TppWorkerThread+0x216
0918f898 77c29a02 kernel32!BaseThreadInitThunk+0xe
0918f8d8 77c299d5 ntdll!__RtlUserThreadStart+0x70
0918f8f0 00000000 ntdll!_RtlUserThreadStart+0x1b

   4  Id: 1548.155c Suspend: 1 Teb: 7ef9c000 Unfrozen
ChildEBP RetAddr  
0393efb4 76d1c76b ntdll!NtCreateFile+0x12
0393efb4 76d1c76b KERNELBASE!CreateFileW+0x35e
0393f058 770e3f66 KERNELBASE!CreateFileW+0x35e
0393f084 00775345 kernel32!CreateFileWImplementation+0x69
0393f198 0075f837 qbittorrent!libtorrent::stat_file(class std::basic_string<char,std::char_traits<char>,std::allocator<char> > inf = class std::basic_string<char,std::char_traits<char>,std::allocator<char> >, struct libtorrent::file_status \* s = 0x0393f210, class boost::system::error_code \* ec = 0x0393f1ec, int flags = 0)+0x2f5 [g:\qbittorrent\libtorrent\src\file.cpp @ 198]
0393f260 007640db qbittorrent!libtorrent::get_filesizes(class libtorrent::file_storage \* storage = 0x06e1bd98, class std::basic_string<char,std::char_traits<char>,std::allocator<char> > \* p = 0x070be680)+0xe7 [g:\qbittorrent\libtorrent\src\storage.cpp @ 110]
0393f2d4 00764364 qbittorrent!libtorrent::default_storage::write_resume_data(class libtorrent::entry \* rd = 0x0483d760)+0x4b [g:\qbittorrent\libtorrent\src\storage.cpp @ 602]
0393f33c 00788c2e qbittorrent!libtorrent::piece_manager::write_resume_data(class libtorrent::entry \* rd = 0x0483d760)+0x54 [g:\qbittorrent\libtorrent\src\storage.cpp @ 1785]
0393f7d8 0072ec31 qbittorrent!libtorrent::disk_io_thread::thread_fun(void)+0x21ce [g:\qbittorrent\libtorrent\src\disk_io_thread.cpp @ 2491]
0393f7f8 0089cccf qbittorrent!boost::asio::detail::win_thread_function(void \* arg = 0x017dfbd0)+0x41 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_thread.ipp @ 121]
0393f834 770e338a qbittorrent!thread_start<unsigned int (void \* parameter = 0x017dfc00)+0x57 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
0393f840 77c29a02 kernel32!BaseThreadInitThunk+0xe
0393f880 77c299d5 ntdll!__RtlUserThreadStart+0x70
0393f898 00000000 ntdll!_RtlUserThreadStart+0x1b

   5  Id: 1548.dbc Suspend: 1 Teb: 7ef99000 Unfrozen
ChildEBP RetAddr  
03c5fb88 76d115bf ntdll!NtWaitForSingleObject+0x15
03c5fbf4 770e1194 KERNELBASE!WaitForSingleObjectEx+0x98
03c5fc0c 770e1148 kernel32!WaitForSingleObjectExImplementation+0x75
03c5fc20 007273b9 kernel32!WaitForSingleObject+0x12
03c5fc38 0072ec31 qbittorrent!boost::asio::detail::win_iocp_io_service::timer_thread_function::operator()(void)+0x29 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_iocp_io_service.ipp @ 54]
03c5fc58 0089cccf qbittorrent!boost::asio::detail::win_thread_function(void \* arg = 0x017e53a0)+0x41 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_thread.ipp @ 121]
03c5fc94 770e338a qbittorrent!thread_start<unsigned int (void \* parameter = 0x017e53c8)+0x57 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
03c5fca0 77c29a02 kernel32!BaseThreadInitThunk+0xe
03c5fce0 77c299d5 ntdll!__RtlUserThreadStart+0x70
03c5fcf8 00000000 ntdll!_RtlUserThreadStart+0x1b

   6  Id: 1548.ff8 Suspend: 1 Teb: 7ef96000 Unfrozen
ChildEBP RetAddr  
0407f9fc 76d07705 ntdll!ZwRemoveIoCompletion+0x15
0407fa28 00728f73 KERNELBASE!GetQueuedCompletionStatus+0x29
0407fa88 0072c360 qbittorrent!boost::asio::detail::win_iocp_io_service::do_one(bool block = true, class boost::system::error_code \* ec = 0x0407fadc)+0x113 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_iocp_io_service.ipp @ 367]
0407fac4 0079ff3e qbittorrent!boost::asio::detail::win_iocp_io_service::run(class boost::system::error_code \* ec = 0x0407fadc)+0xc0 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_iocp_io_service.ipp @ 164]
0407faf0 0072ec31 qbittorrent!libtorrent::aux::session_impl::main_thread(void)+0x4e [g:\qbittorrent\libtorrent\src\session_impl.cpp @ 4912]
0407fb10 0089cccf qbittorrent!boost::asio::detail::win_thread_function(void \* arg = 0x017e9ff8)+0x41 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_thread.ipp @ 121]
0407fb4c 770e338a qbittorrent!thread_start<unsigned int (void \* parameter = 0x017ea138)+0x57 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
0407fb58 77c29a02 kernel32!BaseThreadInitThunk+0xe
0407fb98 77c299d5 ntdll!__RtlUserThreadStart+0x70
0407fbb0 00000000 ntdll!_RtlUserThreadStart+0x1b

   7  Id: 1548.e84 Suspend: 1 Teb: 7ef93000 Unfrozen
ChildEBP RetAddr  
0420f9bc 74b817cd ntdll!NtWaitForSingleObject+0x15
0420f9fc 74b86d40 MSWSOCK!SockWaitForSingleObject+0x3a
0420fae8 75a228af MSWSOCK!WSPSelect+0x3a6
0420fb68 0072c51a WS2_32!select+0x2bb
0420fb8c 0072c1e0 qbittorrent!boost::asio::detail::socket_ops::select(int nfds = 25241024, struct fd_set \* readfds = 0x01814980, struct fd_set \* writefds = 0x018159a0, struct fd_set \* exceptfds = 0x0420fbbc, struct timeval \* timeout = 0x0181e658, class boost::system::error_code \* ec = 0x0420fc28)+0x9a [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\socket_ops.ipp @ 1780]
0420fc00 0072c41c qbittorrent!boost::asio::detail::select_reactor::run(bool block = true, class boost::asio::detail::op_queueboost::asio::detail::win_iocp_operation \* ops = 0x0420fc28)+0x220 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\select_reactor.ipp @ 214]
0420fc3c 0072bf68 qbittorrent!boost::asio::detail::select_reactor::run_thread(void)+0x7c [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\select_reactor.ipp @ 257]
0420fc44 0072ec31 qbittorrent!boost::asio::detail::win_thread::func<boost::asio::detail::binder1<void (void)+0x8 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\win_thread.hpp @ 118]
0420fc64 0089cccf qbittorrent!boost::asio::detail::win_thread_function(void \* arg = 0x01811398)+0x41 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_thread.ipp @ 121]
0420fca0 770e338a qbittorrent!thread_start<unsigned int (void \* parameter = 0x018113c8)+0x57 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
0420fcac 77c29a02 kernel32!BaseThreadInitThunk+0xe
0420fcec 77c299d5 ntdll!__RtlUserThreadStart+0x70
0420fd04 00000000 ntdll!_RtlUserThreadStart+0x1b

   8  Id: 1548.15d8 Suspend: 1 Teb: 7ef90000 Unfrozen
ChildEBP RetAddr  
0447fc60 76d1170b ntdll!NtWaitForMultipleObjects+0x15
0447fcfc 770e1a0c KERNELBASE!WaitForMultipleObjectsEx+0x100
0447fd44 770e4200 kernel32!WaitForMultipleObjectsExImplementation+0xe0
0447fd60 0065cda3 kernel32!WaitForMultipleObjects+0x18
0447fdb8 770e338a qbittorrent!qt_adopted_thread_watcher_function+0x69
0447fdc4 77c29a02 kernel32!BaseThreadInitThunk+0xe
0447fe04 77c299d5 ntdll!__RtlUserThreadStart+0x70
0447fe1c 00000000 ntdll!_RtlUserThreadStart+0x1b

   9  Id: 1548.10a4 Suspend: 1 Teb: 7ef8d000 Unfrozen
ChildEBP RetAddr  
0468da18 76d1170b ntdll!NtWaitForMultipleObjects+0x15
0468dab4 770e1a0c KERNELBASE!WaitForMultipleObjectsEx+0x100
0468dafc 76d7087a kernel32!WaitForMultipleObjectsExImplementation+0xe0
0468db50 006a32e0 USER32!RealMsgWaitForMultipleObjectsEx+0x14d
0468f914 00687dc9 qbittorrent!QEventDispatcherWin32::processEvents+0x53a
0468f964 0065dff8 qbittorrent!QEventLoop::exec+0x145
0468f99c 0065d01c qbittorrent!QThread::exec+0x81
0468f9c0 0089cccf qbittorrent!QThreadPrivate::start+0xa9
0468f9fc 770e338a qbittorrent!thread_start<unsigned int (void \* parameter = 0x0181f3a0)+0x57 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
0468fa08 77c29a02 kernel32!BaseThreadInitThunk+0xe
0468fa48 77c299d5 ntdll!__RtlUserThreadStart+0x70
0468fa60 00000000 ntdll!_RtlUserThreadStart+0x1b

  10  Id: 1548.1520 Suspend: 1 Teb: 7ef8a000 Unfrozen
ChildEBP RetAddr  
03f6fbb0 76d07705 ntdll!ZwRemoveIoCompletion+0x15
03f6fbdc 00728f73 KERNELBASE!GetQueuedCompletionStatus+0x29
03f6fc3c 0072c360 qbittorrent!boost::asio::detail::win_iocp_io_service::do_one(bool block = true, class boost::system::error_code \* ec = 0x03f6fc88)+0x113 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_iocp_io_service.ipp @ 367]
03f6fc78 0072bf95 qbittorrent!boost::asio::detail::win_iocp_io_service::run(class boost::system::error_code \* ec = 0x03f6fc88)+0xc0 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_iocp_io_service.ipp @ 164]
03f6fc8c 0072ec31 qbittorrent!boost::asio::detail::win_thread::funcboost::asio::detail::resolver_service_base::work_io_service_runner::run(void)+0x25 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\win_thread.hpp @ 118]
03f6fcac 0089cccf qbittorrent!boost::asio::detail::win_thread_function(void \* arg = 0x01819268)+0x41 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_thread.ipp @ 121]
03f6fce8 770e338a qbittorrent!thread_start<unsigned int (void \* parameter = 0x01819290)+0x57 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
03f6fcf4 77c29a02 kernel32!BaseThreadInitThunk+0xe
03f6fd34 77c299d5 ntdll!__RtlUserThreadStart+0x70
03f6fd4c 00000000 ntdll!_RtlUserThreadStart+0x1b

  11  Id: 1548.12d0 Suspend: 1 Teb: 7ef87000 Unfrozen
ChildEBP RetAddr  
06d1fbd0 76d07705 ntdll!ZwRemoveIoCompletion+0x15
06d1fbfc 00728f73 KERNELBASE!GetQueuedCompletionStatus+0x29
06d1fc5c 0072c360 qbittorrent!boost::asio::detail::win_iocp_io_service::do_one(bool block = true, class boost::system::error_code \* ec = 0x06d1fca8)+0x113 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_iocp_io_service.ipp @ 367]
06d1fc98 0072bf95 qbittorrent!boost::asio::detail::win_iocp_io_service::run(class boost::system::error_code \* ec = 0x06d1fca8)+0xc0 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_iocp_io_service.ipp @ 164]
06d1fcac 0072ec31 qbittorrent!boost::asio::detail::win_thread::funcboost::asio::detail::resolver_service_base::work_io_service_runner::run(void)+0x25 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\win_thread.hpp @ 118]
06d1fccc 0089cccf qbittorrent!boost::asio::detail::win_thread_function(void \* arg = 0x065803b0)+0x41 [g:\qbittorrent\boost_1_60_0\boost\asio\detail\impl\win_thread.ipp @ 121]
06d1fd08 770e338a qbittorrent!thread_start<unsigned int (void \* parameter = 0x0653e738)+0x57 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
06d1fd14 77c29a02 kernel32!BaseThreadInitThunk+0xe
06d1fd54 77c299d5 ntdll!__RtlUserThreadStart+0x70
06d1fd6c 00000000 ntdll!_RtlUserThreadStart+0x1b

  12  Id: 1548.1338 Suspend: 1 Teb: 7ef84000 Unfrozen
ChildEBP RetAddr  
07e6fbbc 74b8635c ntdll!ZwRemoveIoCompletion+0x15
07e6fbe8 770e338a MSWSOCK!SockAsyncThread+0x83
07e6fbf4 77c29a02 kernel32!BaseThreadInitThunk+0xe
07e6fc34 77c299d5 ntdll!__RtlUserThreadStart+0x70
07e6fc4c 00000000 ntdll!_RtlUserThreadStart+0x1b

  13  Id: 1548.14c0 Suspend: 1 Teb: 7ef81000 Unfrozen
ChildEBP RetAddr  
06bbfb34 76d115bf ntdll!NtWaitForSingleObject+0x15
06bbfba0 770e1194 KERNELBASE!WaitForSingleObjectEx+0x98
06bbfbb8 0065e4f7 kernel32!WaitForSingleObjectExImplementation+0x75
06bbfbf0 006821df qbittorrent!QWaitCondition::wait+0x74
06bbfc50 0065d01c qbittorrent!QThreadPoolThread::run+0x152
06bbfc74 0089cccf qbittorrent!QThreadPrivate::start+0xa9
06bbfcb0 770e338a qbittorrent!thread_start<unsigned int (void \* parameter = 0x084fe170)+0x57 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
06bbfcbc 77c29a02 kernel32!BaseThreadInitThunk+0xe
06bbfcfc 77c299d5 ntdll!__RtlUserThreadStart+0x70
06bbfd14 00000000 ntdll!_RtlUserThreadStart+0x1b

  14  Id: 1548.158c Suspend: 1 Teb: 7ef7e000 Unfrozen
ChildEBP RetAddr  
097efe0c 77c41ecb ntdll!NtWaitForWorkViaWorkerFactory+0x12
097eff6c 770e338a ntdll!TppWorkerThread+0x216
097eff78 77c29a02 kernel32!BaseThreadInitThunk+0xe
097effb8 77c299d5 ntdll!__RtlUserThreadStart+0x70
097effd0 00000000 ntdll!_RtlUserThreadStart+0x1b

  15  Id: 1548.1934 Suspend: 1 Teb: 7ef7b000 Unfrozen
ChildEBP RetAddr  
0998fbec 73daa41c ntdll!NtWaitForMultipleObjects+0x15
0998fc94 770e338a WINMM!timeThread+0x3c
0998fca0 77c29a02 kernel32!BaseThreadInitThunk+0xe
0998fce0 77c299d5 ntdll!__RtlUserThreadStart+0x70
0998fcf8 00000000 ntdll!_RtlUserThreadStart+0x1b

  16  Id: 1548.19cc Suspend: 1 Teb: 7ef78000 Unfrozen
ChildEBP RetAddr  
0a43fd48 77c41ecb ntdll!NtWaitForWorkViaWorkerFactory+0x12
0a43fea8 770e338a ntdll!TppWorkerThread+0x216
0a43feb4 77c29a02 kernel32!BaseThreadInitThunk+0xe
0a43fef4 77c299d5 ntdll!__RtlUserThreadStart+0x70
0a43ff0c 00000000 ntdll!_RtlUserThreadStart+0x1b

# 17  Id: 1548.1a60 Suspend: 1 Teb: 7ef75000 Unfrozen

ChildEBP RetAddr  
069ff828 77c90026 ntdll!DbgBreakPoint
069ff858 770e338a ntdll!DbgUiRemoteBreakin+0x3c
069ff864 77c29a02 kernel32!BaseThreadInitThunk+0xe
069ff8a4 77c299d5 ntdll!__RtlUserThreadStart+0x70
069ff8bc 00000000 ntdll!_RtlUserThreadStart+0x1b

  18  Id: 1548.14a4 Suspend: 1 Teb: 7ef72000 Unfrozen
ChildEBP RetAddr  
0a6add60 76d1170b ntdll!NtWaitForMultipleObjects+0x15
0a6addfc 770e1a0c KERNELBASE!WaitForMultipleObjectsEx+0x100
0a6ade44 76d7087a kernel32!WaitForMultipleObjectsExImplementation+0xe0
0a6ade98 006a32e0 USER32!RealMsgWaitForMultipleObjectsEx+0x14d
0a6afc5c 00687dc9 qbittorrent!QEventDispatcherWin32::processEvents+0x53a
0a6afcac 0065dff8 qbittorrent!QEventLoop::exec+0x145
0a6afce4 0065d01c qbittorrent!QThread::exec+0x81
0a6afd08 0089cccf qbittorrent!QThreadPrivate::start+0xa9
0a6afd44 770e338a qbittorrent!thread_start<unsigned int (void \* parameter = 0x04906d88)+0x57 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 115]
0a6afd50 77c29a02 kernel32!BaseThreadInitThunk+0xe
0a6afd90 77c299d5 ntdll!__RtlUserThreadStart+0x70
0a6afda8 00000000 ntdll!_RtlUserThreadStart+0x1b

  32  Id: 1548.b28 Suspend: 1 Teb: 7ef48000 Unfrozen
ChildEBP RetAddr  
0928fdf0 77c41ecb ntdll!NtWaitForWorkViaWorkerFactory+0x12
0928ff50 770e338a ntdll!TppWorkerThread+0x216
0928ff5c 77c29a02 kernel32!BaseThreadInitThunk+0xe
0928ff9c 77c299d5 ntdll!__RtlUserThreadStart+0x70
0928ffb4 00000000 ntdll!_RtlUserThreadStart+0x1b

@ngosang
Copy link
Member Author

ngosang commented Apr 11, 2016

The main problem for me is qBittorrent prevents the computer from shutting down. At least in Windows 10 after 1 or 2 minutes without being able to close the process, Windows cancels the shutdown and the computer stays on all night.

@TETYYS
Copy link

TETYYS commented Apr 19, 2016

On torrent count as high as 2k shutting down qbit is taking long time here too. I'd suggest writing fastresume data to one unified file instead of two thousand individual ones

@Misiek304
Copy link

uTorrent does this inside of resume.dat

@glassez
Copy link
Member

glassez commented Apr 20, 2016

I'd suggest writing fastresume data to one unified file instead of two thousand individual ones

In this case, we run the risk of losing all data when some failure. To avoid this, we must use a "protected" mechanism, such as SQLite database. But maintainer (@sledgehammer999) has fundamental objections to the use of such things in the qBittorrent.

@TETYYS
Copy link

TETYYS commented Apr 20, 2016

Why? Current system is very slow.

@krzyzowiec
Copy link

krzyzowiec commented Jun 7, 2016

I had the same problem on Linux for a long time, until I came across a forum post that helped me. Try removing extraneous trackers (anything over 2-3 is excessive). It seems that people get this idea that more trackers is automatically better and will add something like 30+, some of which no longer work but your client checks them anyway.

Prior to this, my client would never seem to exit, and my patience did not extend past the 5-minute mark to see if it ever would. Now it takes less than 20 seconds, even though I have over a hundred torrents.

Maybe a feature that prunes non-functional trackers after failing to connect X times would help with this.

@TETYYS
Copy link

TETYYS commented Jun 8, 2016

Not a really great solution, I'm sure lots of users need errored trackers.

@krzyzowiec
Copy link

A lot of users need trackers that don't work? That's fine I guess, maybe something optional for others would be nice. I don't mind manually pruning, but many people are just going to end up frustrated and blame it on the client.

@Misiek304
Copy link

@Rrak - Do you have automatic tracker adding list set up? Can you share with me you list of trackers?

@krzyzowiec
Copy link

I don't. It's not that I favor any particular trackers. If anything, I tend to try and diversify which trackers my torrents use in order to reduce the load on the larger ones like openbittorrent or publicbt, which everyone seems to use.

@Misiek304
Copy link

Except last time I checked those two where dead from some time now. Right now I only use those two:

udp://tracker.coppersurfer.tk:6969/announce
udp://tracker.opentrackr.org:1337/announce

If you need a different one or you need more you can check out this guy. He prepears a lists of currently the best trackers and publishes the lists of them on his github. I asked him about what data he uses to prioritize trackers and uses

returning more seeds/peers, latency, reliability, offline time...

https://github.com/ngosang/trackerslist

@TETYYS
Copy link

TETYYS commented Jun 17, 2016

Is this being thought about? It's awful, shutting down the PC takes a minute longer because qBittorrent is "saving torrent progress"

@o-l-a-v
Copy link

o-l-a-v commented Feb 19, 2020

I believe proxy with socks5 protocol might be related. I've been using qBittorrent on Windows without proxy recently, and I've not had this problem.

@slrslr
Copy link
Contributor

slrslr commented Feb 19, 2020

I am not using proxy in qbt settings and think i have never used. Yet the qbt process is shutting down several tens of minutes.

@Sonico98
Copy link

It started happening to me with the update to 4.2.1 on Linux, had no problems before.

@tuxayo
Copy link

tuxayo commented Mar 15, 2020

I have my qBittorrent stuck since 32 hours, is there something I can do to help troubleshooting this bug?

Maybe a core dump?

@arvidn
Copy link
Contributor

arvidn commented Mar 15, 2020

I recognize that this is an old ticket, and probably has referred to different bugs over the years. However, I recently discovered (and fixed) an issue that could cause this in libtorrent 1.2.4 (fixed in the recent 1.2.5 release).

here's the PR.

@arvidn
Copy link
Contributor

arvidn commented Mar 15, 2020

@tuxayo if you have the ability, building libtorrent with asio-debugging=on and run qbt from the terminal would be a way to troubleshoot this.

@Efreak
Copy link

Efreak commented Mar 28, 2020

I've had this/issue for the past week or so, since I started closing qbittorrent more often.

I do not have anything useful in logs, and do not have a debugger/compiler setup

The primary reason I'm shutting down qbittorrent is so I can switch between networks (because qbittorrent doesn't understand that I'm downloading to an NAS, and it's storage will disappear when I go offline), secondary so I can reset a router/update NAS.

I currently have around 600 torrents either downloading, seeding, or queued. All of them are stored on my NAS.

One of my torrents is >5000 jpg files, totaling ~2.6gb.

I told qbittorrent to shut down about 3 hours ago

For the past 30 minutes or so, qbittorrent has been opening and closing file handles from the torrent mentioned above, every 0.5-3 seconds, one at a time. (Information obtained from Process Hacker)

Edit: qbittorrent has finally closed, about an hour after I noticed it was still open.

@k79e
Copy link

k79e commented Mar 28, 2020

Maybe it's because the network of qb is not closed?

@FranciscoPombal
Copy link
Member

For the past 30 minutes or so, qbittorrent has been opening and closing file handles from the torrent mentioned above, every 0.5-3 seconds, one at a time. (Information obtained from Process Hacker)

Interesting. @arvidn what could cause file handles to be closed so slowly? Do you think this might be a bug in the way qBittorrent saves .fastresumes, or could this be related to some bug in libtorrent's exit logic that causes those file handles to be held onto for a long time?

@Efreak
Copy link

Efreak commented Mar 29, 2020

libtorrent's exit logic that causes those file handles to be held onto for a long time?

This is incorrect. The handles were being opened and then immediately closed, in the space of 0.5-3 seconds each (mostly around once a second; me refresh rate is 0.5 seconds, so some of them could have been slightly less). The Granted access (symbolic) column in the handles view mostly shows Read, with the occasional Read attributes, Synchronize, Delete if that helps. I believe I had the values filtered to only those that contain UNC paths, so next time I exit* I'll see if anything interesting is happening elsewhere, and double check to make sure the handle access is what it said (I'm unsure of the meaning of that column due to the use of the word symbolic. If the granted access is symbolic, does that mean it doesn't mean anything?)

* I can't check now, because on upgrading 4.2.0 -> 4.2.2 earlier, it decided to move approximately 200gb of files located on a network drive, which will take a while to complete, and after which I will hopefully not have to move everything back

@k79e
Copy link

k79e commented May 23, 2020

Hi guys, is this bug fixed!?? Does qb quit the connection on the exit properly? Will it close the connection forcely if time is too long?

@j03bj03
Copy link

j03bj03 commented May 23, 2020

Hi guys, is this bug fixed!?? Does qb quit the connection on the exit properly? Will it close the connection forcely if time is too long?

Hello, this bug is still there. Nobody yet gave any information on an effective way to correct this bug.

To answer your last question. No, there is no mechanism that will detect if the close process is "hanged" and then close it forcely. If the bug happens, it just hangs forever...

@xavier2k6
Copy link
Member

@j03bj03 @k79e What OS are you using? & what version of qBittorrent are you currently using?

@j03bj03
Copy link

j03bj03 commented May 23, 2020

@j03bj03 @k79e What OS are you using? & what version of qBittorrent are you currently using?

Hello! Windows 7 Ultimate 64-bit, qBittorrent v4.2.1 64-bit (but it has been doing this bug on the previous versions I upgraded too. Thanks!

@xavier2k6
Copy link
Member

Hello! Windows 7 Ultimate 64-bit, qBittorrent v4.2.1 64-bit (but it has been doing this bug on the previous versions I upgraded too. Thanks!

Please update to 4.2.5

@j03bj03
Copy link

j03bj03 commented May 23, 2020

Hello! Windows 7 Ultimate 64-bit, qBittorrent v4.2.1 64-bit (but it has been doing this bug on the previous versions I upgraded too. Thanks!

Please update to 4.2.5

Ok, will do eventually, it's not an instant process for my setup.

Do you say to update because you know for sure it's corrected, because you think it may be corrected and want to check if it works for me, or just because of a routine robotic procedure that you ask systematically to everyone like a tech support on the phone who asks to double-check if our router is plugged into the wall?

I am asking this because I've been updating and updating and updating and the problem never left. I won't just update if you just suggest me this without having any good reason to think that 4.2.5 might correct the bug.

Thanks

@xavier2k6
Copy link
Member

because you think it may be corrected and want to check if it works for me

I am saying it as even though this issue is quite old - if you were to open a new issue of your own for this, the latest version is a requirement.

There have been many, many fixes not only on qBittorrent's side but also on the libraries used by qBittorrent.

So, yes it may be fixed for you & possibly others in latest 4.2.5 & if not - I can provide a test build.

@j03bj03
Copy link

j03bj03 commented May 23, 2020

Ok, will do so in the next days/week(s) and will come back here to report if bug still exists. Thanks!

@xavier2k6
Copy link
Member

Ok, will do so in the next days/week(s) and will come back here to report if bug still exists. Thanks!

If not coming back for days/weeks - just make sure you install latest version available first as 4.2.6 etc could be released before you come back.

@k79e
Copy link

k79e commented May 23, 2020

Don't use qb anymore. Just want to know is this bug fixed or not.
My problem in past is the connection don't get closed properly(It even transmit the data after you close qb)

@FranciscoPombal
Copy link
Member

My problem in past is the connection don't get closed properly(It even transmit the data after you close qb)

Do you mean stop announce requests not having enough time to go through to the tracker? IIRC the default is 5 seconds, but for slow trackers this timeout is now tunable in the advanced settings.

@k79e
Copy link

k79e commented May 23, 2020

It's uploading data to other peer. Not the tracker problem.
Maybe when the announce is not finished the uploading is not stopped!??

@FranciscoPombal
Copy link
Member

@k79e

It's uploading data to other peer. Not the tracker problem.

I don't remember the last time I had problems with that (on any client). Maybe try the latest version to see if it is still a problem? Bust out wireshark and do a packet capture (a bug in peer connections would most likely be a bug in libtorrent, not qBittorrent proper, anyway)? Otherwise, why comment here about something that's happened probably years ago, if you have no newer data to compare to?

@sonnysavage
Copy link

This issue stopped occurring for me a few months ago.

@j03bj03
Copy link

j03bj03 commented Jun 2, 2020

I recently upgraded to the last version. I just closed qBittorrent for the first time after running for several days and it closed properly for the first time since forever.

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Jun 2, 2020

Closing this, due to reasoning based on the following comment (emphasis mine):

I recognize that this is an old ticket, and probably has referred to different bugs over the years. However, I recently discovered (and fixed) an issue that could cause this in libtorrent 1.2.4 (fixed in the recent 1.2.5 release).

  • There are no subsequent comments beyond this one that mention having issues with any version using libtorrent >= 1.2.5. Furthermore, despite significant activity in this issue tracker in the past months, there has been no additional report of this type (neither here nor in other threads).
  • There are comments that not only confirm the issue is fixed, they are also from people who have previously posted in the thread and have tested again with the newer versions.
  • Like the quote says, lots of people who posted over the years were probably experiencing different bugs over time, many of which have since been fixed, which means a lot of the comments in this thread are no longer relevant.

For all intents and purposes, this is now considered fixed. If experiencing similar symptoms in the latest version, they should be attributed to a potentially different underlying cause than what the OP and earlier comments were originally experiencing and referring to. For these reasons, it is better to close this issue report. It is better to keep reports focused, current and with relevant information, than to keep a very old thread filled with outdated information.
Also many people in this thread seemed to have a unrelated problems with similar symptoms that were fixed with unrelated stuff like Windows Update.

If anyone has problems with the latest version, please open a new issue report, with all the required information, including settings and logs in plain text, and, if possible, follow the suggestion in this comment: #5097 (comment). You can also ask for test builds with the latest libtorrent code and other libraries from the team if you don't know how to compile from source yourself, someone will probably be able to provide you with one for testing.

Thank you all for your contributions.

@qbittorrent qbittorrent locked as resolved and limited conversation to collaborators Jun 2, 2020
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 Libtorrent OS: Linux Issues specific to Linux distributions OS: Windows Issues specific to Windows
Projects
None yet
Development

No branches or pull requests