forked fromglynos/cpp-netlib
- Notifications
You must be signed in to change notification settings - Fork425
Closed
Description
Examplesimple_wget
crashing from time to time with error:boost thread: trying joining itself: Resource deadlock avoided
How to reproduce
I turn off wi-fi and run command:simple_wget https://example.com/some/archive.tar.gz
Usually command exits with code 1 and message:
Saving to: archive.tar.gzHost not found (authoritative)
which is expected and good, but sometimes application crash in libc++ with message:
libc++abi.dylib: terminating with unexpected exception of type boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >: boost thread: trying joining itself: Resource deadlock avoidedProcess 75882 stopped
Backtrace can be foundhere
I can guess that exception which is thrown fromjoin
triggerstd::terminate
because destructor hasnothrow type (async_impl.h):
~async_client()throw () { sentinel_.reset();if (lifetime_thread_.get()) { lifetime_thread_->join();// BOOM! lifetime_thread_.reset(); } }
Some tests
- 5 crash from 1000 run
- 36 crash from 10000 run
Environment
- Mac OS X 10.9.1, boost 1.55 (debug build with libc++), openssl (system)
- iOS, boost 1.55 (debug build with libc++), openssl 1.0.1e
- I'm using
cpp-netlib-0.10.1
, butcpp-netlib-0.11.0-rc3
has same behaviour
Also I've tried it on my virtual machine with Mac OS X 10.8.5 (which not using wi-fi),
there isno crashes.
Metadata
Metadata
Assignees
Labels
No labels