snowyu / libtorrent

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

upnp crash onreply #346

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create new sesssion without default extensions, features
2. start some extensions, features manual by call session->start_...
3.

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

start_upnp() random generate assert failed in debug mode, follow is stack trace.

    test.exe!_NMSG_WRITE(int rterrnum)  Line 217    C
    test.exe!abort()  Line 61 + 0x7 bytes   C
    test.exe!_wassert(const wchar_t * expr, const wchar_t * filename, unsigned int lineno)  Line 153    C
    test.exe!boost::detail::basic_timed_mutex::lock()  Line 78 + 0x2a bytes C++
    test.exe!boost::unique_lock<boost::mutex>::lock()  Line 413 C++
    test.exe!boost::unique_lock<boost::mutex>::unique_lock<boost::mutex>(boost::mutex & m_)  Line 291   C++
>   test.exe!libtorrent::upnp::on_reply(const 
boost::asio::ip::basic_endpoint<boost::asio::ip::udp> & from, char * buffer, 
unsigned int bytes_transferred)  Line 311 + 0x11 bytes  C++
    test.exe!boost::_mfi::mf3<void,libtorrent::upnp,boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const &,char *,unsigned int>::call<boost::intrusive_ptr<libtorrent::upnp>,boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const ,char *,unsigned int>(boost::intrusive_ptr<libtorrent::upnp> & u, const void * __formal, const boost::asio::ip::basic_endpoint<boost::asio::ip::udp> & b1, char * & b2, unsigned int & b3)  Line 384 + 0x27 bytes   C++
    test.exe!boost::_mfi::mf3<void,libtorrent::upnp,boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const &,char *,unsigned int>::operator()<boost::intrusive_ptr<libtorrent::upnp> >(boost::intrusive_ptr<libtorrent::upnp> & u, const boost::asio::ip::basic_endpoint<boost::asio::ip::udp> & a1, char * a2, unsigned int a3)  Line 400 C++
    test.exe!boost::_bi::list4<boost::_bi::value<boost::intrusive_ptr<libtorrent::upnp> >,boost::arg<1>,boost::arg<2>,boost::arg<3> >::operator()<boost::_mfi::mf3<void,libtorrent::upnp,boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const &,char *,unsigned int>,boost::_bi::list3<boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const &,char * &,int &> >(boost::_bi::type<void> __formal, boost::_mfi::mf3<void,libtorrent::upnp,boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const &,char *,unsigned int> & f, boost::_bi::list3<boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const &,char * &,int &> & a, boost::_bi::type<void> __formal)  Line 458   C++
    test.exe!boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::upnp,boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const &,char *,unsigned int>,boost::_bi::list4<boost::_bi::value<boost::intrusive_ptr<libtorrent::upnp> >,boost::arg<1>,boost::arg<2>,boost::arg<3> > >::operator()<boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const ,char *,int>(const boost::asio::ip::basic_endpoint<boost::asio::ip::udp> & a1, char * & a2, int & a3)  Line 117   C++
    test.exe!boost::detail::function::void_function_obj_invoker3<boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::upnp,boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const &,char *,unsigned int>,boost::_bi::list4<boost::_bi::value<boost::intrusive_ptr<libtorrent::upnp> >,boost::arg<1>,boost::arg<2>,boost::arg<3> > >,void,boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const &,char *,int>::invoke(boost::detail::function::function_buffer & function_obj_ptr, const boost::asio::ip::basic_endpoint<boost::asio::ip::udp> & a0, char * a1, int a2)  Line 154    C++
    test.exe!boost::function3<void,boost::asio::ip::basic_endpoint<boost::asio::ip::udp> const &,char *,int>::operator()(const boost::asio::ip::basic_endpoint<boost::asio::ip::udp> & a0, char * a1, int a2)  Line 760 + 0x22 bytes    C++
    test.exe!libtorrent::broadcast_socket::on_receive(libtorrent::broadcast_socket::socket_entry * s, const boost::system::error_code & ec, unsigned int bytes_transferred)  Line 342   C++
    test.exe!boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>::operator()(libtorrent::broadcast_socket * p, libtorrent::broadcast_socket::socket_entry * a1, const boost::system::error_code & a2, unsigned int a3)  Line 393 + 0x18 bytes   C++
    test.exe!boost::_bi::list4<boost::_bi::value<libtorrent::broadcast_socket *>,boost::_bi::value<libtorrent::broadcast_socket::socket_entry *>,boost::arg<1>,boost::arg<2> >::operator()<boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>,boost::_bi::list2<boost::system::error_code const &,unsigned int const &> >(boost::_bi::type<void> __formal, boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int> & f, boost::_bi::list2<boost::system::error_code const &,unsigned int const &> & a, boost::_bi::type<void> __formal)  Line 458  C++
    test.exe!boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>,boost::_bi::list4<boost::_bi::value<libtorrent::broadcast_socket *>,boost::_bi::value<libtorrent::broadcast_socket::socket_entry *>,boost::arg<1>,boost::arg<2> > >::operator()<boost::system::error_code,unsigned int>(const boost::system::error_code & a1, const unsigned int & a2)  Line 103   C++
    test.exe!boost::asio::detail::binder2<boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>,boost::_bi::list4<boost::_bi::value<libtorrent::broadcast_socket *>,boost::_bi::value<libtorrent::broadcast_socket::socket_entry *>,boost::arg<1>,boost::arg<2> > >,boost::system::error_code,unsigned int>::operator()()  Line 120   C++
    test.exe!boost::asio::asio_handler_invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>,boost::_bi::list4<boost::_bi::value<libtorrent::broadcast_socket *>,boost::_bi::value<libtorrent::broadcast_socket::socket_entry *>,boost::arg<1>,boost::arg<2> > >,boost::system::error_code,unsigned int> >(boost::asio::detail::binder2<boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>,boost::_bi::list4<boost::_bi::value<libtorrent::broadcast_socket *>,boost::_bi::value<libtorrent::broadcast_socket::socket_entry *>,boost::arg<1>,boost::arg<2> > >,boost::system::error_code,unsigned int> function, ...)  Line 65   C++
    test.exe!boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>,boost::_bi::list4<boost::_bi::value<libtorrent::broadcast_socket *>,boost::_bi::value<libtorrent::broadcast_socket::socket_entry *>,boost::arg<1>,boost::arg<2> > >,boost::system::error_code,unsigned int>,boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>,boost::_bi::list4<boost::_bi::value<libtorrent::broadcast_socket *>,boost::_bi::value<libtorrent::broadcast_socket::socket_entry *>,boost::arg<1>,boost::arg<2> > > >(boost::asio::detail::binder2<boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>,boost::_bi::list4<boost::_bi::value<libtorrent::broadcast_socket *>,boost::_bi::value<libtorrent::broadcast_socket::socket_entry *>,boost::arg<1>,boost::arg<2> > >,boost::system::error_code,unsigned int> & function, boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>,boost::_bi::list4<boost::_bi::value<libtorrent::broadcast_socket *>,boost::_bi::value<libtorrent::broadcast_socket::socket_entry *>,boost::arg<1>,boost::arg<2> > > & context)  Line 39 + 0x3c bytes C++
    test.exe!boost::asio::detail::win_iocp_socket_recvfrom_op<boost::asio::mutable_buffers_1,boost::asio::ip::basic_endpoint<boost::asio::ip::udp>,boost::_bi::bind_t<void,boost::_mfi::mf3<void,libtorrent::broadcast_socket,libtorrent::broadcast_socket::socket_entry *,boost::system::error_code const &,unsigned int>,boost::_bi::list4<boost::_bi::value<libtorrent::broadcast_socket *>,boost::_bi::value<libtorrent::broadcast_socket::socket_entry *>,boost::arg<1>,boost::arg<2> > > >::do_complete(boost::asio::detail::win_iocp_io_service * owner, boost::asio::detail::win_iocp_operation * base, const boost::system::error_code & result_ec, unsigned int bytes_transferred)  Line 104 + 0xd bytes  C++
    test.exe!boost::asio::detail::win_iocp_operation::complete(boost::asio::detail::win_iocp_io_service & owner, const boost::system::error_code & ec, unsigned int bytes_transferred)  Line 45 + 0x1a bytes    C++
    test.exe!boost::asio::detail::win_iocp_io_service::do_one(bool block, boost::system::error_code & ec)  Line 397 C++
    test.exe!boost::asio::detail::win_iocp_io_service::run(boost::system::error_code & ec)  Line 159 + 0xe bytes    C++
    test.exe!boost::asio::io_service::run(boost::system::error_code & ec)  Line 67  C++
    test.exe!libtorrent::aux::session_impl::operator()()  Line 2747 C++
    test.exe!boost::detail::thread_data<boost::reference_wrapper<libtorrent::aux::session_impl> >::run()  Line 88   C++
    test.exe!boost::`anonymous namespace'::thread_start_function(void * param)  Line 181    C++
    test.exe!_callthreadstartex()  Line 314 + 0xf bytes C
    test.exe!_threadstartex(void * ptd)  Line 297   C
    kernel32.dll!@BaseThreadInitThunk@12()  + 0x12 bytes    
    ntdll.dll!___RtlUserThreadStart@8()  + 0x27 bytes   
    ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes    

or from pastebin if it look better http://pastebin.com/CmqTVn2p

What version of the product are you using? On what operating system?
libtorrent 0.15.10, Windows 7 64bit.

Original issue reported on code.google.com by secm...@gmail.com on 30 Jun 2012 at 5:08

GoogleCodeExporter commented 9 years ago
I think I have the same issue. deluged crashs upon start. The backtrace looks 
similar that it traces to upnp::on_reply: http://pastebin.com/nL2WfjvN

I'm on Arch Linux, deluge 1.3.5-1, libtorrent-rasterbar 1:0.15.10-1, Python 
2.7.3

Original comment by xiaoruo...@gmail.com on 6 Jul 2012 at 5:18