Closed waTeim closed 6 years ago
Other (asio) threads
gdb) thread 17
[Switching to thread 17 (Thread 0x7f6360a78700 (LWP 10238))]
#0 0x00007f636aa3a0c3 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
84 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) where
#0 0x00007f636aa3a0c3 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
#1 0x000000000071da37 in boost::asio::detail::epoll_reactor::run (this=0x19de170, block=<optimized out>, ops=...) at /usr/local/include/boost/asio/detail/impl/epoll_reactor.ipp:416
#2 0x000000000074c4e8 in boost::asio::detail::task_io_service::do_run_one (ec=..., this_thread=..., lock=..., this=0x19d9d10) at /usr/local/include/boost/asio/detail/impl/task_io_service.ipp:356
#3 boost::asio::detail::task_io_service::run (ec=..., this=0x19d9d10) at /usr/local/include/boost/asio/detail/impl/task_io_service.ipp:149
#4 boost::asio::io_service::run (this=<optimized out>) at /usr/local/include/boost/asio/impl/io_service.ipp:59
#5 0x00000000007295ff in boost::asio::detail::boost_asio_detail_posix_thread_function (arg=0x19e0620) at /usr/local/include/boost/asio/detail/impl/posix_thread.ipp:64
#6 0x00007f636b594494 in start_thread (arg=0x7f6360a78700) at pthread_create.c:333
#7 0x00007f636aa39acf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
(gdb) thread 18
[Switching to thread 18 (Thread 0x7f6360277700 (LWP 10239))]
#0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
225 ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: No such file or directory.
(gdb) where
#0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1 0x00000000007de934 in libtorrent::condition_variable::wait_for (this=this@entry=0x19dad00, l=..., rel_time=rel_time@entry=...) at thread.cpp:92
#2 0x00000000008bf8d7 in libtorrent::alert_manager::wait_for_alert (this=0x19dacd8, max_wait=...) at alert_manager.cpp:67
(gdb) thread 19
[Switching to thread 19 (Thread 0x7f635fa76700 (LWP 10240))]
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
185 ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: No such file or directory.
(gdb) where
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x000000000071e2c8 in boost::asio::detail::posix_event::wait<boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex> > (lock=..., this=0x19ddfc8) at /usr/local/include/boost/asio/detail/posix_event.hpp:106
#2 boost::asio::detail::task_io_service::do_run_one (ec=..., this_thread=..., lock=..., this=<optimized out>) at /usr/local/include/boost/asio/detail/impl/task_io_service.ipp:380
#3 boost::asio::detail::task_io_service::run (this=0x19ddf70, ec=...) at /usr/local/include/boost/asio/detail/impl/task_io_service.ipp:149
#4 0x0000000000791346 in boost::asio::io_service::run (this=0x19ddf00) at /usr/local/include/boost/asio/impl/io_service.ipp:59
#5 boost::asio::detail::resolver_service_base::work_io_service_runner::operator() (this=<optimized out>) at /usr/local/include/boost/asio/detail/impl/resolver_service_base.ipp:32
#6 boost::asio::detail::posix_thread::func<boost::asio::detail::resolver_service_base::work_io_service_runner>::run (this=<optimized out>) at /usr/local/include/boost/asio/detail/posix_thread.hpp:82
#7 0x00000000007295ff in boost::asio::detail::boost_asio_detail_posix_thread_function (arg=0x7f6358001120) at /usr/local/include/boost/asio/detail/impl/posix_thread.ipp:64
#8 0x00007f636b594494 in start_thread (arg=0x7f635fa76700) at pthread_create.c:333
#9 0x00007f636aa39acf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
Threads 20,21, and 22 have the same stack trace
(gdb) thread 20
[Switching to thread 20 (Thread 0x7f635f275700 (LWP 10241))]
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
185 in ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
(gdb) where
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x000000000078d72c in libtorrent::thread_pool<libtorrent::socket_job>::thread_fun (this=0x7f6358001bb0, thread_id=0) at ../include/libtorrent/thread_pool.hpp:120
#2 0x00000000007295ff in boost::asio::detail::boost_asio_detail_posix_thread_function (arg=0x7f6358001500) at /usr/local/include/boost/asio/detail/impl/posix_thread.ipp:64
#3 0x00007f636b594494 in start_thread (arg=0x7f635f275700) at pthread_create.c:333
#4 0x00007f636aa39acf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
Thread 23 is the one shown above
Threads 24 through 35 have the same stack trace
(gdb) thread 24
[Switching to thread 24 (Thread 0x7f635d271700 (LWP 10245))]
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
185 ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: No such file or directory.
(gdb) where
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x000000000078d72c in libtorrent::thread_pool<libtorrent::socket_job>::thread_fun (this=0x7f6358002ee0, thread_id=0) at ../include/libtorrent/thread_pool.hpp:120
#2 0x00000000007295ff in boost::asio::detail::boost_asio_detail_posix_thread_function (arg=0x7f63580032b0) at /usr/local/include/boost/asio/detail/impl/posix_thread.ipp:64
#3 0x00007f636b594494 in start_thread (arg=0x7f635d271700) at pthread_create.c:333
#4 0x00007f636aa39acf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
Threads 36 through 39 have the same
(gdb) thread 36
[Switching to thread 36 (Thread 0x7f634abd8700 (LWP 10259))]
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
185 in ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
(gdb) where
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x0000000000728089 in libtorrent::disk_io_thread::thread_fun (this=0x19dae00, thread_id=0, type=libtorrent::disk_io_thread::generic_thread, w=...) at disk_io_thread.cpp:3264
#2 0x0000000000729e41 in boost::_mfi::mf3<void, libtorrent::disk_io_thread, int, libtorrent::disk_io_thread::thread_type_t, boost::shared_ptr<boost::asio::io_service::work> >::operator() (a3=..., a2=<optimized out>, a1=<optimized out>, p=<optimized out>, this=<optimized out>)
at /usr/local/include/boost/bind/mem_fn_template.hpp:393
#3 boost::_bi::list4<boost::_bi::value<libtorrent::disk_io_thread*>, boost::_bi::value<int>, boost::_bi::value<libtorrent::disk_io_thread::thread_type_t>, boost::_bi::value<boost::shared_ptr<boost::asio::io_service::work> > >::operator()<boost::_mfi::mf3<void, libtorrent::disk_io_thread, int, libtorrent::disk_io_thread::thread_type_t, boost::shared_ptr<boost::asio::io_service::work> >, boost::_bi::list0> (a=<synthetic pointer>..., f=..., this=<optimized out>) at /usr/local/include/boost/bind/bind.hpp:463
#4 boost::_bi::bind_t<void, boost::_mfi::mf3<void, libtorrent::disk_io_thread, int, libtorrent::disk_io_thread::thread_type_t, boost::shared_ptr<boost::asio::io_service::work> >, boost::_bi::list4<boost::_bi::value<libtorrent::disk_io_thread*>, boost::_bi::value<int>, boost::_bi::value<libtorrent::disk_io_thread::thread_type_t>, boost::_bi::value<boost::shared_ptr<boost::asio::io_service::work> > > >::operator() (this=<optimized out>) at /usr/local/include/boost/bind/bind_template.hpp:20
#5 boost::asio::detail::posix_thread::func<boost::_bi::bind_t<void, boost::_mfi::mf3<void, libtorrent::disk_io_thread, int, libtorrent::disk_io_thread::thread_type_t, boost::shared_ptr<boost::asio::io_service::work> >, boost::_bi::list4<boost::_bi::value<libtorrent::disk_io_thread*>, boost::_bi::value<int>, boost::_bi::value<libtorrent::disk_io_thread::thread_type_t>, boost::_bi::value<boost::shared_ptr<boost::asio::io_service::work> > > > >::run (this=<optimized out>) at /usr/local/include/boost/asio/detail/posix_thread.hpp:82
#6 0x00000000007295ff in boost::asio::detail::boost_asio_detail_posix_thread_function (arg=0x7f6358007890) at /usr/local/include/boost/asio/detail/impl/posix_thread.ipp:64
#7 0x00007f636b594494 in start_thread (arg=0x7f634abd8700) at pthread_create.c:333
#8 0x00007f636aa39acf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
try setting settings_pack::network_threads
to 0
done, testing now. this takes from 1 to 5 days to occur so have 2 populations -- one with network_threads
set to 0 and the other the previous value of 16. Will return with results.
in fact, the network thread feature has been removed in master, and deliberately defaulted to 0 in 1.1.x, because it doesn't work.
Haha, ok, well then as a followup, here are the results. After a week, I found that out of the population with network-threads set to a non zero value there were 5 crashes and in the population where it was set to 0, there were 0 crashes.
Please provide the following information
libtorrent version (or branch):
libtorrent 1.1.4 boost 1.64
platform/architecture:
compiler and compiler version:
please describe what symptom you see, what you would expect to see instead and how to reproduce it.
This is possibly out of the scope of libtorrent, but specific guards might be included to avoid it, or some warning how it may occur.
This seems likely to the known boost asio problem 7611
Here's the stack trace.