hamedramzi / libtorrent

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

function: virtual void libtorrent::peer_connection::disconnect invalid_argument #620

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
version: 1.0.0.0
$Rev: 7680 $
file: 'libtorrent/src/peer_connection.cpp'
line: 3483
function: virtual void libtorrent::peer_connection::disconnect(const 
boost::system::error_code&, int)
expression: ec != error::invalid_argument || !m_outgoing

stack:
1: ) [0x43ccd0]
2: ) [0x4ff9f8]
3: ) [0x4f041b]
4: ) [0x501d39]
5: ) [0x50c3bc]
6: ) [0x4333ac]
7: ) [0x4371b1]
8: ) [0x5796af]
9: ) [0x42bd8f]
10: 
11: clone

Abandon (core dumped)

Original issue reported on code.google.com by fre...@gmail.com on 11 May 2014 at 1:39

GoogleCodeExporter commented 9 years ago
this probably shouldn't be an assert, because there are ways for this to happen 
legitimately.

are you by any chance limiting the range of outgoing ports for peer 
connections? if so, you may want to widen it to allow for more unique ip, 
port-quadruples.

Original comment by arvid.no...@gmail.com on 11 May 2014 at 4:21

GoogleCodeExporter commented 9 years ago
same assertion when running Twister version v0.9.20.0-unk-beta (May  6 2014, 
08:50:34)
4 connections at time when this assert happened

about this bugtracker: when saving I get "Comment is too long", so the whole 
info can be found here:
http://skilledtests.com/twister/libtorrent_assertion_620.txt

[New Thread 0xb5f44b40 (LWP 13851)]
[New Thread 0xb4cb9b40 (LWP 13852)]
[Thread 0xb4cb9b40 (LWP 13852) exited]
[New Thread 0xb42ffb40 (LWP 13853)]
[New Thread 0xb3afeb40 (LWP 13854)]
[New Thread 0xb32fdb40 (LWP 13855)]
[New Thread 0xb28ffb40 (LWP 13856)]
[New Thread 0xb20feb40 (LWP 13857)]
[New Thread 0xb18fdb40 (LWP 13858)]
[New Thread 0xb10fcb40 (LWP 13859)]
[New Thread 0xb08fbb40 (LWP 13860)]
[New Thread 0xb00fab40 (LWP 13861)]
[New Thread 0xaf8f9b40 (LWP 13862)]
[New Thread 0xaf0f8b40 (LWP 13863)]
[New Thread 0xae8f7b40 (LWP 13864)]
[New Thread 0xae0f6b40 (LWP 13865)]
[New Thread 0xad8f5b40 (LWP 13866)]
[New Thread 0xad0f4b40 (LWP 13867)]
[New Thread 0xac8f3b40 (LWP 13868)]
[New Thread 0xac0f2b40 (LWP 13869)]
[New Thread 0xab8f1b40 (LWP 13870)]
[New Thread 0xab0f0b40 (LWP 13871)]
[New Thread 0xaa8efb40 (LWP 13872)]
[New Thread 0xaa0eeb40 (LWP 13873)]
[New Thread 0xa98edb40 (LWP 13874)]
[Thread 0xb3afeb40 (LWP 13854) exited]
[Thread 0xb42ffb40 (LWP 13853) exited]
[New Thread 0xb42ffb40 (LWP 13875)]
[New Thread 0xa90ecb40 (LWP 13876)]
[New Thread 0xa7affb40 (LWP 13877)]
[Thread 0xb32fdb40 (LWP 13855) exited]
[Thread 0xaa8efb40 (LWP 13872) exited]
[New Thread 0xa6effb40 (LWP 14011)]
assertion failed. Please file a bugreport at 
http://code.google.com/p/libtorrent/issues
Please include the following information:

version: 1.0.0.0
$Rev: 7680 $
file: 'libtorrent/src/peer_connection.cpp'
line: 3483
function: virtual void libtorrent::peer_connection::disconnect(const 
boost::system::error_code&, int)
expression: ec != error::invalid_argument || !m_outgoing

stack:
1: ) [0x80824d0]
2: ) [0x8147e9f]
3: ) [0x814ae48]
4: ) [0x815281e]
5: ) [0x8077d6d]
6: ) [0x807c050]
7: ) [0x81c10de]
8: ) [0x8070b31]
9: 
10: clone

Program received signal SIGINT, Interrupt.
[Switching to Thread 0xa90ecb40 (LWP 13876)]
0xb7fdd424 in __kernel_vsyscall ()

(gdb) backtrace
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb7a9dcee in raise (sig=2) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:38
#2  0x0808253b in assert_fail (expr=expr@entry=0x842d06c "ec != 
error::invalid_argument || !m_outgoing", line=line@entry=3483, 
    file=file@entry=0x842c3d8 "libtorrent/src/peer_connection.cpp", 
    function=function@entry=0x8430fe0 <libtorrent::peer_connection::disconnect(boost::system::error_code const&, int)::__PRETTY_FUNCTION__> "virtual void libtorrent::peer_connection::disconnect(const boost::system::error_code&, int)", value=value@entry=0x0) at libtorrent/src/assert.cpp:251
#3  0x08147e9f in libtorrent::peer_connection::disconnect (this=0xa71d6ef8, 
ec=..., error=0) at libtorrent/src/peer_connection.cpp:3483
#4  0x0814ae48 in libtorrent::peer_connection::on_receive_data 
(this=0xa71d6ef8, error=..., bytes_transferred=0) at 
libtorrent/src/peer_connection.cpp:5285
#5  0x0815281e in call<boost::intrusive_ptr<libtorrent::peer_connection> const, 
boost::system::error_code const, unsigned int> (b2=<synthetischer Zeiger>, 
    b1=..., u=..., this=0xa90ec1a4) at /usr/include/boost/bind/mem_fn_template.hpp:271
#6  operator()<boost::intrusive_ptr<libtorrent::peer_connection> > 
(a2=<optimized out>, a1=..., u=..., this=0xa90ec1a4)
    at /usr/include/boost/bind/mem_fn_template.hpp:294
#7  operator()<boost::_mfi::mf2<void, libtorrent::peer_connection, const 
boost::system::error_code&, unsigned int>, boost::_bi::list2<const 
boost::system::error_code&, unsigned int const&> > (a=<synthetischer Zeiger>, 
f=..., this=0xa90ec1ac) at /usr/include/boost/bind/bind.hpp:397
#8  operator()<boost::system::error_code, unsigned int> (a2=@0xa90ec1bc: 0, 
a1=..., this=0xa90ec1a4) at /usr/include/boost/bind/bind_template.hpp:108
#9  operator()<boost::system::error_code, unsigned int> (a1=@0xa90ec1bc: 0, 
a0=..., this=0xa90ec1a4)
    at ./libtorrent/include/libtorrent/peer_connection.hpp:1241
#10 operator() (this=0xa90ec1a4) at 
/usr/include/boost/asio/detail/bind_handler.hpp:118
#11 
asio_handler_invoke<boost::asio::detail::binder2<libtorrent::peer_connection::al
locating_handler<boost::_bi::bind_t<void, boost::_mfi::mf2<void, 
libtorrent::peer_connection, boost::system::error_code const&, unsigned int>, 
boost::_bi::list3<boost::_bi::value<boost::intrusive_ptr<libtorrent::peer_connec
tion> >, boost::arg<1>, boost::arg<2> > >, 330u>, boost::system::error_code, 
unsigned int> > (
    function=<Fehler beim Lesen der Variable: access outside bounds of object referenced via synthetic pointer>)
    at /usr/include/boost/asio/handler_invoke_hook.hpp:64
#12 
invoke<boost::asio::detail::binder2<libtorrent::peer_connection::allocating_hand
ler<boost::_bi::bind_t<void, boost::_mfi::mf2<void, 
libtorrent::peer_connection, boost::system::error_code const&, unsigned int>, 
boost::_bi::list3<boost::_bi::value<boost::intrusive_ptr<libtorrent::peer_connec
tion> >, boost::arg<1>, boost::arg<2> > >, 330u>, boost::system::error_code, 
unsigned int>, 
libtorrent::peer_connection::allocating_handler<boost::_bi::bind_t<void, 
boost::_mfi::mf2<void, libtorrent::peer_connection, boost::system::error_code 
const&, unsigned int>, 
boost::_bi::list3<boost::_bi::value<boost::intrusive_ptr<libtorrent::peer_connec
tion> >, boost::arg<1>, boost::arg<2> > >, 330u> > (context=..., function=...) 
at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39
#13 
boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, 
libtorrent::peer_connection::allocating_handler<boost::_bi::bind_t<void, 
boost::_mfi::mf2<void, libtorrent::peer_connection, boost::system::error_code 
const&, unsigned int>, 
boost::_bi::list3<boost::_bi::value<boost::intrusive_ptr<libtorrent::peer_connec
tion> >, boost::arg<1>, boost::arg<2> > >, 330u> >::do_complete 
(owner=0xb430bd40, base=0xa71d7200)
    at /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp:110
#14 0x08077d6d in complete (bytes_transferred=<optimized out>, ec=..., 
owner=..., this=0xa7047df8)
    at /usr/include/boost/asio/detail/task_io_service_operation.hpp:37
#15 boost::asio::detail::task_io_service::do_run_one 
(this=this@entry=0xb430bd40, lock=..., this_thread=..., ec=...)
    at /usr/include/boost/asio/detail/impl/task_io_service.ipp:412
#16 0x0807c050 in boost::asio::detail::task_io_service::run (this=0xb430bd40, 
ec=...) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:153
#17 0x0807c210 in boost::asio::io_service::run (this=<optimized out>, 
this@entry=0xb430ccc4, ec=...) at /usr/include/boost/asio/impl/io_service.ipp:66
#18 0x081c10de in libtorrent::aux::session_impl::main_thread (this=0xb430c960) 
at libtorrent/src/session_impl.cpp:4858
---Type <return> to continue, or q <return> to quit---
#19 0x08070b31 in boost::asio::detail::boost_asio_detail_posix_thread_function 
(arg=0xb4310a90) at /usr/include/boost/asio/detail/impl/posix_thread.ipp:64
#20 0xb7a95d78 in start_thread (arg=0xa90ecb40) at pthread_create.c:311
#21 0xb788301e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

(gdb) where
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb7a9dcee in raise (sig=2) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:38
#2  0x0808253b in assert_fail (expr=expr@entry=0x842d06c "ec != 
error::invalid_argument || !m_outgoing", line=line@entry=3483, 
    file=file@entry=0x842c3d8 "libtorrent/src/peer_connection.cpp", 
    function=function@entry=0x8430fe0 <libtorrent::peer_connection::disconnect(boost::system::error_code const&, int)::__PRETTY_FUNCTION__> "virtual void libtorrent::peer_connection::disconnect(const boost::system::error_code&, int)", value=value@entry=0x0) at libtorrent/src/assert.cpp:251
#3  0x08147e9f in libtorrent::peer_connection::disconnect (this=0xa71d6ef8, 
ec=..., error=0) at libtorrent/src/peer_connection.cpp:3483
#4  0x0814ae48 in libtorrent::peer_connection::on_receive_data 
(this=0xa71d6ef8, error=..., bytes_transferred=0) at 
libtorrent/src/peer_connection.cpp:5285
#5  0x0815281e in call<boost::intrusive_ptr<libtorrent::peer_connection> const, 
boost::system::error_code const, unsigned int> (b2=<synthetischer Zeiger>, 
    b1=..., u=..., this=0xa90ec1a4) at /usr/include/boost/bind/mem_fn_template.hpp:271
#6  operator()<boost::intrusive_ptr<libtorrent::peer_connection> > 
(a2=<optimized out>, a1=..., u=..., this=0xa90ec1a4)
    at /usr/include/boost/bind/mem_fn_template.hpp:294
#7  operator()<boost::_mfi::mf2<void, libtorrent::peer_connection, const 
boost::system::error_code&, unsigned int>, boost::_bi::list2<const 
boost::system::error_code&, unsigned int const&> > (a=<synthetischer Zeiger>, 
f=..., this=0xa90ec1ac) at /usr/include/boost/bind/bind.hpp:397
#8  operator()<boost::system::error_code, unsigned int> (a2=@0xa90ec1bc: 0, 
a1=..., this=0xa90ec1a4) at /usr/include/boost/bind/bind_template.hpp:108
#9  operator()<boost::system::error_code, unsigned int> (a1=@0xa90ec1bc: 0, 
a0=..., this=0xa90ec1a4)
    at ./libtorrent/include/libtorrent/peer_connection.hpp:1241
#10 operator() (this=0xa90ec1a4) at 
/usr/include/boost/asio/detail/bind_handler.hpp:118
#11 
asio_handler_invoke<boost::asio::detail::binder2<libtorrent::peer_connection::al
locating_handler<boost::_bi::bind_t<void, boost::_mfi::mf2<void, 
libtorrent::peer_connection, boost::system::error_code const&, unsigned int>, 
boost::_bi::list3<boost::_bi::value<boost::intrusive_ptr<libtorrent::peer_connec
tion> >, boost::arg<1>, boost::arg<2> > >, 330u>, boost::system::error_code, 
unsigned int> > (
    function=<Fehler beim Lesen der Variable: access outside bounds of object referenced via synthetic pointer>)
    at /usr/include/boost/asio/handler_invoke_hook.hpp:64
#12 
invoke<boost::asio::detail::binder2<libtorrent::peer_connection::allocating_hand
ler<boost::_bi::bind_t<void, boost::_mfi::mf2<void, 
libtorrent::peer_connection, boost::system::error_code const&, unsigned int>, 
boost::_bi::list3<boost::_bi::value<boost::intrusive_ptr<libtorrent::peer_connec
tion> >, boost::arg<1>, boost::arg<2> > >, 330u>, boost::system::error_code, 
unsigned int>, 
libtorrent::peer_connection::allocating_handler<boost::_bi::bind_t<void, 
boost::_mfi::mf2<void, libtorrent::peer_connection, boost::system::error_code 
const&, unsigned int>, 
boost::_bi::list3<boost::_bi::value<boost::intrusive_ptr<libtorrent::peer_connec
tion> >, boost::arg<1>, boost::arg<2> > >, 330u> > (context=..., function=...) 
at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39
#13 
boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, 
libtorrent::peer_connection::allocating_handler<boost::_bi::bind_t<void, 
boost::_mfi::mf2<void, libtorrent::peer_connection, boost::system::error_code 
const&, unsigned int>, 
boost::_bi::list3<boost::_bi::value<boost::intrusive_ptr<libtorrent::peer_connec
tion> >, boost::arg<1>, boost::arg<2> > >, 330u> >::do_complete 
(owner=0xb430bd40, base=0xa71d7200)
    at /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp:110
#14 0x08077d6d in complete (bytes_transferred=<optimized out>, ec=..., 
owner=..., this=0xa7047df8)
    at /usr/include/boost/asio/detail/task_io_service_operation.hpp:37
#15 boost::asio::detail::task_io_service::do_run_one 
(this=this@entry=0xb430bd40, lock=..., this_thread=..., ec=...)
    at /usr/include/boost/asio/detail/impl/task_io_service.ipp:412
#16 0x0807c050 in boost::asio::detail::task_io_service::run (this=0xb430bd40, 
ec=...) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:153
#17 0x0807c210 in boost::asio::io_service::run (this=<optimized out>, 
this@entry=0xb430ccc4, ec=...) at /usr/include/boost/asio/impl/io_service.ipp:66
#18 0x081c10de in libtorrent::aux::session_impl::main_thread (this=0xb430c960) 
at libtorrent/src/session_impl.cpp:4858
---Type <return> to continue, or q <return> to quit---
#19 0x08070b31 in boost::asio::detail::boost_asio_detail_posix_thread_function 
(arg=0xb4310a90) at /usr/include/boost/asio/detail/impl/posix_thread.ipp:64
#20 0xb7a95d78 in start_thread (arg=0xa90ecb40) at pthread_create.c:311
#21 0xb788301e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

(gdb) thread apply all bt
see this at: 
http://skilledtests.com/twister/libtorrent_assertion_620.txt

Original comment by erka...@gmail.com on 17 May 2014 at 8:01