xlgjjff / libtorrent

Automatically exported from code.google.com/p/libtorrent
Other
0 stars 0 forks source link

100% CPU usage on idle #360

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
I don't know. It just happens sometimes for some unknown reason.

What is the expected output? What do you see instead?
Libtorrent (BOOST libraries it use) uses 100% CPU.

What version of the product are you using? On what operating system?

0.15.6. Boost 1.44.

Please provide any additional information below.

I found the code which uses 100% CPU.

It's in file boost\asio\detail\impl\select_reactor.ipp: 

void select_reactor::run_thread() <--- 100% here (infinite continuous loop).

Original issue reported on code.google.com by alervd...@gmail.com on 12 Aug 2012 at 11:13

GoogleCodeExporter commented 8 years ago
OS is Windows 7 x32 with the all latest updates.

Original comment by alervd...@gmail.com on 12 Aug 2012 at 11:14

GoogleCodeExporter commented 8 years ago
Could you please provide more information on where the CPU is spent?

Typically seeing a lot of CPU usage in the select reactor in asio is an 
indication of an event that triggers constantly. If you step into the event 
handlers (or just run a profiler) you can probably see which event it is that 
triggers over and over again.

What operating system are you using?

You may want to try to use a somewhat newer version of libtorrent as well. like 
0.15.10 or 0.16.2.

Original comment by arvid.no...@gmail.com on 14 Aug 2012 at 3:32

GoogleCodeExporter commented 8 years ago

Original comment by arvid.no...@gmail.com on 27 Oct 2013 at 7:57

GoogleCodeExporter commented 8 years ago
We are also experencing the sample problem with boost 1_55_0 version.Can 
someone help us in finding the issue.

Thanks.

Original comment by gudar...@knoahsoft.com on 17 Jun 2014 at 11:17

GoogleCodeExporter commented 8 years ago
please provide stack trace samples (ideally, the output from "sample" on osx or 
bsd). Otherwise, please provide a few stack traces of where the program is when 
using 100% CPU. Only stack traces of the thread that's doing that of course. 5 
random samples of that thread should be enough.

Also, please provide more information on what architecture and OS your're on, 
and some more details on exactly what you're doing. What settings do you set, 
how do you add torrents etc.

Original comment by arvid.no...@gmail.com on 17 Jun 2014 at 4:22