snowyu / libtorrent

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

Invariant check failure in libtorrent::dht::routing_table #667

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I run custom torrent application built upon libtorrent-rasterbar.
There are several instances which run on different hosts, and on startup each 
instance adds all other instances to DHT using add_dht_node() call.

Later I create torrent main instance (for seeding) and add torrent hash I got 
during creation to all other instances (leechers).

If libtorrent built without debugging leechers in most cases can download 
metadata from seeder instance and download torrent completely.

However, in many cases leechers and/or seeders stalls for unknown reason.
I tried to use debug version of libtorrent. With debug version instances
after creation/addind torrent instances start to exchange DHT data and crashed.

version: 1.0.0.0
$Rev: 9739 $

file: 'kademlia/routing_table.cpp'
line: 1101
function: void libtorrent::dht::routing_table::check_invariant() const
expression: all_ips == m_ips

stack:
1: assert_fail(char const*, int, char const*, char const*, char const*, int)
2: libtorrent::dht::routing_table::check_invariant() const
3: libtorrent::dht::routing_table::add_node(libtorrent::dht::node_entry)
4: libtorrent::dht::routing_table::node_seen(libtorrent::sha1_hash const&, 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp>, int)
5: libtorrent::dht::rpc_manager::incoming(libtorrent::dht::msg const&, 
libtorrent::sha1_hash*, libtorrent::dht_settings const&)
6: libtorrent::dht::node_impl::incoming(libtorrent::dht::msg const&)
7: libtorrent::dht::dht_tracker::incoming_packet(boost::system::error_code 
const&, boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const&, char 
const*, int)
8: libtorrent::udp_socket::call_handler(boost::system::error_code const&, 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const&, char const*, int)
9: 
libtorrent::udp_socket::on_read_impl(boost::asio::basic_datagram_socket<boost::a
sio::ip::udp, boost::asio::datagram_socket_service<boost::asio::ip::udp> >*, 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const&, 
boost::system::error_code const&, unsigned long)
10: libtorrent::udp_socket::on_read(boost::system::error_code const&, 
boost::asio::basic_datagram_socket<boost::asio::ip::udp, 
boost::asio::datagram_socket_service<boost::asio::ip::udp> >*)
11: 
12: 
boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_loc
k<boost::asio::detail::posix_mutex>&, 
boost::asio::detail::task_io_service_thread_info&, boost::system::error_code 
const&)
13: boost::asio::detail::task_io_service::run(boost::system::error_code&)
14: libtorrent::aux::session_impl::main_thread()
15: boost_asio_detail_posix_thread_function
16: ) [0x3bac8079d1]
17: clone

Original issue reported on code.google.com by vost...@gmail.com on 22 Aug 2014 at 3:29

GoogleCodeExporter commented 9 years ago
I believe this is fixed now.

Original comment by arvid.no...@gmail.com on 24 Sep 2014 at 3:38