maikonnm / libtorrent

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

ASSERT hit on startup (policy.hpp) #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. the crash happens on startup

What is the expected output? What do you see instead?
Should not hit the ASSERT

What version of the product are you using? On what operating system?
libtorrent v0.15svn

Please provide any additional information below.
version: 0.15.0.0
$Rev: 3323 $
file: 'policy.cpp'
line: 1205
function: bool libtorrent::policy::has_connection(const 
libtorrent::peer_connection*)
expression: c->remote() == c->get_socket()->remote_endpoint(ec) || ec
stack:
1: assert_fail(char const*, int, char const*, char const*)
2: libtorrent::policy::has_connection(libtorrent::peer_connection const*)
3: libtorrent::aux::session_impl::check_invariant() const
4: libtorrent::invariant_checker_impl<libtorrent::aux::session_impl> 
libtorrent::make_invariant_checker<libtorrent::aux::session_impl>(libtorren
t::aux::session_impl const&)
5: libtorrent::aux::session_impl::recalculate_unchoke_slots(int, int)
6: libtorrent::aux::session_impl::on_tick(boost::system::error_code const&)
7: 
boost::asio::detail::handler_queue::handler_wrapper<boost::asio::detail::bi
nder1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, 
libtorrent::aux::session_impl, boost::system::error_code const&>, 
boost::_bi::list2<boost::_bi::value<libtorrent::aux::session_impl*>, 
boost::arg<1> > >, boost::system::error_code> 
>::do_call(boost::asio::detail::handler_queue::handler*)
8: 
boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<fal
se> >::run(boost::system::error_code&)
9: libtorrent::aux::session_impl::operator()()
10: 
boost::detail::thread_data<boost::reference_wrapper<libtorrent::aux::sessio
n_impl> >::run()
11: thread_proxy
12: 
13: clone

Program received signal SIGINT, Interrupt.
[Switching to Thread 0xb7491b70 (LWP 12028)]
0x00d76422 in __kernel_vsyscall ()
(gdb) bt 25
#0  0x00d76422 in __kernel_vsyscall ()
#1  0x006b8170 in raise (sig=2) at ../nptl/sysdeps/unix/sysv/linux/pt-
raise.c:42
#2  0x010ab734 in assert_fail (expr=0x13a7358 "c->remote() == c-
>get_socket()->remote_endpoint(ec) || ec", line=1205, file=0x13a6e5b 
"policy.cpp", 
    function=0x13a75c0 "bool libtorrent::policy::has_connection(const 
libtorrent::peer_connection*)") at assert.cpp:136
#3  0x011b46cf in libtorrent::policy::has_connection (this=0x8867260, 
c=0xb5a9d178) at policy.cpp:1205
#4  0x011c2463 in libtorrent::aux::session_impl::check_invariant 
(this=0x8691410) at session_impl.cpp:3362
#5  0x011dd967 in 
libtorrent::invariant_checker_impl<libtorrent::aux::session_impl> 
libtorrent::make_invariant_checker<libtorrent::aux::session_impl>(libtorren
t::aux::session_impl const&) () from /usr/lib/libtorrent-rasterbar.so.6
#6  0x011d50ef in libtorrent::aux::session_impl::recalculate_unchoke_slots 
(this=0x8691410, congested_torrents=0, uncongested_torrents=4)
    at session_impl.cpp:2191
#7  0x011d782b in libtorrent::aux::session_impl::on_tick (this=0x8691410, 
e=...) at session_impl.cpp:1923
#8  0x011da21b in 
boost::asio::detail::handler_queue::handler_wrapper<boost::asio::detail::bi
nder1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, 
libtorrent::aux::session_impl, boost::system::error_code const&>, 
boost::_bi::list2<boost::_bi::value<libtorrent::aux::session_impl*>, 
boost::arg<1> > >, boost::system::error_code> 
>::do_call(boost::asio::detail::handler_queue::handler*) () from 
/usr/lib/libtorrent-rasterbar.so.6
#9  0x011110d7 in 
boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<fal
se> >::run(boost::system::error_code&) ()
   from /usr/lib/libtorrent-rasterbar.so.6
#10 0x011d4ef2 in boost::asio::io_service::run (this=0x8691410) at 
/usr/include/boost/asio/impl/io_service.ipp:65
#11 libtorrent::aux::session_impl::operator() (this=0x8691410) at 
session_impl.cpp:2370
#12 0x011e44d3 in 
boost::detail::thread_data<boost::reference_wrapper<libtorrent::aux::sessio
n_impl> >::run() () from /usr/lib/libtorrent-rasterbar.so.6
#13 0x007c3ab5 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
#14 0x006af8de in start_thread (arg=0xb7491b70) at pthread_create.c:300
#15 0x0152f8fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Original issue reported on code.google.com by dch...@gmail.com on 19 Jan 2010 at 12:42

GoogleCodeExporter commented 9 years ago
Is this a torrent with web seeds?

Original comment by arvid.no...@gmail.com on 19 Jan 2010 at 12:52

GoogleCodeExporter commented 9 years ago
The crash happens on startup before I even see the torrents. I don't even know 
what
torrents are added to my list (I probably have several). This is my development
machine, I usually add some random torrents for testing.

Original comment by dch...@gmail.com on 19 Jan 2010 at 7:56

GoogleCodeExporter commented 9 years ago
Now it is running for some reason (I did not change anything).

I see that there is a torrent with a lot of seeds (37952) and peers (28492).

Original comment by dch...@gmail.com on 19 Jan 2010 at 9:21

GoogleCodeExporter commented 9 years ago
Still happening here. I deleted my torrents. And now it crashes just after I add
random magnet links from thepiratebay.org. It crashes before the torrent even 
gets
its metadata.

The torrents I added do not have many peers/seeds.

Original comment by dch...@gmail.com on 19 Jan 2010 at 11:53

GoogleCodeExporter commented 9 years ago
Can you tell me what state the connection is in that fails? just dump the whole 
object in gdb

Original comment by arvid.no...@gmail.com on 20 Jan 2010 at 12:37

GoogleCodeExporter commented 9 years ago
Here it is: http://pastebin.ca/1758598

Original comment by dch...@gmail.com on 20 Jan 2010 at 7:48

GoogleCodeExporter commented 9 years ago
I have just noticed that I had an invalid proxy enabled for Peer connections. I
enabled one for testing purpose and I forgot about it.

I think the crash with 0.15 may be linked to this (v0.14.8 is fine though, I 
reverted
to v0.14.8 for now).

Original comment by dch...@gmail.com on 24 Jan 2010 at 5:02

GoogleCodeExporter commented 9 years ago
What kind of proxy did you use? http? socks5, socks4?

Original comment by arvid.no...@gmail.com on 24 Jan 2010 at 5:18

GoogleCodeExporter commented 9 years ago
Ok. I confirm that it is a proxy problem. I have just retested.

It only crashes if I set an HTTP proxy for peer connections.

Original comment by dch...@gmail.com on 24 Jan 2010 at 5:41

GoogleCodeExporter commented 9 years ago
May be reproduceable on your side.

I set proxy.utbm.fr:3128 as proxy (without authentication).

Original comment by dch...@gmail.com on 24 Jan 2010 at 5:42