rakshasa / libtorrent

libTorrent BitTorrent library
http://rtorrent.net/downloads/
GNU General Public License v2.0
885 stars 209 forks source link

Just FYI: rTorrent Crash, 'priority_queue_erase(...) called on an invalid item.' #198

Closed johnyb0y closed 5 years ago

johnyb0y commented 5 years ago

Built rtorrent 0.98 & libtorrent 0.98 from source a few days ago.

I don't need support, this is just FYI.

rtorrent crashes every few days. Log shows this:

1564589681 C Caught internal_error: 'priority_queue_erase(...) called on an invalid item.'.
---DUMP---
/usr/local/lib/libtorrent.so.21(_ZN7torrent14internal_error10initializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x20b) [0x7fdea769636b]
rtorrent(_ZN7torrent14internal_errorC2EPKc+0x7d) [0x5642a723313d]
rtorrent(+0x163fc8) [0x5642a72fbfc8]
rtorrent(+0x1614c5) [0x5642a72f94c5]
rtorrent(+0x3b7ad) [0x5642a71d37ad]
/usr/local/lib/libtorrent.so.21(_ZN7torrent11thread_base10event_loopEPS0_+0x153) [0x7fdea76e5413]
rtorrent(+0x39925) [0x5642a71d1925]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fdea671b09b]
rtorrent(+0x3a1ba) [0x5642a71d21ba]

---END---

Thanks.

rakshasa commented 5 years ago

This has been a recurring issue for a long time, most likely because bugs in higher layers end up throwing exceptions in the scheduler.

I'm planning on redoing the scheduler and make it easier to track down who is causing these issues.

johnyb0y commented 5 years ago

@rakshasa thanks for the feedback. I’m closing this issue.

Robert-Riedl commented 4 years ago

any news on this ?

johnyb0y commented 4 years ago

@Robert-Riedl

I changed the following in my .rtorrent.rc:

pieces.preload.type.set = 1
network.xmlrpc.size_limit.set = 4M
network.http.max_open.set = 128
network.max_open_files.set = 512
network.max_open_sockets.set = 512
network.receive_buffer.size.set = 0
network.send_buffer.size.set    = 0

I also removed any rtorrent specific changes I made to my /etc/sysctl.conf

And I increased my swap space from 1GB to 8GB (since I was also in a low RAM situation).

That was about 4 weeks ago. Since then rtorrent hasn't crashed anymore. I'm on 0.98 built from master.