y500 / libtorrent

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

crash for 0.14.8 + qbittorrent 2.1.3 on x86_64 #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
related information:
boost version = 1.39.0
$ uname -a
Linux breeze.localdomain 2.6.30-std-def-alt15 #1 SMP Mon Dec 14 08:46:35
UTC 2009 x86_64 GNU/Linux

also
https://bugs.launchpad.net/qbittorrent/+bug/517062
=========================================
*************************************************************
Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org
and provide the following backtrace:
stack trace:
  /lib64/libc.so.6 [0x7fca6173d070]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::detail::timer_queue<boost::asio::time_traits<libtorrent::ptime> 
>::cancel_timer(void*)+0x78
 [0x7fca63f7ae2e]
  /usr/lib64/libtorrent-rasterbar.so.5 : unsigned long
boost::asio::detail::epoll_reactor<false>::cancel_timer<boost::asio::time_traits
<libtorrent::ptime>
>(boost::asio::detail::timer_queue<boost::asio::time_traits<libtorrent::ptime>
>&, void*)+0x41  [0x7fca63f79c95]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::detail::deadline_timer_service<boost::asio::time_traits<libtorrent:
:ptime>,
boost::asio::detail::epoll_reactor<false>
>::cancel(boost::asio::detail::deadline_timer_service<boost::asio::time_traits<l
ibtorrent::ptime>,
boost::asio::detail::epoll_reactor<false> >::implementation_type&,
boost::system::error_code&)+0x6b  [0x7fca63f78a11]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::detail::deadline_timer_service<boost::asio::time_traits<libtorrent:
:ptime>,
boost::asio::detail::epoll_reactor<false>
>::expires_at(boost::asio::detail::deadline_timer_service<boost::asio::time_trai
ts<libtorrent::ptime>,
boost::asio::detail::epoll_reactor<false> >::implementation_type&,
libtorrent::ptime const&, boost::system::error_code&)+0x2f  [0x7fca63f79d1b]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::detail::deadline_timer_service<boost::asio::time_traits<libtorrent:
:ptime>,
boost::asio::detail::epoll_reactor<false>
>::expires_from_now(boost::asio::detail::deadline_timer_service<boost::asio::tim
e_traits<libtorrent::ptime>,
boost::asio::detail::epoll_reactor<false> >::implementation_type&,
libtorrent::time_duration const&, boost::system::error_code&)+0x4c 
[0x7fca63f78ce0]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::deadline_timer_service<libtorrent::ptime,
boost::asio::time_traits<libtorrent::ptime>
>::expires_from_now(boost::asio::detail::deadline_timer_service<boost::asio::tim
e_traits<libtorrent::ptime>,
boost::asio::detail::epoll_reactor<false> >::implementation_type&,
libtorrent::time_duration const&, boost::system::error_code&)+0x38 
[0x7fca63f77ae0]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::basic_deadline_timer<libtorrent::ptime,
boost::asio::time_traits<libtorrent::ptime>,
boost::asio::deadline_timer_service<libtorrent::ptime,
boost::asio::time_traits<libtorrent::ptime> >
>::expires_from_now(libtorrent::time_duration const&,
boost::system::error_code&)+0x37  [0x7fca63f7681f]
  /usr/lib64/libtorrent-rasterbar.so.5 :
libtorrent::torrent::on_lsd_announce()+0x169  [0x7fca64003237]
  /usr/lib64/libtorrent-rasterbar.so.5 :
libtorrent::torrent::on_lsd_announce_disp(boost::weak_ptr<libtorrent::torrent>,
boost::system::error_code const&)+0x67  [0x7fca6400308d]
  /usr/lib64/libtorrent-rasterbar.so.5 : void
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> >::operator()<void (*)(boost::weak_ptr<libtorrent::torrent>,
boost::system::error_code const&),
boost::_bi::list1<boost::system::error_code&> >(boost::_bi::type<void>,
void (*&)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&), boost::_bi::list1<boost::system::error_code&>&, int)+0x79 
[0x7fca6404ef79]
  /usr/lib64/libtorrent-rasterbar.so.5 : void boost::_bi::bind_t<void, void
(*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> >
>::operator()<boost::system::error_code>(boost::system::error_code&)+0x4a 
[0x7fca6404ed7c]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::detail::binder1<boost::_bi::bind_t<void, void
(*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code>::operator()()+0x23 
[0x7fca6404e8a9]
  /usr/lib64/libtorrent-rasterbar.so.5 : void
boost::asio::asio_handler_invoke<boost::asio::detail::binder1<boost::_bi::bind_t
<void,
void (*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code>
>(boost::asio::detail::binder1<boost::_bi::bind_t<void, void
(*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code>, ...)+0x7f  [0x7fca6404d573]
  /usr/lib64/libtorrent-rasterbar.so.5 : void
boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder1<boost::_b
i::bind_t<void,
void (*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code>, boost::_bi::bind_t<void,
void (*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > > >(boost::asio::detail::binder1<boost::_bi::bind_t<void,
void (*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code> const&,
boost::_bi::bind_t<void, void (*)(boost::weak_ptr<libtorrent::torrent>,
boost::system::error_code const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >*)+0x3e  [0x7fca6404c7bf]
  /usr/lib64/libtorrent-rasterbar.so.5 : void
boost::asio::detail::asio_handler_invoke<boost::asio::detail::binder1<boost::_bi
::bind_t<void,
void (*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code>, boost::_bi::bind_t<void,
void (*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >,
boost::system::error_code>(boost::asio::detail::binder1<boost::_bi::bind_t<void,
void (*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code> const&,
boost::asio::detail::binder1<boost::_bi::bind_t<void, void
(*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code>*)+0x23  [0x7fca6404b15f]
  /usr/lib64/libtorrent-rasterbar.so.5 : void
boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder1<boost::_b
i::bind_t<void,
void (*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code>,
boost::asio::detail::binder1<boost::_bi::bind_t<void, void
(*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code>
>(boost::asio::detail::binder1<boost::_bi::bind_t<void, void
(*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code> const&,
boost::asio::detail::binder1<boost::_bi::bind_t<void, void
(*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code>*)+0x23  [0x7fca6404a9c8]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::detail::handler_queue::handler_wrapper<boost::asio::detail::binder1
<boost::_bi::bind_t<void,
void (*)(boost::weak_ptr<libtorrent::torrent>, boost::system::error_code
const&),
boost::_bi::list2<boost::_bi::value<boost::weak_ptr<libtorrent::torrent> >,
boost::arg<1> > >, boost::system::error_code>
>::do_call(boost::asio::detail::handler_queue::handler*)+0x68  [0x7fca6404931e]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::detail::handler_queue::handler::invoke()+0x1d  [0x7fca63f15c19]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false>
>::do_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&,
boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false>
>::idle_thread_info*, boost::system::error_code&)+0x277  [0x7fca63f2366d]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false>
>::run(boost::system::error_code&)+0xb5  [0x7fca63f1d8c9]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::io_service::run(boost::system::error_code&)+0x27  [0x7fca63fb5739]
  /usr/lib64/libtorrent-rasterbar.so.5 :
libtorrent::aux::session_impl::operator()()+0xa1  [0x7fca63faf033]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::detail::thread_data<boost::reference_wrapper<libtorrent::aux::session_imp
l>
>::run()+0x1f  [0x7fca63fe0dbf]
  /usr/lib64/libboost_thread.so.1.39.0 : thread_proxy()+0x60  [0x7fca610e9af0]
  /lib64/libpthread.so.0 [0x7fca635e851a]
  /lib64/libc.so.6 : clone()+0x6d  [0x7fca617d38ed]

Original issue reported on code.google.com by ivlase...@gmail.com on 4 Feb 2010 at 5:29

GoogleCodeExporter commented 8 years ago
Could you reproduce this crash with debug symbols enabled?
Are you sure this is the thread that triggered the SIGSEGV?

Original comment by arvid.no...@gmail.com on 4 Feb 2010 at 8:55

GoogleCodeExporter commented 8 years ago
> Could you reproduce this crash with debug symbols enabled?
you means, with debug symbols in boost libs?
libtorrent-rasterbar itself is built with -g and not stripped,
$ file /usr/lib64/libtorrent-rasterbar.so.5.0.0
/usr/lib64/libtorrent-rasterbar.so.5.0.0: ELF 64-bit LSB shared object, x86-64,
version 1 (SYSV), dynamically linked, not stripped
but it is linked with system boost libs, which are stripped.

> Are you sure this is the thread that triggered the SIGSEGV?
not sure. I am not used to gdb. 
It seems I have to read gdb docs about multithreaded debugging,
then I'll give more valuable feedback.

Original comment by ivlase...@gmail.com on 5 Feb 2010 at 8:15

GoogleCodeExporter commented 8 years ago
I'm really only interested in debug symbols for libtorrent. From the gdb 
output, it looks like it's only listing 
exported symbols, and no line numbers for instance. Please make sure that the 
libtorrent.so that's actually used 
has debug symbols. To dump the stack of every thread in gdb, run:

(gdb) thread apply all bt full

This will give a verbose state of all threads.

Original comment by arvid.no...@gmail.com on 5 Feb 2010 at 5:09

GoogleCodeExporter commented 8 years ago
Arvid, the original bug report was here:
https://bugs.launchpad.net/qbittorrent/+bug/517062

There is a backtrace with debug symbols (one thread only).

ivlasenko > Please get a backtrace for all threads:

gdb qbittorrent
> run
.. Wait for the crash ..
> thread apply all bt full
.. Will print a good backtrace for all threads ..

Original comment by dch...@gmail.com on 6 Feb 2010 at 10:19

GoogleCodeExporter commented 8 years ago
I am sorry for waiting, here is an example of full backtrace,
I hope to devote time to debugging this evening (GMT+2),
so I will be more useful.

Original comment by ivlase...@gmail.com on 7 Feb 2010 at 11:53

Attachments:

GoogleCodeExporter commented 8 years ago
sorry, forgot the crash message.

Program received signal SIGABRT, Aborted.
[Switching to Thread 140508415039760 (LWP 21198)]
0x00007fcab15f9ff5 in raise () from /lib64/libc.so.6

Original comment by ivlase...@gmail.com on 7 Feb 2010 at 11:56

GoogleCodeExporter commented 8 years ago
This happens when the main timer that drives the session fails. If you build 
libtorrent with logging enabled, the 
main_session.log will tell you why it failed.

This is considered a fatal error, resuming at this point would not buy you 
anything, since the session would be 
completely dead and nothing would work.

Please let me know what error message are printed to the log.

Original comment by arvid.no...@gmail.com on 8 Feb 2010 at 5:05

GoogleCodeExporter commented 8 years ago
Here they are, main_session.logs and gdb thread apply all bt full output.
there are two main_session.logs,
libtorrent_logs6881 looks normal,
note that last line in
libtorrent_logs0/main_session.log
is 
"cannot bind to interface '[::]:0' Wrong file descriptor"
where last phrase is translated according to locale (ru_RU).

Original comment by ivlase...@gmail.com on 9 Feb 2010 at 8:27

Attachments:

GoogleCodeExporter commented 8 years ago
my network interfaces
$ ifconfig 
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1464 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1464 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:188122 (183.7 KiB)  TX bytes:188122 (183.7 KiB)

net0      Link encap:Ethernet  HWaddr 00:22:15:D1:70:91  
          inet addr:195.--.--.--  Bcast:195.--.--.--  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1009341 errors:0 dropped:0 overruns:0 frame:0
          TX packets:443212 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1096265844 (1.0 GiB)  TX bytes:31141642 (29.6 MiB)
          Interrupt:28 Base address:0x2000 

tap0      Link encap:Ethernet  HWaddr 92:46:72:0C:DC:D6  
          inet addr:10.100.0.1  Bcast:0.0.0.0  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:1273 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

tap1      Link encap:Ethernet  HWaddr 42:6B:CD:2D:55:A4  
          inet addr:10.100.1.1  Bcast:0.0.0.0  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:1273 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Original comment by ivlase...@gmail.com on 9 Feb 2010 at 8:30

GoogleCodeExporter commented 8 years ago
These are two different errors. One where the second_timer fails, the other 
where there's a crash somewhere 
inside asio, possibly because a timer was destructed before the callback 
returned

Original comment by arvid.no...@gmail.com on 11 Feb 2010 at 1:48

GoogleCodeExporter commented 8 years ago
Ok, please, notify me when there will be possible fix, to test.

Original comment by ivlase...@gmail.com on 17 Feb 2010 at 9:25

GoogleCodeExporter commented 8 years ago
there is fresh logs for 0.14.9+qbittorrent 2.1.5
gdb backtrace is saved in gdb.log.

Original comment by ivlase...@gmail.com on 21 Feb 2010 at 4:30

Attachments:

GoogleCodeExporter commented 8 years ago
seems to be fixed in 0.14.10.

Original comment by ivlase...@gmail.com on 21 Mar 2010 at 5:39

GoogleCodeExporter commented 8 years ago
not completely. debug build fails on assert 
(http://code.google.com/p/libtorrent/issues/detail?id=49)
build without debug code failed with
boost::asio::detail::deadline_timer_service after mass pausing in qbittorrent 
gut,
it might be related.

 qbittorrent 
Peer ID: -qB2210-
HTTP user agent is qBittorrent v2.2.1
Warning: Local domain socket was not closed cleanly, deleting file...
*************************************************************
Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org
and provide the following backtrace:
stack trace:
  /lib64/libc.so.6 [0x7fc59a42f070]
  /usr/lib64/libtorrent-rasterbar.so.5 :
boost::asio::detail::deadline_timer_service<boost::asio::time_traits<libtorrent:
:ptime>,
boost::asio::detail::epoll_reactor<false>
>::cancel(boost::asio::detail::deadline_timer_service<boost::asio::time_traits<l
ibtorrent::ptime>,
boost::asio::detail::epoll_reactor<false> >::implementation_type&,
boost::system::error_code&)+0x88  [0x7fc59c65a0c6]
  /usr/lib64/libtorrent-rasterbar.so.5 : libtorrent::torrent::stop_announcing()+0x34
 [0x7fc59c68deba]
  /usr/lib64/libtorrent-rasterbar.so.5 : libtorrent::torrent::do_pause()+0x220 
[0x7fc59c68e120]
  /usr/lib64/libtorrent-rasterbar.so.5 : libtorrent::torrent::pause()+0x39 
[0x7fc59c68e95b]
  /usr/lib64/libtorrent-rasterbar.so.5 : libtorrent::torrent_handle::pause()
const+0x7b  [0x7fc59c6ae781]
  /usr/bin/qbittorrent : QTorrentHandle::pause()+0x2e  [0x50de5e]
  /usr/bin/qbittorrent : TransferListWidget::pauseSelectedTorrents()+0xf6  [0x5e5b26]
...

Original comment by ivlase...@gmail.com on 21 Mar 2010 at 7:54