frostalf / libtorrent

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

Assert fail in udp_socket::send #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Random

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Latest RC_0_15 branch on Ubuntu v10.10

Please provide any additional information below.
version: 0.15.4.0
$Rev: 4876 $
file: 'udp_socket.cpp'
line: 97
function: void libtorrent::udp_socket::send(const 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp>&, const char*, int, 
boost::system::error_code&)
expression: is_open()
Bittorrent session async deletion OUT
Sizes: 2
stack:
1: assert_fail(char const*, int, char const*, char const*)
2: 
libtorrent::udp_socket::send(boost::asio::ip::basic_endpoint<boost::asio::ip::ud
p> const&, char const*, int, boost::system::error_code&)
3: 
libtorrent::rate_limited_udp_socket::send(boost::asio::ip::basic_endpoint<boost:
:asio::ip::udp> const&, char const*, int, boost::system::error_code&, int)
4: libtorrent::dht::dht_tracker::send_packet(libtorrent::dht::msg const&)
5: boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, 
boost::_mfi::mf1<void, libtorrent::dht::dht_tracker, libtorrent::dht::msg 
const&>, boost::_bi::list2<boost::_bi::value<libtorrent::dht::dht_tracker*>, 
boost::arg<1> > >, void, libtorrent::dht::msg 
const&>::invoke(boost::detail::function::function_buffer&, libtorrent::dht::msg 
const&)
6: libtorrent::dht::rpc_manager::invoke(int, 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp>, 
boost::intrusive_ptr<libtorrent::dht::observer>)
7: libtorrent::dht::refresh::invoke(libtorrent::big_number const&, 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp>)
8: libtorrent::dht::traversal_algorithm::add_requests()
9: libtorrent::dht::traversal_algorithm::finished(libtorrent::big_number const&)
10: libtorrent::dht::refresh_observer::reply(libtorrent::dht::msg const&)
11: libtorrent::dht::rpc_manager::incoming(libtorrent::dht::msg const&)
12: libtorrent::dht::node_impl::incoming(libtorrent::dht::msg const&)
13: 
libtorrent::dht::dht_tracker::on_receive(boost::asio::ip::basic_endpoint<boost::
asio::ip::udp> const&, char const*, int)
14: libtorrent::aux::session_impl::on_receive_udp(boost::system::error_code 
const&, boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const&, char 
const*, int)
15: 
boost::detail::function::void_function_obj_invoker4<boost::_bi::bind_t<void, 
boost::_mfi::mf4<void, libtorrent::aux::session_impl, boost::system::error_code 
const&, boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const&, char 
const*, int>, 
boost::_bi::list5<boost::_bi::value<libtorrent::aux::session_impl*>, 
boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> > >, void, 
boost::system::error_code const&, 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const&, char const*, 
int>::invoke(boost::detail::function::function_buffer&, 
boost::system::error_code const&, 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const&, char const*, int)
16: boost::function4<void, boost::system::error_code const&, 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const&, char const*, 
int>::operator()(boost::system::error_code const&, 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const&, char const*, int) 
const
17: 
libtorrent::udp_socket::on_read(boost::asio::basic_datagram_socket<boost::asio::
ip::udp, boost::asio::datagram_socket_service<boost::asio::ip::udp> >*, 
boost::system::error_code const&, unsigned int)
18: 
boost::asio::detail::handler_queue::handler_wrapper<boost::asio::detail::binder2
<boost::_bi::bind_t<void, boost::_mfi::mf3<void, libtorrent::udp_socket, 
boost::asio::basic_datagram_socket<boost::asio::ip::udp, 
boost::asio::datagram_socket_service<boost::asio::ip::udp> >*, 
boost::system::error_code const&, unsigned int>, 
boost::_bi::list4<boost::_bi::value<libtorrent::udp_socket*>, 
boost::_bi::value<boost::asio::basic_datagram_socket<boost::asio::ip::udp, 
boost::asio::datagram_socket_service<boost::asio::ip::udp> >*>, boost::arg<1>, 
boost::arg<2> > >, boost::system::error_code, unsigned int> 
>::do_call(boost::asio::detail::handler_queue::handler*)
19: 
boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false> 
>::run(boost::system::error_code&)
20: libtorrent::aux::session_impl::operator()()
21: 
boost::detail::thread_data<boost::reference_wrapper<libtorrent::aux::session_imp
l> >::run()
22: thread_proxy
23: 
24: clone

Original issue reported on code.google.com by dch...@gmail.com on 11 Oct 2010 at 5:14

GoogleCodeExporter commented 9 years ago
it looks like this could happen on shutdown or changing the proxy settings for 
the UDP socket.

It would probably be a fairly simple fix if it only happens on shutdown (the 
log message suggests that this happened on shutdown)

Original comment by arvid.no...@gmail.com on 18 Oct 2010 at 1:06

GoogleCodeExporter commented 9 years ago
Yes, I only managed to reproduce it on shutdown.

Original comment by dch...@gmail.com on 18 Oct 2010 at 4:40

GoogleCodeExporter commented 9 years ago
I believe [4906] fixes this.

Original comment by arvid.no...@gmail.com on 19 Oct 2010 at 3:45