Hmm,

I left it over night and it's still at 100% CPU.. I've now run it in gdb, BT below.

It seems to be stuck on the code "pid_t childPid = fork();" It just sits there at 100% CPU.. Any idea's what could be causing this???

I run this script when it has finished downloading a torrent.. but as far as I can see it has not executed the script yet?

Sorry I'm a Java coder and don't know much about c++.. any help would be appreciated.

========
#0  0x00000031ff69a625 in fork () from /lib64/libc.so.6
#1 0x00000000004b0188 in rpc::ExecFile::execute (this=0x700f70, file=0xd07b078 "/home/someuser/bin/add.sh", argv=0x7fffffffc880, flags=3) at exec_file.cc:75 #2 0x00000000004b06f7 in rpc::ExecFile::execute_object (this=0x700f70, rawArgs=<value optimized out>, flags=3) at exec_file.cc:187 #3 0x000000000042c23c in rak::mem_fn1_b2_t<rpc::ExecFile, torrent::Object, torrent::Object const&, int>::operator() (this=<value optimized out>, arg1=...) at ../rak/functional_fun.h:352 #4 0x00000000004ace52 in operator()<rpc::target_wrapper<void>::no_type*> (rawCommand=0x6fea80, target=<value optimized out>, rawArgs=...) at ../../rak/functional_fun.h:156 #5 rpc::CommandSlot<void>::call_list (rawCommand=0x6fea80, target=<value optimized out>, rawArgs=...) at command_slot.cc:59 #6 0x00000000004a8a51 in rpc::CommandMap::call_command (this=0x700f00, key=0x8be0e08 "execute", arg=..., target=...) at command_map.cc:160 #7 0x00000000004b2e21 in rpc::parse_command (target=..., first=<value optimized out>, last=0x76c3e4 "") at parse_commands.cc:138 #8 0x00000000004b3c42 in rpc::parse_command_multiple (target=..., first=0x0, last=0x76c3e4 "") at parse_commands.cc:148 #9 0x00000000004a67da in rpc::CommandFunction::call (rawCommand=0x7481c0, target=..., args=<value optimized out>) at command_function.cc:71 #10 0x00000000004a8a29 in rpc::CommandMap::call_command (this=0x700f00, key=0x12932778 "move_complete_cmd", arg=..., target=...) at command_map.cc:153 #11 0x00000000004b2e21 in rpc::parse_command (target=..., first=<value optimized out>, last=0x22944da "") at parse_commands.cc:138 #12 0x000000000043dc14 in apply_if (flags=<value optimized out>, target=..., rawArgs=<value optimized out>) at command_ui.cc:382 #13 0x000000000043f164 in rak::ptr_fn2_b1_t<torrent::Object, int, rpc::rt_triple<int, void*, void*>, torrent::Object const&>::operator() (this=<value optimized out>, arg2=<value optimized out>, arg3=...) at ../rak/functional_fun.h:398 #14 0x00000000004ab88b in operator() (rawCommand=<value optimized out>, target=<value optimized out>, rawArgs=...) at ../../rak/functional_fun.h:136 #15 rpc::CommandSlot<rpc::rt_triple<int, void*, void*> >::call_unknown (rawCommand=<value optimized out>, target=<value optimized out>, rawArgs=...) at command_slot.cc:50 #16 0x00000000004a8a29 in rpc::CommandMap::call_command (this=0x700f00, key=0xbb3e0a8 "branch", arg=..., target=...) at command_map.cc:153 #17 0x00000000004b2e21 in rpc::parse_command (target=..., first=<value optimized out>, last=0x76c240 "") at parse_commands.cc:138 #18 0x00000000004b3c42 in rpc::parse_command_multiple (target=..., first=0x0, last=0x76c240 "") at parse_commands.cc:148 #19 0x00000000004a6111 in rpc::CommandFunctionList::call (rawCommand=0x748c00, target=..., args=<value optimized out>) at command_function.cc:104 #20 0x00000000004a8a29 in rpc::CommandMap::call_command (this=0x700f00, key=0x4beee0 "event.download.finished", arg=..., target=...) at command_map.cc:153 #21 0x00000000004a8c66 in rpc::CommandMap::call_catch (this=0x0, key=0x0, target=<value optimized out>, args=..., err=0xffffffffffffffc0 <Address 0xffffffffffffffc0 out of bounds>) at command_map.cc:119 #22 0x000000000047386c in core::DownloadList::confirm_finished (this=0x722d50, download=0xf56c70) at download_list.cc:570 #23 0x000000000047434b in core::DownloadList::received_finished (this=0x722d50, download=0xf56c70) at download_list.cc:538 #24 0x00007ffff7b4d438 in emit (this=<value optimized out>) at /usr/include/sigc++-2.0/sigc++/signal.h:544 #25 emit (this=<value optimized out>) at /usr/include/sigc++-2.0/sigc++/signal.h:1702 #26 sigc::signal0<void, sigc::nil>::operator() (this=<value optimized out>) at /usr/include/sigc++-2.0/sigc++/signal.h:1706
#27 0x00007ffff7b0923c in operator() () at ../../rak/functional_fun.h:102
#28 call () at ../../rak/priority_queue_default.h:62
#29 torrent::perform () at torrent.cc:168
#30 0x0000000000485f0a in core::PollManagerEPoll::poll (this=0x1200011, timeout=<value optimized out>) at poll_manager_epoll.cc:67
#31 0x0000000000443699 in main (argc=4, argv=0x7fffffffe838) at main.cc:321
==========

On 17/04/2011 10:44 PM, Steven Adams wrote:
Hi Jari,

I'm running rtorrent with -pg enabled.

Problem is it takes at least 4-5mins to startup. It has about 200 torrents that it needs to hash check which it starts automatically and then rtorrent freezes with 100% cpu and not much disk usage..

If i do a kill -9 the gmon.out file wont get created.. I'll leave it overnight and see if the cpu drops in the morning so i can do a graceful exit.

Thanks
Steve

On 17/04/2011 6:30 PM, Jari Sundell wrote:
Hi,

Use gprof or similar to figure out where it is spending most of the time, so that part might be optimized. I haven't really optimized or tested rtorrent with that many torrents, so might very well be some parts of the code in the client that currently doesn't scale well as most of it was written for flexibility.

BTW, are you using 'scheduler.max_active'?

Jari Sundell

On Sun, Apr 17, 2011 at 4:55 PM, Steven Adams <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    I seed ALOT of torrents (9000+).. When i start rtorrent the CPU
    goes to 100% usage for AGES, eventually rtorrent responds and the
    CPU goes down to 10-15%.

    If I choose to delete one of the hashing torrents or incomplete
    the CPU goes to 100% again and rtorrent seems to lag.. sometimes
    it just sits there for 20-30mins+..

    Any ideas what can cause this? I have 16GB of memory and 2x quad
    core cpus on Centos 5.

    Backtrack
    #0  0x00000031ff6c5bb7 in statfs64 () from /lib64/libc.so.6
    #1  0x00000031ff6c5c41 in statvfs64 () from /lib64/libc.so.6
    #2  0x00007ffff7b11ceb in torrent::FileList::free_diskspace
    (this=<value optimized out>) at ../../../rak/fs_stat.h:71
    #3  0x00007ffff7b20e57 in operator() (this=0x66ea950, flags=3) at
    ../../rak/functional.h:507
    #4  torrent::ChunkList::sync_chunks (this=0x66ea950, flags=3) at
    chunk_list.cc:253
    #5  0x00007ffff7b06cb8 in torrent::resume_save_progress
    (download=<value optimized out>, object=..., onlyCompleted=true)
    at resume.cc:162
    #6  0x00000000004718d1 in core::DownloadList::resume (this=<value
    optimized out>, download=0x66eb0d0, flags=0) at download_list.cc:345
    #7  0x000000000043a5d1 in cmd_scheduler_simple_removed
    (download=<value optimized out>, rawArgs=<value optimized out>)
    at command_scheduler.cc:78
    #8  0x0000000000418660 in rak::ptr_fn2_t<torrent::Object,
    core::Download*, torrent::Object const&>::operator() (this=0x0,
    arg1=0x7fffffffd580, arg2=...) at ../rak/functional_fun.h:215
    #9  0x00000000004a976e in operator() (rawCommand=<value optimized
    out>, target=0x7fffffffd6a0, rawArgs=...) at
    ../../rak/functional_fun.h:136
    #10 rpc::CommandSlot<core::Download*>::call_unknown
    (rawCommand=<value optimized out>, target=0x7fffffffd6a0,
    rawArgs=...) at command_slot.cc:50
    #11 0x00000000004a6b32 in rpc::CommandMap::call_command
    (this=0x6fc7a0, key=0x593f208 "scheduler.simple.removed",
    arg=..., target=...) at command_map.cc:160
    #12 0x00000000004b0b30 in rpc::parse_command (target=...,
    first=<value optimized out>, last=0x746dab "") at
    parse_commands.cc:138
    #13 0x00000000004b19af in rpc::parse_command_multiple
    (target=..., first=0x7fffffffd6a0 "", last=0x746dab "") at
    parse_commands.cc:148
    #14 0x0000000000487ad7 in parse_command_multiple_d_nothrow
    (this=0x746c30, download=0x59b5120) at ./../rpc/parse_commands.h:87
    #15 core::View::erase (this=0x746c30, download=0x59b5120) at
    view.cc:154
    #16 0x0000000000474eea in operator() (__first=<value optimized
    out>, __last=..., __f=...) at
    
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_function.h:656
    #17 operator() (__first=<value optimized out>, __last=...,
    __f=...) at
    
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_function.h:446
    #18 std::for_each<__gnu_cxx::__normal_iterator<core::View**,
    std::vector<core::View*, std::allocator<core::View*> > >,
    std::binder2nd<std::mem_fun1_t<void, core::View, core::Download*>
    > > (__first=<value optimized out>, __last=...,
       __f=...) at
    
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_algo.h:159
    #19 0x0000000000473fa4 in core::DownloadList::erase
    (this=0x71ed50, itr=<value optimized out>) at download_list.cc:192
    #20 0x00000000004195ce in operator() (this=<value optimized out>,
    target=0x7ffff6c6f720, arg1=<value optimized out>) at
    ../rak/functional.h:525
    #21 rpc::object_void_fn_t<core::Download*,
    rak::mem_fun1<core::DownloadList, void, core::Download*>,
    void>::operator() (this=<value optimized out>,
    target=0x7ffff6c6f720, arg1=<value optimized out>) at
    rpc/command_slot.h:113
    #22 0x00000000004a976e in operator() (rawCommand=<value optimized
    out>, target=0x7fffffffd6a0, rawArgs=...) at
    ../../rak/functional_fun.h:136
    #23 rpc::CommandSlot<core::Download*>::call_unknown
    (rawCommand=<value optimized out>, target=0x7fffffffd6a0,
    rawArgs=...) at command_slot.cc:50
    #24 0x00000000004a6b32 in rpc::CommandMap::call_command
    (this=0x6fc7a0, key=0x1893828 "d.erase", arg=..., target=...) at
    command_map.cc:160
    #25 0x00000000004b0b30 in rpc::parse_command (target=...,
    first=<value optimized out>, last=0xa3cb520 "") at
    parse_commands.cc:138
    #26 0x0000000000422a31 in d_multicall (rawArgs=<value optimized
    out>) at command_events.cc:373
    #27 0x00000000004241cd in rak::ptr_fn1_t<torrent::Object,
    torrent::Object const&>::operator() (this=0x0, arg1=...) at
    ../rak/functional_fun.h:201
    #28 0x00000000004aac94 in
    operator()<rpc::target_wrapper<void>::no_type*>
    (rawCommand=0x6f9d10, target=<value optimized out>, rawArgs=...)
    at ../../rak/functional_fun.h:156
    #29 rpc::CommandSlot<void>::call_list (rawCommand=0x6f9d10,
    target=<value optimized out>, rawArgs=...) at command_slot.cc:59
    #30 0x00000000004a6382 in rpc::CommandMap::call_command
    (this=<value optimized out>, itr=..., arg=..., target=...) at
    command_map.cc:193
    #31 0x00000000004b4f77 in rpc::xmlrpc_call_command
    (env=0x7fffffffe6a0, args=<value optimized out>,
    voidServerInfo=<value optimized out>) at xmlrpc.cc:454
    #32 0x00007ffff76d690c in callNamedMethod (envP=0x7fffffffe6a0,
    registryP=0x747260, methodName=0x15897a60 "d.multicall",
    paramArrayP=0x19102cd0, callInfoP=0x0, resultPP=0x7fffffffe6b8)
    at registry.c:311
    #33 xmlrpc_dispatchCall (envP=0x7fffffffe6a0, registryP=0x747260,
    methodName=0x15897a60 "d.multicall", paramArrayP=0x19102cd0,
    callInfoP=0x0, resultPP=0x7fffffffe6b8) at registry.c:337
    #34 0x00007ffff76d6a94 in xmlrpc_registry_process_call2
    (envP=0x7fffffffe730, registryP=0x747260,
       callXml=0xfb5280f "<?xml version=\"1.0\"
    
encoding=\"UTF-8\"?>\r\n<methodCall>\r\n<methodName>d.multicall</methodName>\r\n<params>\r\n<param><value><string>hashing</string></value></param>\r\n<param><value><string>d.erase=</string></v"...,
    callXmlLen=241, callInfo=0x0, responseXmlPP=0x7fffffffe720) at
    registry.c:426
    #35 0x00007ffff76d6b8a in xmlrpc_registry_process_call
    (envP=0x66eb7f8, registryP=0x7fffffffd580, host=<value optimized
    out>, callXml=0x0, callXmlLen=18446744073709551615) at registry.c:466
    #36 0x00000000004b3c35 in rpc::XmlRpc::process (this=0x6fc7e0,
       inBuffer=0xfb5280f "<?xml version=\"1.0\"
    
encoding=\"UTF-8\"?>\r\n<methodCall>\r\n<methodName>d.multicall</methodName>\r\n<params>\r\n<param><value><string>hashing</string></value></param>\r\n<param><value><string>d.erase=</string></v"...,
    length=241, slotWrite=...) at xmlrpc.cc:493
    #37 0x0000000000435f15 in rak::mem_fn3_t<rpc::XmlRpc, bool, char
    const*, unsigned int, rak::function2<bool, char const*, unsigned
    int> >::operator() (this=0x7ffff6c6f720, arg1=0x7fffffffd580
    "BSFX", arg2=0, arg3=<value optimized out>)
       at ../rak/functional_fun.h:259
    #38 0x00000000004b23e4 in operator() (this=0x766af0, task=0x766b18,
       buffer=0xfb5280f "<?xml version=\"1.0\"
    
encoding=\"UTF-8\"?>\r\n<methodCall>\r\n<methodName>d.multicall</methodName>\r\n<params>\r\n<param><value><string>hashing</string></value></param>\r\n<param><value><string>d.erase=</string></v"...,
    length=241) at ../../rak/functional_fun.h:173
    #39 rpc::SCgi::receive_call (this=0x766af0, task=0x766b18,
       buffer=0xfb5280f "<?xml version=\"1.0\"
    
encoding=\"UTF-8\"?>\r\n<methodCall>\r\n<methodName>d.multicall</methodName>\r\n<params>\r\n<param><value><string>hashing</string></value></param>\r\n<param><value><string>d.erase=</string></v"...,
    length=241) at scgi.cc:166
    #40 0x00000000004b37bd in rpc::SCgiTask::event_read
    (this=0x766b18) at scgi_task.cc:185
    #41 0x00007ffff7b02d6b in torrent::PollEPoll::perform
    (this=0x72c190) at poll_epoll.cc:166
    #42 0x00000000004846c2 in core::PollManagerEPoll::poll
    (this=0x7331f0, timeout=<value optimized out>) at
    poll_manager_epoll.cc:74
    #43 0x0000000000443319 in main (argc=1, argv=0x7fffffffeaf8) at
    main.cc:321
    _______________________________________________
    Libtorrent-devel mailing list
    [email protected] <mailto:[email protected]>
    http://rakshasa.no/mailman/listinfo/libtorrent-devel


_______________________________________________
Libtorrent-devel mailing list
[email protected]
http://rakshasa.no/mailman/listinfo/libtorrent-devel

Reply via email to