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

4.2.x high RAM memory usage due to HTTPS tracker announces for some users #12326

Closed
p43b1 opened this issue Mar 29, 2020 · 156 comments
Closed

4.2.x high RAM memory usage due to HTTPS tracker announces for some users #12326

p43b1 opened this issue Mar 29, 2020 · 156 comments

Comments

@p43b1
Copy link

p43b1 commented Mar 29, 2020

Please provide the following information

qBittorrent version and Operating System

4.2.2
Windows 10

If on linux, libtorrent-rasterbar and Qt version

(type here)

What is the problem

Excessively high RAM memory usage compared to 4.2.0

320MB after continuously running for two weeks compared to 2.5GB after running for 3 hours with the same of downloading/uploading torrents.

4.2.2 RAM USAGE
4_2_2 RAM

4.2.2 STATISTICS

4_2_2 STAT

4.2.0 RAM USAGE
4_2_0 RAM

4.2.0 STATISTICS
4_2_2 STAT

What is the expected behavior

(type here)

Steps to reproduce

(type here)

Extra info(if any)

(type here)

@ghost
Copy link

ghost commented Mar 29, 2020

Cache settings were set to auto in 4.2.2. Maybe that could’ve caused this issue. Try setting it manually.

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Mar 29, 2020

Cache settings were set to auto in 4.2.2. Maybe that could’ve caused this issue. Try setting it manually.

Assuming all of the 2 GiB extra usage is cache, you'd have to have 80 GiB or more of system memory for libtorrent to allocate that much when the cache setting is set to auto. If you do have 80 GiB or more of system memory, then everything is working fine and the auto setting is just not suitable for your use case, in which case you should manually set it to some value that suits you. Otherwise, there is a bug in libtorrent (again, assuming all extra 2 GiB memory usage is cache).

@xavier2k6
Copy link
Member

xavier2k6 commented Mar 29, 2020

seems ok here....
official 4.2.2. -> disk cache (auto/default) (windows 10 x64/32gb RAM)

qBittorrent Memory Usage

3 large torrents downloading.....
qBittorrent Downloading

cache statistics

@p43b1 can you post a screenshot of task manager > performance -> memory.

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Mar 29, 2020

To really get to the bottom of this, and figure out if this is a problem with qBIttorrent or the system, it is necessary to use a profiler. I don't know how it would be on Windows, but it has to be something similar to the (callgrind+kcachegrind, massif) combo on Linux.
@xavier2k6 If you know how to do so on Windows, tell @p43b1 how to do it.

@xavier2k6
Copy link
Member

xavier2k6 commented Mar 29, 2020

@FranciscoPombal I'll have to look into that kind of thing....I'm just wondering if "compressed memory" on/off makes a difference, I have it enabled....hence why I asked for task manager screenshot.......currently can't go fiddling/testing with settings/test machines.

EDIT: Also @p43b1 do you have "Enable OS cache" checked or unchecked in the advanced settings?

@FranciscoPombal
Copy link
Member

@xavier2k6
These were the results I found consistently when googling:
https://github.com/milostosic/MTuner
https://github.com/dynamorio/drmemory
https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap
https://hacksoflife.blogspot.com/2009/06/heap-debugging-memoryresource-leak-with.html

The Qt wiki also has a wiki page that names the first 2 among many others:
https://wiki.qt.io/Profiling_and_Memory_Checking_Tools

@xavier2k6
Copy link
Member

@FranciscoPombal I have debugdiag attached 24/7 with full page heaps enabled......yet mem seems ok?!

I know there's a memory leak alright in Qt which will be fixed in Qt 5.14.2

@telans
Copy link

telans commented Mar 30, 2020

I think I may be having the same issue. Running on Linux with qbittorrent-nox 4.2.2 (libtorrent 1.2.5). Around 60 torrents with 8 active.

Been running for ~4 hours with just over 2 GiB usage. I do have 512MiB disk cache set, but the total usage still seems excessive.

Is this an issue or expected behaviour?

UPDATE: Just ran into OOM, restarted qbittorrent-nox and it's at 100MiB usage

@xavier2k6
Copy link
Member

@FranciscoPombal did you get any further debug/info out of #11879?

@p43b1
Copy link
Author

p43b1 commented Mar 30, 2020

seems ok here....
official 4.2.2. -> disk cache (auto/default) (windows 10 x64/32gb RAM)

qBittorrent Memory Usage

3 large torrents downloading.....
qBittorrent Downloading

cache statistics

@p43b1 can you post a screenshot of task manager > performance -> memory.

4_2_2 Set
ram
4_2_2 STAT

All three taken at the very same moment

Edit:

drmem

@p43b1 p43b1 closed this as completed Mar 30, 2020
@p43b1 p43b1 reopened this Mar 30, 2020
@FranciscoPombal
Copy link
Member

FranciscoPombal commented Mar 30, 2020

@xavier2k6 no, since I had the problems with the alert patches mentioned near the end, I did not give it another go. Perhaps I should try again.

@p43b1 Can MTuner show symbol names? Without them it is difficult to see where exactly the most memory is being allocated. Perhaps you need to point it at qBittorrent's .pdb file? Also can it export data in a massif-compatible format (or any format at all)? If so, post the export here so that others can analyze.

EDIT: I see at least the stack trace in the bottom right seems to have symbol names, but the useful bits are on the top of the stack (which would be in the bottom of the list, not visible in the screenshot). Please export a snapshot of the data when you are experiencing the increased memory usage so that others can attempt to analyze.

If this leak/increased usage is also related to the crypto library functions, this can be closed as a duplicate of the other issue and we can regroup and refocus our efforts over there.

@FranciscoPombal
Copy link
Member

@telans Since you are on Linux, can you provide massif output from a run where you observe excessive memory usage? Read through #11879 if you don't know where to start.

@telans
Copy link

telans commented Mar 30, 2020

@telans Since you are on Linux, can you provide massif output from a run where you observe excessive memory usage? Read through #11879 if you don't know where to start.

Should I build with the suggested flags?

@xavier2k6
Copy link
Member

xavier2k6 commented Mar 30, 2020

@FranciscoPombal quick observation & thinking out loud..... @p43b1 has a set/custom disk cache 128MiB where as I have auto -> which follows libtorrents limits/algorithm (for amount of ram in the system)

I only presume that when a set/custom disk cache is used these limits are no longer adhered to......but is the set/custom disk cache figure restricted to just that amount & if it is....maybe the restrictor could be the issue/leaker.....

@FranciscoPombal
Copy link
Member

@telans

Should I build with the suggested flags?

You should compile and build normally (assuming you are on Ubuntu, here is the guide: https://github.com/qbittorrent/qBittorrent/wiki/Compiling-qBittorrent-on-Debian-and-Ubuntu) and then run at least massif (example in the folder where the qbittorrent executable is built):
valgrind --tool=massif --verbose --massif-out-file=massif_output.mass qbittorrent

This comment shows other examples for memcheck and callgrind as well: #11879 (comment). But for this case, massif is the most important.

@FranciscoPombal
Copy link
Member

@FranciscoPombal quick observation & thinking out loud..... @p43b1 has a set/custom disk cache 128MiB where as I have auto -> which follows libtorrents limits/algorithm (for amount of ram in the system)

I only presume that when a set/custom disk cache is used these limits are no longer adhered to......but is the set/custom disk cache figure restricted to just that amount & if it is....maybe the restrictor could be the issue/leaker.....

@p43b1 you can try auto, but I seriously doubt that choosing a specific value is causing a bug. As far as I know, that libtorrent code hasn't changed in a while. As an additional note, the amount of RAM used when auto is selected is chosen according to the following logic:
https://github.com/arvidn/libtorrent/blob/9ac4e6eed88c1ea1e6cdb6865889320164ad0b85/src/disk_buffer_pool.cpp#L298

@farnoy
Copy link

farnoy commented Mar 30, 2020

I managed to capture it, summary:

--------------------------------------------------------------------------------
Command:            qbittorrent
Massif arguments:   --massif-out-file=/tmp/massif_output.mass
ms_print arguments: massif_output.mass
--------------------------------------------------------------------------------


    GB
2.859^                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #
     |                 #                                        @@
     |             ::::#:::@@::::::::::::::::::::::::::::::@:@@:@ :::::::::@@:
     | @ :: ::::::::: :#: :@ :: :: : ::: : : :: :::: ::: : @:@ :@ : :: :: :@@:
   0 +----------------------------------------------------------------------->Gi
     0                                                                   823.0

Number of snapshots: 76
 Detailed snapshots: [1, 13 (peak), 16, 39, 41, 43, 57, 67]

Some details:

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 58 856,650,432,519      424,960,408      416,647,537     8,312,871            0
 59 858,239,338,260      392,988,768      384,705,079     8,283,689            0
 60 859,832,688,763      419,595,648      411,267,061     8,328,587            0
 61 861,424,245,926      407,544,312      399,262,252     8,282,060            0
 62 863,013,195,999      446,006,032      437,654,179     8,351,853            0
 63 864,624,826,466      375,025,576      366,748,075     8,277,501            0
 64 866,213,876,908      412,153,368      403,844,962     8,308,406            0
 65 867,802,873,810      375,863,728      367,613,940     8,249,788            0
 66 869,391,757,318      448,007,912      439,672,697     8,335,215            0
 67 870,996,467,026      419,839,816      411,512,548     8,327,268            0
98.02% (411,512,548B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->33.31% (139,868,696B) 0x4C756E9: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| ->33.24% (139,567,624B) 0x4D7FE79: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | ->33.24% (139,558,056B) 0x4D3DC4E: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | | ->33.11% (139,020,104B) 0x4D4BC14: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | | | ->33.11% (139,020,104B) 0x4D60B23: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | | |   ->32.38% (135,925,280B) 0x4C5F58C: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | | |   | ->32.38% (135,925,280B) 0x4D8F675: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | | |   |   ->32.38% (135,925,280B) 0x65FCB23: execute_native_thread_routine (thread.cc:80)
| | | |   |     ->32.38% (135,925,280B) 0x4FF846E: start_thread (in /usr/lib/libpthread-2.31.so)
| | | |   |       ->32.38% (135,925,280B) 0x69773D2: clone (in /usr/lib/libc-2.31.so)
| | | |   |
| | | |   ->00.74% (3,094,824B) in 1+ places, all below ms_print's threshold (01.00%)
| | | |
| | | ->00.13% (537,952B) in 1+ places, all below ms_print's threshold (01.00%)
| | |
| | ->00.00% (9,568B) in 1+ places, all below ms_print's threshold (01.00%)
| |
| ->00.07% (301,072B) in 1+ places, all below ms_print's threshold (01.00%)
|
->13.73% (57,646,962B) 0x4E93921: libtorrent::torrent_info::parse_info_section(libtorrent::bdecode_node const&, boost::system::error_code&, int) (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| ->13.73% (57,646,962B) 0x4E96C11: libtorrent::torrent_info::parse_torrent_file(libtorrent::bdecode_node const&, boost::system::error_code&, int) (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
|   ->13.73% (57,646,962B) 0x4E9AEC3: libtorrent::torrent_info::torrent_info(libtorrent::bdecode_node const&, boost::system::error_code&) (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
|     ->13.73% (57,646,962B) 0x27803C: BitTorrent::TorrentInfo::load(QByteArray const&, QString*) (in /usr/bin/qbittorrent)
|       ->13.73% (57,646,962B) 0x27AA9F: BitTorrent::TorrentInfo::loadFromFile(QString const&, QString*) (in /usr/bin/qbittorrent)
|         ->13.68% (57,423,929B) 0x258EF8: ??? (in /usr/bin/qbittorrent)
|         | ->13.68% (57,423,929B) 0x259378: BitTorrent::Session::startUpTorrents() (in /usr/bin/qbittorrent)
|         |   ->13.68% (57,423,929B) 0x223CA9: Application::exec(QStringList const&) (in /usr/bin/qbittorrent)
|         |     ->13.68% (57,423,929B) 0x21B1C7: main (in /usr/bin/qbittorrent)
|         |
|         ->00.05% (223,033B) in 1+ places, all below ms_print's threshold (01.00%)
|

Looks like thread creation might be leaking things? I killed it after reaching almost 3Gi RSS, while downloading a big torrent.

I'm not sure how to read it, but it seems to point the finger at spawning threads? But I strace-d it and it doesn't seem to clone any while downloading intensively 🤷‍♂️

@FranciscoPombal
Copy link
Member

@farnoy do you mind uploading the full output file, in case you saved it? You can simply attach it to your post.

@FranciscoPombal
Copy link
Member

Also, if possible, compile and use libtorrent with debug symbols so that we can see the stacktrace for the libtorrent portion.

98.02% (411,512,548B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->33.31% (139,868,696B) 0x4C756E9: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| ->33.24% (139,567,624B) 0x4D7FE79: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | ->33.24% (139,558,056B) 0x4D3DC4E: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | | ->33.11% (139,020,104B) 0x4D4BC14: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | | | ->33.11% (139,020,104B) 0x4D60B23: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | | |   ->32.38% (135,925,280B) 0x4C5F58C: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)
| | | |   | ->32.38% (135,925,280B) 0x4D8F675: ??? (in /usr/lib/libtorrent-rasterbar.so.10.0.0)

@farnoy
Copy link

farnoy commented Mar 30, 2020

I will recompile libtorrent with debugging, for now, this is the whole file.
massif_output.zip

@farnoy
Copy link

farnoy commented Mar 30, 2020

Ok, I'm building with autotools and a simple configure --enable-debug ... produces a build that:

  1. is too slow to allocate anything substantial while downloading
  2. crashes when closing qBittorrent with:
version: 1.2.5.0-9469913cb

file: '../../libtorrent-rasterbar-1.2.5/src/torrent.cpp'
line: 7875
function: check_invariant
expression: want_peers_finished() == m_links[aux::session_interface::torrent_want_peers_finished].in_list()

I'll try to compile a version with debug symbols, but with full optimizations and no assertions.

@p43b1
Copy link
Author

p43b1 commented Mar 30, 2020

Ok

  1. Disk cache set to auto

qbit

  1. Two screenshots from MTTuner (I think it doesn't record "live" but it makes just a snapshot)

ram2

ram1

@farnoy
Copy link

farnoy commented Mar 30, 2020

@FranciscoPombal Here's one with debug symbols massif_output.zip

I'm not sure this is correct, I killed it around 700Mi of RSS, but massif's summary is showing 255Mi peak memory used?

@mozo78
Copy link

mozo78 commented Mar 30, 2020

No problems on Linux with 2648 runnung tasks:
https://i.imgur.com/S5b5G9g.png

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Mar 30, 2020

@farnoy thanks. If you could generate another one with an even bigger peak and a larger leak, that would be even better.

@arvidn can you take a look at this please? Even of that smaller one, is it normal for the receive buffer to be so big? And also parse_info_section?

@FranciscoPombal
Copy link
Member

@p43b1 can you please compile with debug symbols/configure MTTuner to use debug symbols, and post the exported data so that others can analyze freely in more detail? I realize this is not the easiest thing to do on Windows, it's fine if you don't do it.

But just as an example, with @farnoy's output posted above, I can open it and look at it in detail in massif-visualizer:

screenshot

@arvidn
Copy link
Contributor

arvidn commented Aug 16, 2020

It sounds like some people define "memory leak" as any meory allocated and not freed. I don't think that's a reasonable definition. A singleton that's allocated exactly once and then never freed is not a leak. It's freed by the operating system on process shutdown.

This does not smell like a leak to me. Has anyone seen multiple instances leak? or even better, leaking over time, where longer wait means more allocated objects.

@xavier2k6
Copy link
Member

9 more instances over a 12 hour period.

9 leaks

click to view stack trace
ntdll.dll!RtlAllocateHeap 00007ff8079a6c80
qbittorrent.exe!_malloc_base Line 34 + 0xc bytes 00007ff6461f2306
qbittorrent.exe!rand_drbg_new Line 191 00007ff6454911b5
qbittorrent.exe!RAND_DRBG_get0_private Line 1144 00007ff645492762
qbittorrent.exe!RAND_priv_bytes Line 927 00007ff645479593
qbittorrent.exe!ecx_key_op Line 86 + 0x29 bytes 00007ff64548203a
qbittorrent.exe!pkey_ecx_keygen Line 654 + 0x21 bytes 00007ff64548366e
qbittorrent.exe!ssl_generate_pkey_group Line 4732 + 0x50 bytes 00007ff64617c456
qbittorrent.exe!add_key_share Line 602 + 0x3 bytes 00007ff64619ce91
qbittorrent.exe!tls_construct_ctos_key_share Line 688 + 0xa bytes 00007ff64619d389
qbittorrent.exe!tls_construct_extensions Line 853 + 0x1b bytes 00007ff64617e419
qbittorrent.exe!tls_construct_client_hello Line 1287 + 0x18 bytes 00007ff64618cd6e
qbittorrent.exe!write_state_machine Line 843 + 0x10 bytes 00007ff6461533a6
qbittorrent.exe!state_machine Line 443 + 0x3 bytes 00007ff646152857
qbittorrent.exe!SSL_do_handshake Line 3661 + 0x3 bytes 00007ff646144196
qbittorrent.exe!boost::asio::ssl::detail::engine::perform Line 235 + 0x9 bytes 00007ff645600547
qbittorrent.exe!boost::asio::ssl::detail::io_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor>,boost::asio::ssl::detail::handshake_op,std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::as Line 145 + 0x2b bytes 00007ff64562a2c9
qbittorrent.exe!boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::async_handshake<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::ex Line 444 + 0xa1 bytes 00007ff64561f59e
qbittorrent.exe!libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::connected Line 306 + 0x39 bytes 00007ff645649cbb
qbittorrent.exe!boost::asio::asio_handler_invoke<boost::asio::detail::binder1<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared Line 69 + 0x3a bytes 00007ff645656e56
qbittorrent.exe!boost::asio::detail::win_iocp_socket_connect_op<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared_ptr<std::func Line 114 + 0xd bytes 00007ff64564fd6e
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::do_one Line 460 + 0xe bytes 00007ff645595da5
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::run Line 203 + 0x27 bytes 00007ff645595945
qbittorrent.exe!std::thread::_Invoke<std::tuple<<lambda_f47be1f771a9090cdae387aa12b4d0a6> >,0> Line 43 + 0x29 bytes 00007ff645597a5b
qbittorrent.exe!thread_start<unsigned int (__cdecl*)(void *),1> Line 97 + 0x7 bytes 00007ff6461e6bda
kernel32.dll!BaseThreadInitThunk + 0xe bytes 00007ff8078a6fce
ntdll.dll!RtlUserThreadStart + 0x1b bytes 00007ff8079dcebb
click to view stack trace
ntdll.dll!RtlAllocateHeap 00007ff8079a6c80
qbittorrent.exe!_malloc_base Line 34 + 0xc bytes 00007ff6461f2306
qbittorrent.exe!EVP_CipherInit_ex Line 128 + 0xd bytes 00007ff64546c9fd
qbittorrent.exe!drbg_ctr_init Line 413 + 0x21 bytes 00007ff6454d6b42
qbittorrent.exe!RAND_DRBG_set Line 137 + 0x3 bytes 00007ff645491100
qbittorrent.exe!rand_drbg_new Line 225 + 0x31 bytes 00007ff645491242
qbittorrent.exe!RAND_DRBG_get0_private Line 1144 00007ff645492762
qbittorrent.exe!RAND_priv_bytes Line 927 00007ff645479593
qbittorrent.exe!ecx_key_op Line 86 + 0x29 bytes 00007ff64548203a
qbittorrent.exe!pkey_ecx_keygen Line 654 + 0x21 bytes 00007ff64548366e
qbittorrent.exe!ssl_generate_pkey_group Line 4732 + 0x50 bytes 00007ff64617c456
qbittorrent.exe!add_key_share Line 602 + 0x3 bytes 00007ff64619ce91
qbittorrent.exe!tls_construct_ctos_key_share Line 688 + 0xa bytes 00007ff64619d389
qbittorrent.exe!tls_construct_extensions Line 853 + 0x1b bytes 00007ff64617e419
qbittorrent.exe!tls_construct_client_hello Line 1287 + 0x18 bytes 00007ff64618cd6e
qbittorrent.exe!write_state_machine Line 843 + 0x10 bytes 00007ff6461533a6
qbittorrent.exe!state_machine Line 443 + 0x3 bytes 00007ff646152857
qbittorrent.exe!SSL_do_handshake Line 3661 + 0x3 bytes 00007ff646144196
qbittorrent.exe!boost::asio::ssl::detail::engine::perform Line 235 + 0x9 bytes 00007ff645600547
qbittorrent.exe!boost::asio::ssl::detail::io_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor>,boost::asio::ssl::detail::handshake_op,std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::as Line 145 + 0x2b bytes 00007ff64562a2c9
qbittorrent.exe!boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::async_handshake<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::ex Line 444 + 0xa1 bytes 00007ff64561f59e
qbittorrent.exe!libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::connected Line 306 + 0x39 bytes 00007ff645649cbb
qbittorrent.exe!boost::asio::asio_handler_invoke<boost::asio::detail::binder1<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared Line 69 + 0x3a bytes 00007ff645656e56
qbittorrent.exe!boost::asio::detail::win_iocp_socket_connect_op<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared_ptr<std::func Line 114 + 0xd bytes 00007ff64564fd6e
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::do_one Line 460 + 0xe bytes 00007ff645595da5
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::run Line 203 + 0x27 bytes 00007ff645595945
qbittorrent.exe!std::thread::_Invoke<std::tuple<<lambda_f47be1f771a9090cdae387aa12b4d0a6> >,0> Line 43 + 0x29 bytes 00007ff645597a5b
qbittorrent.exe!thread_start<unsigned int (__cdecl*)(void *),1> Line 97 + 0x7 bytes 00007ff6461e6bda
kernel32.dll!BaseThreadInitThunk + 0xe bytes 00007ff8078a6fce
ntdll.dll!RtlUserThreadStart + 0x1b bytes 00007ff8079dcebb
click to view stack trace
ntdll.dll!RtlAllocateHeap 00007ff8079a6c80
qbittorrent.exe!_malloc_base Line 34 + 0xc bytes 00007ff6461f2306
qbittorrent.exe!EVP_CipherInit_ex Line 128 + 0xd bytes 00007ff64546c9fd
qbittorrent.exe!ctr_update Line 271 + 0x27 bytes 00007ff6454d6697
qbittorrent.exe!drbg_ctr_generate Line 346 + 0x1b bytes 00007ff6454d695b
qbittorrent.exe!RAND_DRBG_generate Line 641 + 0x18 bytes 00007ff645491e2f
qbittorrent.exe!RAND_DRBG_bytes Line 682 + 0x1d bytes 00007ff645491f71
qbittorrent.exe!libtorrent::dht::generate_random_id Line 157 + 0xd bytes 00007ff6456f49d1
qbittorrent.exe!libtorrent::dht::node::send_single_refresh Line 684 + 0x96 bytes 00007ff6456dd116
qbittorrent.exe!libtorrent::dht::dht_tracker::refresh_timeout Line 259 + 0x13b bytes 00007ff6456b4c90
qbittorrent.exe!boost::asio::detail::wait_handler<std::_Binder<std::_Unforced,void (__cdecl libtorrent::http_connection::*)(boost::system::error_code const &),std::shared_ptr<libtorrent::http_connection>,std::_Ph<1> const &>,boost::asio::detail::io_object_executor<boost: Line 73 + 0x6 bytes 00007ff645687c8c
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::do_one Line 460 + 0xe bytes 00007ff645595da5
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::run Line 203 + 0x27 bytes 00007ff645595945
qbittorrent.exe!std::thread::_Invoke<std::tuple<<lambda_f47be1f771a9090cdae387aa12b4d0a6> >,0> Line 43 + 0x29 bytes 00007ff645597a5b
qbittorrent.exe!thread_start<unsigned int (__cdecl*)(void *),1> Line 97 + 0x7 bytes 00007ff6461e6bda
kernel32.dll!BaseThreadInitThunk + 0xe bytes 00007ff8078a6fce
ntdll.dll!RtlUserThreadStart + 0x1b bytes 00007ff8079dcebb
click to view stack trace
ntdll.dll!RtlAllocateHeap 00007ff8079a6c80
qbittorrent.exe!_malloc_base Line 34 + 0xc bytes 00007ff6461f2306
qbittorrent.exe!EVP_CipherInit_ex Line 128 + 0xd bytes 00007ff64546c9fd
qbittorrent.exe!ctr_update Line 271 + 0x27 bytes 00007ff6454d6697
qbittorrent.exe!drbg_ctr_generate Line 346 + 0x1b bytes 00007ff6454d695b
qbittorrent.exe!RAND_DRBG_generate Line 641 + 0x18 bytes 00007ff645491e2f
qbittorrent.exe!RAND_DRBG_bytes Line 682 + 0x1d bytes 00007ff645491f71
qbittorrent.exe!ecx_key_op Line 86 + 0x29 bytes 00007ff64548203a
qbittorrent.exe!pkey_ecx_keygen Line 654 + 0x21 bytes 00007ff64548366e
qbittorrent.exe!ssl_generate_pkey_group Line 4732 + 0x50 bytes 00007ff64617c456
qbittorrent.exe!add_key_share Line 602 + 0x3 bytes 00007ff64619ce91
qbittorrent.exe!tls_construct_ctos_key_share Line 688 + 0xa bytes 00007ff64619d389
qbittorrent.exe!tls_construct_extensions Line 853 + 0x1b bytes 00007ff64617e419
qbittorrent.exe!tls_construct_client_hello Line 1287 + 0x18 bytes 00007ff64618cd6e
qbittorrent.exe!write_state_machine Line 843 + 0x10 bytes 00007ff6461533a6
qbittorrent.exe!state_machine Line 443 + 0x3 bytes 00007ff646152857
qbittorrent.exe!SSL_do_handshake Line 3661 + 0x3 bytes 00007ff646144196
qbittorrent.exe!boost::asio::ssl::detail::engine::perform Line 235 + 0x9 bytes 00007ff645600547
qbittorrent.exe!boost::asio::ssl::detail::io_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor>,boost::asio::ssl::detail::handshake_op,std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::as Line 145 + 0x2b bytes 00007ff64562a2c9
qbittorrent.exe!boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::async_handshake<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::ex Line 444 + 0xa1 bytes 00007ff64561f59e
qbittorrent.exe!libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::connected Line 306 + 0x39 bytes 00007ff645649cbb
qbittorrent.exe!boost::asio::asio_handler_invoke<boost::asio::detail::binder1<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared Line 69 + 0x3a bytes 00007ff645656e56
qbittorrent.exe!boost::asio::detail::win_iocp_socket_connect_op<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared_ptr<std::func Line 114 + 0xd bytes 00007ff64564fd6e
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::do_one Line 460 + 0xe bytes 00007ff645595da5
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::run Line 203 + 0x27 bytes 00007ff645595945
qbittorrent.exe!std::thread::_Invoke<std::tuple<<lambda_f47be1f771a9090cdae387aa12b4d0a6> >,0> Line 43 + 0x29 bytes 00007ff645597a5b
qbittorrent.exe!thread_start<unsigned int (__cdecl*)(void *),1> Line 97 + 0x7 bytes 00007ff6461e6bda
kernel32.dll!BaseThreadInitThunk + 0xe bytes 00007ff8078a6fce
ntdll.dll!RtlUserThreadStart + 0x1b bytes 00007ff8079dcebb
click to view stack trace
ntdll.dll!RtlAllocateHeap 00007ff8079a6c80
qbittorrent.exe!_malloc_base Line 34 + 0xc bytes 00007ff6461f2306
qbittorrent.exe!rand_pool_new Line 457 + 0xe bytes 00007ff645478ea5
qbittorrent.exe!RAND_DRBG_bytes Line 670 + 0xb bytes 00007ff645491edc
qbittorrent.exe!ecx_key_op Line 86 + 0x29 bytes 00007ff64548203a
qbittorrent.exe!pkey_ecx_keygen Line 654 + 0x21 bytes 00007ff64548366e
qbittorrent.exe!ssl_generate_pkey_group Line 4732 + 0x50 bytes 00007ff64617c456
qbittorrent.exe!add_key_share Line 602 + 0x3 bytes 00007ff64619ce91
qbittorrent.exe!tls_construct_ctos_key_share Line 688 + 0xa bytes 00007ff64619d389
qbittorrent.exe!tls_construct_extensions Line 853 + 0x1b bytes 00007ff64617e419
qbittorrent.exe!tls_construct_client_hello Line 1287 + 0x18 bytes 00007ff64618cd6e
qbittorrent.exe!write_state_machine Line 843 + 0x10 bytes 00007ff6461533a6
qbittorrent.exe!state_machine Line 443 + 0x3 bytes 00007ff646152857
qbittorrent.exe!SSL_do_handshake Line 3661 + 0x3 bytes 00007ff646144196
qbittorrent.exe!boost::asio::ssl::detail::engine::perform Line 235 + 0x9 bytes 00007ff645600547
qbittorrent.exe!boost::asio::ssl::detail::io_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor>,boost::asio::ssl::detail::handshake_op,std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::as Line 145 + 0x2b bytes 00007ff64562a2c9
qbittorrent.exe!boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::async_handshake<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::ex Line 444 + 0xa1 bytes 00007ff64561f59e
qbittorrent.exe!libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::connected Line 306 + 0x39 bytes 00007ff645649cbb
qbittorrent.exe!boost::asio::asio_handler_invoke<boost::asio::detail::binder1<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared Line 69 + 0x3a bytes 00007ff645656e56
qbittorrent.exe!boost::asio::detail::win_iocp_socket_connect_op<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared_ptr<std::func Line 114 + 0xd bytes 00007ff64564fd6e
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::do_one Line 460 + 0xe bytes 00007ff645595da5
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::run Line 203 + 0x27 bytes 00007ff645595945
qbittorrent.exe!std::thread::_Invoke<std::tuple<<lambda_f47be1f771a9090cdae387aa12b4d0a6> >,0> Line 43 + 0x29 bytes 00007ff645597a5b
qbittorrent.exe!thread_start<unsigned int (__cdecl*)(void *),1> Line 97 + 0x7 bytes 00007ff6461e6bda
kernel32.dll!BaseThreadInitThunk + 0xe bytes 00007ff8078a6fce
ntdll.dll!RtlUserThreadStart + 0x1b bytes 00007ff8079dcebb
click to view stack trace
ntdll.dll!RtlAllocateHeap 00007ff8079a6c80
qbittorrent.exe!_malloc_base Line 34 + 0xc bytes 00007ff6461f2306
qbittorrent.exe!EVP_CIPHER_CTX_new Line 42 + 0xf bytes 00007ff64546c85e
qbittorrent.exe!drbg_ctr_init Line 409 00007ff6454d6b10
qbittorrent.exe!RAND_DRBG_set Line 137 + 0x3 bytes 00007ff645491100
qbittorrent.exe!rand_drbg_new Line 225 + 0x31 bytes 00007ff645491242
qbittorrent.exe!RAND_DRBG_get0_private Line 1144 00007ff645492762
qbittorrent.exe!RAND_priv_bytes Line 927 00007ff645479593
qbittorrent.exe!ecx_key_op Line 86 + 0x29 bytes 00007ff64548203a
qbittorrent.exe!pkey_ecx_keygen Line 654 + 0x21 bytes 00007ff64548366e
qbittorrent.exe!ssl_generate_pkey_group Line 4732 + 0x50 bytes 00007ff64617c456
qbittorrent.exe!add_key_share Line 602 + 0x3 bytes 00007ff64619ce91
qbittorrent.exe!tls_construct_ctos_key_share Line 688 + 0xa bytes 00007ff64619d389
qbittorrent.exe!tls_construct_extensions Line 853 + 0x1b bytes 00007ff64617e419
qbittorrent.exe!tls_construct_client_hello Line 1287 + 0x18 bytes 00007ff64618cd6e
qbittorrent.exe!write_state_machine Line 843 + 0x10 bytes 00007ff6461533a6
qbittorrent.exe!state_machine Line 443 + 0x3 bytes 00007ff646152857
qbittorrent.exe!SSL_do_handshake Line 3661 + 0x3 bytes 00007ff646144196
qbittorrent.exe!boost::asio::ssl::detail::engine::perform Line 235 + 0x9 bytes 00007ff645600547
qbittorrent.exe!boost::asio::ssl::detail::io_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor>,boost::asio::ssl::detail::handshake_op,std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::as Line 145 + 0x2b bytes 00007ff64562a2c9
qbittorrent.exe!boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::async_handshake<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::ex Line 444 + 0xa1 bytes 00007ff64561f59e
qbittorrent.exe!libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::connected Line 306 + 0x39 bytes 00007ff645649cbb
qbittorrent.exe!boost::asio::asio_handler_invoke<boost::asio::detail::binder1<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared Line 69 + 0x3a bytes 00007ff645656e56
qbittorrent.exe!boost::asio::detail::win_iocp_socket_connect_op<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared_ptr<std::func Line 114 + 0xd bytes 00007ff64564fd6e
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::do_one Line 460 + 0xe bytes 00007ff645595da5
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::run Line 203 + 0x27 bytes 00007ff645595945
qbittorrent.exe!std::thread::_Invoke<std::tuple<<lambda_f47be1f771a9090cdae387aa12b4d0a6> >,0> Line 43 + 0x29 bytes 00007ff645597a5b
qbittorrent.exe!thread_start<unsigned int (__cdecl*)(void *),1> Line 97 + 0x7 bytes 00007ff6461e6bda
kernel32.dll!BaseThreadInitThunk + 0xe bytes 00007ff8078a6fce
ntdll.dll!RtlUserThreadStart + 0x1b bytes 00007ff8079dcebb
click to view stack trace
ntdll.dll!RtlAllocateHeap 00007ff8079a6c80
qbittorrent.exe!_malloc_base Line 34 + 0xc bytes 00007ff6461f2306
qbittorrent.exe!ERR_get_state Line 734 + 0xb bytes 00007ff64546b2ec
qbittorrent.exe!ERR_clear_error Line 445 00007ff64546a7df
qbittorrent.exe!boost::asio::ssl::detail::engine::perform Line 234 00007ff645600539
qbittorrent.exe!boost::asio::ssl::detail::io_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor>,boost::asio::ssl::detail::handshake_op,std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::as Line 145 + 0x2b bytes 00007ff64562a2c9
qbittorrent.exe!boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::async_handshake<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::ex Line 444 + 0xa1 bytes 00007ff64561f59e
qbittorrent.exe!libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::connected Line 306 + 0x39 bytes 00007ff645649cbb
qbittorrent.exe!boost::asio::asio_handler_invoke<boost::asio::detail::binder1<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared Line 69 + 0x3a bytes 00007ff645656e56
qbittorrent.exe!boost::asio::detail::win_iocp_socket_connect_op<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared_ptr<std::func Line 114 + 0xd bytes 00007ff64564fd6e
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::do_one Line 460 + 0xe bytes 00007ff645595da5
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::run Line 203 + 0x27 bytes 00007ff645595945
qbittorrent.exe!std::thread::_Invoke<std::tuple<<lambda_f47be1f771a9090cdae387aa12b4d0a6> >,0> Line 43 + 0x29 bytes 00007ff645597a5b
qbittorrent.exe!thread_start<unsigned int (__cdecl*)(void *),1> Line 97 + 0x7 bytes 00007ff6461e6bda
kernel32.dll!BaseThreadInitThunk + 0xe bytes 00007ff8078a6fce
ntdll.dll!RtlUserThreadStart + 0x1b bytes 00007ff8079dcebb
click to view stack trace
ntdll.dll!RtlAllocateHeap 00007ff8079a6c80
qbittorrent.exe!_malloc_base Line 34 + 0xc bytes 00007ff6461f2306
qbittorrent.exe!drbg_ctr_init Line 393 + 0xb bytes 00007ff6454d6ab7
qbittorrent.exe!RAND_DRBG_set Line 137 + 0x3 bytes 00007ff645491100
qbittorrent.exe!rand_drbg_new Line 225 + 0x31 bytes 00007ff645491242
qbittorrent.exe!RAND_DRBG_get0_private Line 1144 00007ff645492762
qbittorrent.exe!RAND_priv_bytes Line 927 00007ff645479593
qbittorrent.exe!ecx_key_op Line 86 + 0x29 bytes 00007ff64548203a
qbittorrent.exe!pkey_ecx_keygen Line 654 + 0x21 bytes 00007ff64548366e
qbittorrent.exe!ssl_generate_pkey_group Line 4732 + 0x50 bytes 00007ff64617c456
qbittorrent.exe!add_key_share Line 602 + 0x3 bytes 00007ff64619ce91
qbittorrent.exe!tls_construct_ctos_key_share Line 688 + 0xa bytes 00007ff64619d389
qbittorrent.exe!tls_construct_extensions Line 853 + 0x1b bytes 00007ff64617e419
qbittorrent.exe!tls_construct_client_hello Line 1287 + 0x18 bytes 00007ff64618cd6e
qbittorrent.exe!write_state_machine Line 843 + 0x10 bytes 00007ff6461533a6
qbittorrent.exe!state_machine Line 443 + 0x3 bytes 00007ff646152857
qbittorrent.exe!SSL_do_handshake Line 3661 + 0x3 bytes 00007ff646144196
qbittorrent.exe!boost::asio::ssl::detail::engine::perform Line 235 + 0x9 bytes 00007ff645600547
qbittorrent.exe!boost::asio::ssl::detail::io_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor>,boost::asio::ssl::detail::handshake_op,std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::as Line 145 + 0x2b bytes 00007ff64562a2c9
qbittorrent.exe!boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::async_handshake<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::ex Line 444 + 0xa1 bytes 00007ff64561f59e
qbittorrent.exe!libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::connected Line 306 + 0x39 bytes 00007ff645649cbb
qbittorrent.exe!boost::asio::asio_handler_invoke<boost::asio::detail::binder1<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared Line 69 + 0x3a bytes 00007ff645656e56
qbittorrent.exe!boost::asio::detail::win_iocp_socket_connect_op<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared_ptr<std::func Line 114 + 0xd bytes 00007ff64564fd6e
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::do_one Line 460 + 0xe bytes 00007ff645595da5
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::run Line 203 + 0x27 bytes 00007ff645595945
qbittorrent.exe!std::thread::_Invoke<std::tuple<<lambda_f47be1f771a9090cdae387aa12b4d0a6> >,0> Line 43 + 0x29 bytes 00007ff645597a5b
qbittorrent.exe!thread_start<unsigned int (__cdecl*)(void *),1> Line 97 + 0x7 bytes 00007ff6461e6bda
kernel32.dll!BaseThreadInitThunk + 0xe bytes 00007ff8078a6fce
ntdll.dll!RtlUserThreadStart + 0x1b bytes 00007ff8079dcebb
click to view stack trace
ntdll.dll!RtlAllocateHeap 00007ff8079a6c80
qbittorrent.exe!_malloc_base Line 34 + 0xc bytes 00007ff6461f2306
qbittorrent.exe!rand_pool_new Line 437 00007ff645478e38
qbittorrent.exe!RAND_DRBG_bytes Line 670 + 0xb bytes 00007ff645491edc
qbittorrent.exe!ecx_key_op Line 86 + 0x29 bytes 00007ff64548203a
qbittorrent.exe!pkey_ecx_keygen Line 654 + 0x21 bytes 00007ff64548366e
qbittorrent.exe!ssl_generate_pkey_group Line 4732 + 0x50 bytes 00007ff64617c456
qbittorrent.exe!add_key_share Line 602 + 0x3 bytes 00007ff64619ce91
qbittorrent.exe!tls_construct_ctos_key_share Line 688 + 0xa bytes 00007ff64619d389
qbittorrent.exe!tls_construct_extensions Line 853 + 0x1b bytes 00007ff64617e419
qbittorrent.exe!tls_construct_client_hello Line 1287 + 0x18 bytes 00007ff64618cd6e
qbittorrent.exe!write_state_machine Line 843 + 0x10 bytes 00007ff6461533a6
qbittorrent.exe!state_machine Line 443 + 0x3 bytes 00007ff646152857
qbittorrent.exe!SSL_do_handshake Line 3661 + 0x3 bytes 00007ff646144196
qbittorrent.exe!boost::asio::ssl::detail::engine::perform Line 235 + 0x9 bytes 00007ff645600547
qbittorrent.exe!boost::asio::ssl::detail::io_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor>,boost::asio::ssl::detail::handshake_op,std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::as Line 145 + 0x2b bytes 00007ff64562a2c9
qbittorrent.exe!boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::async_handshake<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::ex Line 444 + 0xa1 bytes 00007ff64561f59e
qbittorrent.exe!libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::connected Line 306 + 0x39 bytes 00007ff645649cbb
qbittorrent.exe!boost::asio::asio_handler_invoke<boost::asio::detail::binder1<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared Line 69 + 0x3a bytes 00007ff645656e56
qbittorrent.exe!boost::asio::detail::win_iocp_socket_connect_op<std::_Binder<std::_Unforced,void (__cdecl libtorrent::ssl_stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::executor> >::*)(boost::system::error_code const &,std::shared_ptr<std::func Line 114 + 0xd bytes 00007ff64564fd6e
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::do_one Line 460 + 0xe bytes 00007ff645595da5
qbittorrent.exe!boost::asio::detail::win_iocp_io_context::run Line 203 + 0x27 bytes 00007ff645595945
qbittorrent.exe!std::thread::_Invoke<std::tuple<<lambda_f47be1f771a9090cdae387aa12b4d0a6> >,0> Line 43 + 0x29 bytes 00007ff645597a5b
qbittorrent.exe!thread_start<unsigned int (__cdecl*)(void *),1> Line 97 + 0x7 bytes 00007ff6461e6bda
kernel32.dll!BaseThreadInitThunk + 0xe bytes 00007ff8078a6fce
ntdll.dll!RtlUserThreadStart + 0x1b bytes 00007ff8079dcebb

@FranciscoPombal
Copy link
Member

@xavier2k6 Thanks for this. Seems there are important symbols missing from the stacktraces. For example, what are the libtorrent functions that the leaks originate from? I can only see this information in one of the stacktraces (3rd one from the top in your latest comment), where it seems to be related to the DHT. In all the other ones, how can you tell the issue comes from tracker connections?

@AndCycle
Copy link

just put it under test on my linux which works fine, memory usage is stable for 4 days, so far so good.

And memory leak is reproducible without that patch?

tooks me 4 days to verify that the leak do happened without patch on my setup,
when I wanna switch on the patch for another round, libtorrent 1.2.8 released.
so I took the 1.2.8 for another shot, which have no sign of significant memory usage for a week by far.

@ghost
Copy link

ghost commented Aug 17, 2020

just put it under test on my linux which works fine, memory usage is stable for 4 days, so far so good.

And memory leak is reproducible without that patch?

tooks me 4 days to verify that the leak do happened without patch on my setup,
when I wanna switch on the patch for another round, libtorrent 1.2.8 released.
so I took the 1.2.8 for another shot, which have no sign of significant memory usage for a week by far.

This was also confirmed by another user in a related ticket #12825 (comment)

@mayli
Copy link
Contributor

mayli commented Aug 18, 2020

Is there a theoretical estimation of how much memory qbittorrent should use under default settings? My current setup is using 2487M (Total buffer size: 511.0 MiB) for seeding 3565 torrents. Averaging 500kB for each torrent, does that consider as high memory usage?

@ghost
Copy link

ghost commented Aug 18, 2020

@FranciscoPombal
I think at this point we should wait for the next update before moving on with this.
There’s a good chance that the issue has already been resolved due to updated libraries(boost, libtorrent).

@FranciscoPombal
Copy link
Member

Is there a theoretical estimation of how much memory qbittorrent should use under default settings? My current setup is using 2487M (Total buffer size: 511.0 MiB) for seeding 3565 torrents. Averaging 500kB for each torrent, does that consider as high memory usage?

Can't say for certain if this is a good/bad value per-torrent (at least it does not look unreasonable). If the total usage is stable and not blowing up like the reports of previous posts, then at least you're not affected by this leak.

@mayli
Copy link
Contributor

mayli commented Aug 21, 2020

libtorrent 1.2.9 is released, did anyone reproduce this issue with the new version?

@brauliobo
Copy link

@mayli same here, using 2.5gb of memory with Archlinux packages. BTW, still 1.2.8 for https://www.archlinux.org/packages/extra/x86_64/libtorrent-rasterbar/

@guillaumedsde
Copy link

libtorrent 1.2.9 is released, did anyone reproduce this issue with the new version?

I have not managed to reproduce the issue with recent versions of the dependencies (i.e: the memory leak seems to be solved).
I am using this static binary compiled using this script with qbttorrent 4.2.5 and the following dependencies:

Screenshot from 2020-08-29 18-00-08

After about 2 hours of use, the memory cache (2048MB in my case) has filled up as expected while seeding around 600 torrents (capped at 600KB/s upload) and downloading 255 torrents (capped at 500KB/s download). Once the cache finishes filling up, it looks like memory usage is relatively stable:

Screenshot from 2020-08-29 17-59-35

I will report back here if I notice a leak after a couple of days of use.

@FranciscoPombal
Copy link
Member

@joy4eg
@farnoy

Mind testing with the latest commits of qBittorrent/libtorrent and possibly the latest releases of other dependencies as well? Ideally I think we would all like to get to the bottom of this, but if it go fixed somehow (e.g. possibly even due to some fix in boost or OpenSSL), we can close this and move on.

@FranciscoPombal
Copy link
Member

tooks me 4 days to verify that the leak do happened without patch on my setup,
when I wanna switch on the patch for another round, libtorrent 1.2.8 released.
so I took the 1.2.8 for another shot, which have no sign of significant memory usage for a week by far.

This was also confirmed by another user in a related ticket #12825 (comment)

For anyone curious, this was the patch in question: arvidn/libtorrent#4934. This might have been it, after all.

@eli-schwartz
Copy link
Contributor

@mayli same here, using 2.5gb of memory with Archlinux packages. BTW, still 1.2.8 for https://www.archlinux.org/packages/extra/x86_64/libtorrent-rasterbar/

1.2.9 is in testing, but results in https://bugs.archlinux.org/task/67754

@FranciscoPombal
Copy link
Member

@eli-schwartz

The python bindings have a problem of their own, but otherwise the C++11/C++14 thing is only a problem when all of the following are true:

  • You build libtorrent with C++11
  • You build the client (e.g. qBittorrent) with > C++11
  • (if building libtorrent with CMake) you don't pass -DCMAKE_CXX_STANDARD=11 when building libtorrent.
  • Your client does not manually define TORRENT_CXX11_ABI in its compiler command line.

See https://github.com/arvidn/libtorrent/pull/5010/files for an explanation of the latter 2 points.

Keep in mind that while all of these points being true will result in the symbol look up error, doing the exact opposite for some or all of them will also lead to problems. For example, if you build libtorrent with C++14, your client should not define TORRENT_CXX11_ABI when building.

The easiest "winning combos" are:

  • Just make sure both the client and libtorrent are built with C++14 or higher

or, if building libtorrent with C++11:

  • When building libtorrent with CMake, make sure to pass -DCMAKE_CXX_STANDARD=11. This will cause TORRENT_CXX11_ABI to be defined both for libtorrent's build as well as a usage requirement that will automatically be propagated upstream to targets that link against libtorrent.

@eli-schwartz
Copy link
Contributor

Yeah, I mentioned in the bug report that we need libtorrent built with the C++14 std. But we also need to support deluge with the python bindings...

We currently build it using the autotools configure script. Our libtorrent maintainer is going to take a look at resolving this tomorrow, the simplest solution is if there is a patch or configure parameter to guarantee that both libtorrent and the python bindings are built with C++14 using autotools.

@mayli
Copy link
Contributor

mayli commented Aug 31, 2020

@guillaumedsde I can confirm the new 1.2.9 libtorrent seems stabilized the RAM usage to normal level, as well as cpu usage.
image
3k seeding, 150 active, with 512MB Disk cache, used to be about 4G ram, and now it's stable at less than 900MB.

update: I am hitting segfault on high speed downloading about 90MB/s on the static musl build, the dmesg says

[928576.762706] qbittorrent-nox[22318]: segfault at 7efe297cdfc0 ip 00007efe2ac713a9 sp 00007efe297cdfc0 error 6 in qbittorrent-nox[7efe2a73c000+b59000]
[928576.762718] Code: 8b 46 68 45 31 d2 44 8d 41 ff 49 c1 e0 04 49 01 c0 48 8b 08 48 85 c9 0f 84 f4 00 00 00 f7 40 08 ff ff ff 7f 0f 85 e7 00 00 00 <49> 89 0c de 44 8d 5b 01 8b 5e 7c 41 83 c2 01 48 c7 00 00 00 00 00
[928666.072944] qbittorrent-nox[32570]: segfault at 7feb4b9403f0 ip 00007feb4d1c23a9 sp 00007feb4b9403f0 error 6 in qbittorrent-nox[7feb4cc8d000+b59000]
[928666.072952] Code: 8b 46 68 45 31 d2 44 8d 41 ff 49 c1 e0 04 49 01 c0 48 8b 08 48 85 c9 0f 84 f4 00 00 00 f7 40 08 ff ff ff 7f 0f 85 e7 00 00 00 <49> 89 0c de 44 8d 5b 01 8b 5e 7c 41 83 c2 01 48 c7 00 00 00 00 00
[928758.390470] qbittorrent-nox[8506]: segfault at 7f4f890f5a20 ip 00007f4f8a4453a9 sp 00007f4f890f5a20 error 6 in qbittorrent-nox[7f4f89f10000+b59000]
[928758.390476] Code: 8b 46 68 45 31 d2 44 8d 41 ff 49 c1 e0 04 49 01 c0 48 8b 08 48 85 c9 0f 84 f4 00 00 00 f7 40 08 ff ff ff 7f 0f 85 e7 00 00 00 <49> 89 0c de 44 8d 5b 01 8b 5e 7c 41 83 c2 01 48 c7 00 00 00 00 00
[928847.517746] qbittorrent-nox[17646]: segfault at 7f59d6749f50 ip 00007f59d78613a9 sp 00007f59d6749f50 error 6 in qbittorrent-nox[7f59d732c000+b59000]
[928847.517752] Code: 8b 46 68 45 31 d2 44 8d 41 ff 49 c1 e0 04 49 01 c0 48 8b 08 48 85 c9 0f 84 f4 00 00 00 f7 40 08 ff ff ff 7f 0f 85 e7 00 00 00 <49> 89 0c de 44 8d 5b 01 8b 5e 7c 41 83 c2 01 48 c7 00 00 00 00 00
[928935.255458] qbittorrent-nox[24470]: segfault at 7ff9faf6acb0 ip 00007ff9fc5af3a9 sp 00007ff9faf6acb0 error 6 in qbittorrent-nox[7ff9fc07a000+b59000]
[928935.255469] Code: 8b 46 68 45 31 d2 44 8d 41 ff 49 c1 e0 04 49 01 c0 48 8b 08 48 85 c9 0f 84 f4 00 00 00 f7 40 08 ff ff ff 7f 0f 85 e7 00 00 00 <49> 89 0c de 44 8d 5b 01 8b 5e 7c 41 83 c2 01 48 c7 00 00 00 00 00

my docker will automatically restart the process, but it keeps crashing for last 4 hours/
image

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Sep 1, 2020

update: I am hitting segfault on high speed downloading about 90MB/s on the static musl build, the dmesg says

@mayli are you using the build from here https://github.com/userdocs/qbittorrent-nox-static ?

@mayli
Copy link
Contributor

mayli commented Sep 2, 2020

@FranciscoPombal Yep.

@FranciscoPombal
Copy link
Member

@userdocs Can you reproduce this? #12326 (comment)

@userdocs
Copy link

userdocs commented Sep 2, 2020

The seg fault? no.

Using my latest musl build - https://github.com/userdocs/qbittorrent-nox-static/blob/master/bin/musl-static/amd64/qbittorrent-nox on Debian 10 Stable x64

0

Downloading Ubuntu at my almost max potential

1

I get 0 warning in the console or my log files.

2

(N) 2020-09-02T13:05:23 - 'ubuntu-20.04.1-desktop-amd64.iso' added to download list.
(N) 2020-09-02T13:05:59 - Successfully moved torrent: ubuntu-20.04.1-desktop-amd64.iso. New path: ...

Does not meant the fault is not occurring, i just can't reproduce it on my Debian server.

@slrslr
Copy link
Contributor

slrslr commented Sep 10, 2020

Hi, not a dev. just user. In qbt 4.2.5 on Windows 10 (outdated OS) I see 16MB virtual memory used per resumed torrent
qbittorrent-4 2 5-64b-Windows10-virtual-memory-usage
Maybe it is allright or already known issue, if not or is suspicious, let me know what i should try. Thx for improving qbt.

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Sep 10, 2020

@slrslr This excessive memory usage issue is believed to be fixed on recent builds that use libtorrent >= 1.2.8. It would be nice if you could confirm this as well: https://github.com/FranciscoPombal/qBittorrent/actions/runs/241080799 (these recent master builds have libtorrent 1.2.10)

@slrslr
Copy link
Contributor

slrslr commented Sep 11, 2020

I have not know which of the files to download, so i have downloaded first one and it was qbt 4.3.0alpha1 (libtorrent 1.2.10.0). i think that you are right, i see no memory issue anymore so far.

Seeing big improvements from previous versions (After 4 hours of runtime on W10):

  1. much faster startup (like 5 minutes for the torrents restoring process to complete - have 1800 added), data transfer speed is nice high (i would guess faster than previous versions)
  2. it uploading in my case never unseen amount of torrents in parallel - in previous versions maybe 25, now around 150!!! (400 connected peers).
  3. interface was responding well (except i have seen 2-3 times that when i not used qbt interface for some time and focus it, i had to wait 1 minute for it to start responding, not a big deal for me now)
  4. memory usage is incredibly low 230MB physical and 500MB virtual
  5. CPU usage seems reasonably low
    🥇

After i suspend the computer and on awake it like 5-10 minutes utilized system drive and CPU thread (23% usage on quad core CPU), seems normal to me. Then it was back to normal as before sleep.

Back to the topic of this issue, so far memory issue seems to be fixed as @FranciscoPombal said.

@FranciscoPombal
Copy link
Member

Since there have been no more complaints and multiple people on different platforms have reported good results, I think we can consider this to be addressed. So far it is believed this was the root cause: #12326 (comment)

Users facing problems should try builds like https://github.com/FranciscoPombal/qBittorrent/actions/runs/241080799 or more recent - i.e., recent qBittorrent master branch + libtorrent >= 1.2.10 before posting new bug reports. The next official release will be built with libtorrent >= 1.2.10 and will thus include these fixes.

Thanks to everyone for their help and contributions!

@eli-schwartz

Yeah, I mentioned in the bug report that we need libtorrent built with the C++14 std. But we also need to support deluge with the python bindings...

We currently build it using the autotools configure script. Our libtorrent maintainer is going to take a look at resolving this tomorrow, the simplest solution is if there is a patch or configure parameter to guarantee that both libtorrent and the python bindings are built with C++14 using autotools.

If building libtorrent with C++11 and when building with CMake, passing -DCMAKE_CXX_STANDARD=11 will force it to be built with the TORRENT_CXX11_ABI compile definition and force that definition to be propagated to all targets that link against it. So you'll have to figure out how to do something similar with using autotools, or patch all packages that depend on libtorrent to pass TORRENT_CXX11_ABI to the compiler when building. The alternative is of course to fix the python bindings build with C++ >=14 and just use C++ >=14 to build libtorrent. We can track this in a separate issue if need be.

@qbittorrent qbittorrent locked as resolved and limited conversation to collaborators Sep 11, 2020
@FranciscoPombal FranciscoPombal unpinned this issue Sep 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests