diff options
author | luigi1111 <luigi1111w@gmail.com> | 2019-10-08 14:45:21 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2019-10-08 14:45:21 -0500 |
commit | b0840a8e01589901bc3908daeffcfc6eaa2950fa (patch) | |
tree | 7d458adf771128099657ef31508cf19889eb8330 /src/p2p/net_node.inl | |
parent | Merge pull request #5927 (diff) | |
parent | Request a thread stack size that is large enough for unbound (diff) | |
download | monero-b0840a8e01589901bc3908daeffcfc6eaa2950fa.tar.xz |
Merge pull request #5932
f3b65c6 Request a thread stack size that is large enough for unbound (omartijn)
Diffstat (limited to 'src/p2p/net_node.inl')
-rw-r--r-- | src/p2p/net_node.inl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index c3dca3f6c..bb77ea658 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -670,11 +670,18 @@ namespace nodetool std::vector<std::vector<std::string>> dns_results; dns_results.resize(m_seed_nodes_list.size()); + // some libc implementation provide only a very small stack + // for threads, e.g. musl only gives +- 80kb, which is not + // enough to do a resolve with unbound. we request a stack + // of 1 mb, which should be plenty + boost::thread::attributes thread_attributes; + thread_attributes.set_stack_size(1024*1024); + std::list<boost::thread> dns_threads; uint64_t result_index = 0; for (const std::string& addr_str : m_seed_nodes_list) { - boost::thread th = boost::thread([=, &dns_results, &addr_str] + boost::thread th = boost::thread(thread_attributes, [=, &dns_results, &addr_str] { MDEBUG("dns_threads[" << result_index << "] created for: " << addr_str); // TODO: care about dnssec avail/valid |