- Notifications
You must be signed in to change notification settings - Fork425
Description
If we specify a non-resolvable hostname when trying to send a "DELETE" http request, the exception of Host Not Found is generated however the call to join in the destructor of the async_impl class never returns and thread will remain, eventually if we continue running in this mode we will run out of memory due to keeping these threads alive... When reproducing this issue we see hundreds of threads with the backtrace below:
#0 0xffffe402 in __kernel_vsyscall ()
#1 0x008de779 in __lll_lock_wait () from /lib/libpthread.so.0
#2 0x008d9ddf inL_lock_885 () from /lib/libpthread.so.0
#3 0x008d9ca6 in pthread_mutex_lock () from /lib/libpthread.so.0
#4 0x080c4fc8 in boost::mutex::lock (this=0xefb91298) at /builds/ExternalLibs/boost/V1_48_0/boost/thread/pthread/mutex.hpp:52
#5 0x080c50d5 in boost::lock_guardboost::mutex::lock_guard (this=0xdb0e4e90, m=...)
at /builds/ExternalLibs/boost/V1_48_0/boost/thread/locks.hpp:257
#6 0x080dd126 in boost::detail::interruption_checker::interruption_checker(._9 *, ._12 *) (this=0xdb0e4ebc, cond_mutex=0xefb912b0,
cond=0xefb912c8) at /builds/ExternalLibs/boost/V1_48_0/boost/thread/pthread/thread_data.hpp:101
#7 0x080dd221 in boost::condition_variable::wait (this=0xefb912b0, m=...)
at /builds/ExternalLibs/boost/V1_48_0/boost/thread/pthread/condition_variable.hpp:53
#8 0x088044c1 in boost::thread::join() ()
#9 0x08196b33 in boost::network::http::impl::async_client<boost::network::http::tags::http_async_8bit_udp_resolve, 1u, 1u>::~async_client
(this=0xefb93e98, __in_chrg=<value optimized out>)at /home/rrobertelli/cpp-netlib-0.9-devel/boost/network/protocol/http/client/async_impl.hpp:71
#10 0x08196db9 in boost::network::http::basic_client_impl<boost::network::http::tags::http_async_8bit_udp_resolve, 1u, 1u>::~basic_client_impl (this=0xefb93e98, __in_chrg=)
at /home/rrobertelli/cpp-netlib-0.9-devel/boost/network/protocol/http/client/pimpl.hpp:74
#11 0x08196dd9 in boost::checked_delete<boost::network::http::basic_client_impl<boost::network::http::tags::http_async_8bit_udp_resolve, 1u, 1u> > (x=0xefb93e98) at /builds/ExternalLibs/boost/V1_48_0/boost/checked_delete.hpp:34
Any information on how to work around this problem would be greatly appreciated...
Thanks,
Robert