Page 1 of 1
deluge hang for a while
Posted: Sun Dec 09, 2012 1:23 am
by tyeken8
Hi all,
I'm using deluge 1.3.5 on a download machine, usually it works nice, but sometimes it hangs for a while and returns work.

- top.png (70.65 KiB) Viewed 8328 times
When it hangs, no download nor upload is performed, the deluge process just run the CPU 100%, but no disk IO is performed as well(0% wa), I checked the DEBUG log, nothing is written.

- traffic.png (21.89 KiB) Viewed 8328 times
After about one minute, everything goes well again.
I want to know why may this happen, or how can I debug further on this. Thanks.
Re: deluge hang for a while
Posted: Tue Dec 11, 2012 8:17 am
by tyeken8
bump
Re: deluge hang for a while
Posted: Wed Dec 12, 2012 4:37 pm
by bro
OS running deluged and how many torrents do you have in your list? How far apart are these CPU peaks?
Re: deluge hang for a while
Posted: Thu Dec 13, 2012 1:12 pm
by tyeken8
About 200 torrents for about 3TB total.
It's irregular, but seems more likely to happen when change on torrent's state, (once I paused a torrent, then it hung, after it returned, I paused another, nothing more happened).
I wonder if it was on saving torrent's states, but I'm not sure.
I'm not familiar with twisted, I want to know how to attach a debugger when the deluged hangs, or we have anything else to know where and why this happens.
Re: deluge hang for a while
Posted: Mon Dec 17, 2012 12:16 pm
by tyeken8
When it hangs, I tried to attach gdb and saw it's in libtorrent::disk_buffer_pool::free_buffer(char*), don't know what it is currently..
Program received signal SIGINT, Interrupt.
[Switching to Thread 0x7ff764148700 (LWP 1147)]
0x00007ff762b00303 in poll () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) info threads
Id Target Id Frame
4 Thread 0x7ff75fa31700 (LWP 1330) "deluged" 0x00007ff760ae3bf3 in libtorrent::disk_buffer_pool::free_buffer(char*) ()
from /usr/lib/libtorrent-rasterbar.so.6
3 Thread 0x7ff75f230700 (LWP 1331) "deluged" 0x00007ff762b0c353 in epoll_wait () from /lib/x86_64-linux-gnu/libc.so.6
2 Thread 0x7ff75ea2f700 (LWP 1333) "deluged" 0x00007ff763d20d84 in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/x86_64-linux-gnu/libpthread.so.0
* 1 Thread 0x7ff764148700 (LWP 1147) "deluged" 0x00007ff762b00303 in poll () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) thread 4
[Switching to thread 4 (Thread 0x7ff75fa31700 (LWP 1330))]
#0 0x00007ff760ae3bf3 in libtorrent::disk_buffer_pool::free_buffer(char*) () from /usr/lib/libtorrent-rasterbar.so.6
(gdb) bt
#0 0x00007ff760ae3bf3 in libtorrent::disk_buffer_pool::free_buffer(char*) () from /usr/lib/libtorrent-rasterbar.so.6
#1 0x00007ff760ae3e09 in libtorrent::disk_io_thread::free_piece(libtorrent::disk_io_thread::cached_piece_entry&, boost::unique_lock<boost::recursive_mutex>&) () from /usr/lib/libtorrent-rasterbar.so.6
#2 0x00007ff760ae62e5 in libtorrent::disk_io_thread::flush_expired_pieces() () from /usr/lib/libtorrent-rasterbar.so.6
#3 0x00007ff760ae8424 in libtorrent::disk_io_thread::operator()() () from /usr/lib/libtorrent-rasterbar.so.6
#4 0x00007ff75fe7bce9 in thread_proxy () from /usr/lib/libboost_thread.so.1.46.1
#5 0x00007ff763d1ce9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007ff762b0bcbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x0000000000000000 in ?? ()
Re: deluge hang for a while
Posted: Mon Dec 17, 2012 2:56 pm
by Cas
Have you enabled debug logging in deluge or you could change this
log line to
error to only see alerts from libtorrent in the log:
I suspect you might be having performance issues and getting something like the following:
http://www.rasterbar.com/products/libtorrent/manual.html wrote:outstanding_disk_buffer_limit_reached
This warning means that the number of bytes queued to be written to disk exceeds the max disk byte queue setting (session_settings::max_queued_disk_bytes). This might restrict the download rate, by not queuing up enough write jobs to the disk I/O thread. When this alert is posted, peer connections are temporarily stopped from downloading, until the queued disk bytes have fallen below the limit again. Unless your max_queued_disk_bytes setting is already high, you might want to increase it to get better performance.
Re: deluge hang for a while
Posted: Wed Dec 19, 2012 1:17 am
by tyeken8
Yes, I do recieve many "max outstanding disk writes reached" alerts. I changed max_queued_disk_bytes to 64MiB and it doesn't show me warnings again.
But the issue still not solved. And I'm confused because no disk write is performed in libtorrent::disk_buffer_pool::free_buffer(), what is it doing?!
Cas wrote:Have you enabled debug logging in deluge or you could change this
log line to
error to only see alerts from libtorrent in the log:
I suspect you might be having performance issues and getting something like the following:
http://www.rasterbar.com/products/libtorrent/manual.html wrote:outstanding_disk_buffer_limit_reached
This warning means that the number of bytes queued to be written to disk exceeds the max disk byte queue setting (session_settings::max_queued_disk_bytes). This might restrict the download rate, by not queuing up enough write jobs to the disk I/O thread. When this alert is posted, peer connections are temporarily stopped from downloading, until the queued disk bytes have fallen below the limit again. Unless your max_queued_disk_bytes setting is already high, you might want to increase it to get better performance.
Re: deluge hang for a while
Posted: Thu Dec 20, 2012 1:17 am
by tyeken8
Now it happened more often than a week ago, even when I'm adding torrent and even no operation. The upload and download just go down to 0, hold for several minutes, and go back.

- 未命名.jpg (40.16 KiB) Viewed 8191 times
Re: deluge hang for a while
Posted: Sat Dec 22, 2012 1:24 am
by Cas
Have you tried using libtorrent 0.16? Also what OS are you using?
I suggest you try asking on the libtorrent
mailing list as the main dev will have more insight into this than myself.