haven icon indicating copy to clipboard operation
haven copied to clipboard

High Memory Usage

Open blbruegg opened this issue 6 years ago • 2 comments

I believe seed nodes being down have created this issue. Needs an exception written, null_ptr, deconstructor etc for when this arrises.
valgrind -v --leak-check=full --show-leak-kinds=all ./havend --log-level 3 ==15074== ==15074== ==15074== 3318 errors in context 774 of 775: ==15074== Use of uninitialised value of size 8 ==15074== at 0x4C34163: memcpy@GLIBC_2.2.5 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==15074== by 0x598C560: __printf_fp_l (printf_fp.c:550) ==15074== by 0x5989A06: vfprintf (vfprintf.c:1642) ==15074== by 0x59B590F: vsnprintf (vsnprintf.c:114) ==15074== by 0xACC62B: std::__convert_from_v(__locale_struct* const&, char*, int, char const*, ...) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0xAE4F16: std::ostreambuf_iterator<char, std::char_traits > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert_float(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, char, double) const (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0xAE524F: std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::do_put(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, double) const (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0xAF4834: std::ostream& std::ostream::_M_insert(double) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0x6A0F8A: epee::net_utils::network_throttle::tick() (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0x6A1299: epee::net_utils::network_throttle::_handle_trafic_exact(unsigned long, unsigned long) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0x58FDC5: epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > >::handle_read(boost::system::error_code const&, unsigned long) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0x55BCF6: void boost::asio::detail::strand_service::dispatch<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > >, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > > > >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long> >(boost::asio::detail::strand_service::strand_impl*&, boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > >, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > > > >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long>&) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== ==15074== ==15074== 3536 errors in context 775 of 775: ==15074== Conditional jump or move depends on uninitialised value(s) ==15074== at 0x598C16F: __printf_fp_l (printf_fp.c:484) ==15074== by 0x5989A06: vfprintf (vfprintf.c:1642) ==15074== by 0x59B590F: vsnprintf (vsnprintf.c:114) ==15074== by 0xACC62B: std::__convert_from_v(__locale_struct* const&, char*, int, char const*, ...) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0xAE4F16: std::ostreambuf_iterator<char, std::char_traits > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert_float(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, char, double) const (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0xAE524F: std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::do_put(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, double) const (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0xAF4834: std::ostream& std::ostream::_M_insert(double) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0x6A0F8A: epee::net_utils::network_throttle::tick() (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0x6A1299: epee::net_utils::network_throttle::_handle_trafic_exact(unsigned long, unsigned long) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0x58FDC5: epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > >::handle_read(boost::system::error_code const&, unsigned long) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0x55BCF6: void boost::asio::detail::strand_service::dispatch<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > >, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > > > >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long> >(boost::asio::detail::strand_service::strand_impl*&, boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > >, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > > > >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long>&) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== by 0x55C07A: boost::asio::detail::completion_handler<boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_context::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > >, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > > > >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::asio::detail::is_continuation_if_running>, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > >, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<epee::net_utils::connection<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_tcryptonote::cryptonote_connection_context > > > >, boost::arg<1> ()(), boost::arg<2> ()()> > > >::do_complete(void*, boost::asio::detail::scheduler_operation*, boost::system::error_code const&, unsigned long) (in /home/yiimpserver/haven/build/release/bin/havend) ==15074== ==15074== ERROR SUMMARY: 134680 errors from 775 contexts (suppressed: 0 from 0)

blbruegg avatar Jan 09 '19 15:01 blbruegg

I had the same issue and it keeps recurring, works for a while but consumes all system memory after.

simpleminers avatar Jan 11 '19 09:01 simpleminers

Fixed with commit https://github.com/havenprotocol/haven/commit/2dd669485eadd1c792c7db9434307645f5903e22

blbruegg avatar Jan 15 '19 13:01 blbruegg