Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Падает через некоторое время при совместном использовании с Vuze/Azureus на Windows 8.1 x64 #635

Closed
AlexBeLi opened this issue Sep 16, 2016 · 44 comments
Labels

Comments

@AlexBeLi
Copy link
Contributor

warning: Critical error detected c0000374

Thread 48 received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 4456.0x1294]
0x00007fff90731b30 in ntdll!RtlpNtMakeTemporaryKey ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
(gdb) bt
#0 0x00007fff90731b30 in ntdll!RtlpNtMakeTemporaryKey ()

from C:\WINDOWS\SYSTEM32\ntdll.dll
#1 0x00007fff90734db2 in ntdll!RtlpNtMakeTemporaryKey ()

from C:\WINDOWS\SYSTEM32\ntdll.dll
#2 0x00007fff907359b0 in ntdll!RtlpNtMakeTemporaryKey ()

from C:\WINDOWS\SYSTEM32\ntdll.dll
#3 0x00007fff9067394e in ntdll!RtlAllocateHeap ()

from C:\WINDOWS\SYSTEM32\ntdll.dll
#4 0x00007fff90670dad in ntdll!RtlAllocateHeap ()

from C:\WINDOWS\SYSTEM32\ntdll.dll
#5 0x00007fff90731e26 in ntdll!RtlpNtMakeTemporaryKey ()

from C:\WINDOWS\SYSTEM32\ntdll.dll
#6 0x00007fff906e9b60 in ntdll!memset () from C:\WINDOWS\SYSTEM32\ntdll.dll
#7 0x00007fff90670dad in ntdll!RtlAllocateHeap ()

from C:\WINDOWS\SYSTEM32\ntdll.dll
#8 0x00007fff8ee41d76 in msvcrt!malloc () from C:\WINDOWS\system32\msvcrt.dll
#9 0x000000000077af6c in operator new(unsigned long long) () at Daemon.h:64
#10 0x0000000000444cc8 in __gnu_cxx::new_allocator<std::_Sp_counted_ptr_inplace<i2p::garlic::GarlicRoutingSession, std::allocatori2p::garlic::GarlicRoutingSession, (__gnu_cxx::_Lock_policy)2> >::allocate (__n=1,

this=<synthetic pointer>)
at C:/msys64/mingw64/include/c++/5.3.0/ext/new_allocator.h:104

#11 std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<i2p::garlic::GarlicRoutingSession, std::allocatori2p::garlic::GarlicRoutingSession, (__gnu_cxx::_Lock_policy)2> > >::allocate (__a=, __n=1)

at C:/msys64/mingw64/include/c++/5.3.0/bits/alloc_traits.h:360

#12 std::__allocate_guarded<std::allocator<std::_Sp_counted_ptr_inplace<i2p::garlic::GarlicRoutingSession, std::allocatori2p::garlic::GarlicRoutingSession, (__gnu_cxx::_Lock_policy)2> > > (__a=)

at C:/msys64/mingw64/include/c++/5.3.0/bits/allocated_ptr.h:102

#13 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<i2p::garlic::GarlicRoutingSession, std::allocatori2p::garlic::GarlicRoutingSession, i2p::garlic::GarlicDestination*, std::shared_ptr<i2p::data::RoutingDestination const>&, int, bool&> (__a=..., this=0x151df8f8)

at C:/msys64/mingw64/include/c++/5.3.0/bits/shared_ptr_base.h:615

#14 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::_shared_count<i2p::garlic::GarlicRoutingSession, std::allocatori2p::garlic::GarlicRoutingSession, i2p::garlic::GarlicDestination, std::shared_ptr<i2p::data::RoutingDestination const>&, int, bool&>(std::Sp_make_shared_tag, i2p::garlic::GarlicRoutingSession, std::allocatori2p::garlic::GarlicRoutingSession const&, i2p::garlic::GarlicDestination*&&, std::shared_ptr<i2p::data::RoutingDestination const>&, int&&, bool&) (__a=..., this=0x151df8f8)

at C:/msys64/mingw64/include/c++/5.3.0/bits/shared_ptr_base.h:621

#15 std::__shared_ptr<i2p::garlic::GarlicRoutingSession, (__gnu_cxx::_Lock_policy)2>::__shared_ptrstd::allocator<i2p::garlic::GarlicRoutingSession, i2p::garlic::GarlicDestination*, std::shared_ptr<i2p::data::RoutingDestination const>&, int, bool&> (__a=..., this=0x151df8f0, __tag=...)

at C:/msys64/mingw64/include/c++/5.3.0/bits/shared_ptr_base.h:1097

#16 std::__shared_ptr<i2p::garlic::GarlicRoutingSession, (__gnu_cxx::_Lock_policy)2>::_shared_ptrstd::allocator<i2p::garlic::GarlicRoutingSession, i2p::garlic::GarlicDestination, std::shared_ptr<i2p::data::RoutingDestination const>&, int, bool&>(std::Sp_make_shared_tag, std::allocatori2p::garlic::GarlicRoutingSession const&, i2p::garlic::GarlicDestination&&, std::shared_ptr<i2p::data::RoutingDestination const>&, int&&, bool&) (__a=..., __tag=...,

this=0x151df8f0)
at C:/msys64/mingw64/include/c++/5.3.0/bits/shared_ptr_base.h:1104

#17 std::shared_ptri2p::garlic::GarlicRoutingSession::shared_ptrstd::allocator<i2p::garlic::GarlicRoutingSession, i2p::garlic::GarlicDestination*, std::shared_ptr<i2p::data::RoutingDestination const>&, int, bool&> (__a=...,

this=0x151df8f0, __tag=...)
at C:/msys64/mingw64/include/c++/5.3.0/bits/shared_ptr.h:319

#18 std::shared_ptri2p::garlic::GarlicRoutingSession::shared_ptrstd::allocator<i2p::garlic::GarlicRoutingSession, i2p::garlic::GarlicDestination_, std::shared_ptr<i2p::data::RoutingDestination const>&, int, bool&>(std::Sp_make_shared_tag, std::allocatori2p::garlic::GarlicRoutingSession const&, i2p::garlic::GarlicDestination&&, std::shared_ptr<i2p::data::RoutingDestination const>&, int&&, bool&) (__a=..., __tag=..., this=0x151df8f0)

at C:/msys64/mingw64/include/c++/5.3.0/bits/shared_ptr.h:320

#19 std::allocate_shared<i2p::garlic::GarlicRoutingSession, std::allocatori2p::garlic::GarlicRoutingSession, i2p::garlic::GarlicDestination_, std::shared_ptr<i2p::data::RoutingDestination const>&, int, bool&>(std::allocatori2p::garlic::GarlicRoutingSession const&, i2p::garlic::GarlicDestination_&&, std::shared_ptr<i2p::data::RoutingDestination const>&, int&&, bool&) (__a=...)

at C:/msys64/mingw64/include/c++/5.3.0/bits/shared_ptr.h:614

#20 std::make_shared<i2p::garlic::GarlicRoutingSession, i2p::garlic::GarlicDestination*, std::shared_ptr<i2p::data::RoutingDestination const>&, int, bool&>(i2p::garlic::GarlicDestination*&&, std::shared_ptr<i2p::data::RoutingDestination const>&, int&&, bool&) ()

at C:/msys64/mingw64/include/c++/5.3.0/bits/shared_ptr.h:630

#21 i2p::garlic::GarlicDestination::GetRoutingSession (this=0x13d48160,

destination=..., attachLeaseSet=<optimized out>) at Garlic.cpp:599

#22 0x00000000004460ea in i2p::garlic::GarlicDestination::WrapMessage (

this=this@entry=0x13d48160, destination=..., msg=...,
attachLeaseSet=attachLeaseSet@entry=false) at Garlic.cpp:583

#23 0x0000000000438d54 in i2p::client::LeaseSetDestination::SendLeaseSetRequest (this=this@entry=0x13d48160, dest=..., nextFloodfill=..., request=...)

at Destination.cpp:582

#24 0x0000000000439647 in i2p::client::LeaseSetDestination::HandleRequestTimoutTimer (this=0x13d48160, ecode=..., dest=...) at Destination.cpp:617
#25 0x000000000069301a in std::_Mem_fn_base<void (i2p::client::LeaseSetDestination::*)(boost::system::error_code const&, i2p::data::Tag<32> const&), true>::_M_callstd::shared_ptr<i2p::client::LeaseSetDestination&, boost::system::error_code const&, i2p::data::Tag<32>&> (__ptr=..., this=0x151dfc30)

at C:/msys64/mingw64/include/c++/5.3.0/functional:634

#26 std::_Mem_fn_base<void (i2p::client::LeaseSetDestination::*)(boost::system::error_code const&, i2p::data::Tag<32> const&), true>::operator()std::shared_ptr<i2p::client::LeaseSetDestination&, boost::system::error_code const&, i2p::data::Tag<32>&, void> (__object=..., this=0x151dfc30)

at C:/msys64/mingw64/include/c++/5.3.0/functional:610

#27 std::_Bind<std::_Mem_fn<void (i2p::client::LeaseSetDestination::*)(boost::system::error_code const&, i2p::data::Tag<32> const&)> (std::shared_ptri2p::client::LeaseSetDestination, std::_Placeholder<1>, i2p::data::Tag<32>)>::__call<void, boost::system::error_code const&, 0ull, 1ull, 2ull>(std::tuple<boost::system::error_code const&>&&, std::_Index_tuple<0ull, 1ull, 2ull>) (

__args=<optimized out>, this=0x151dfc30)
at C:/msys64/mingw64/include/c++/5.3.0/functional:1074

#28 std::_Bind<std::_Mem_fn<void (i2p::client::LeaseSetDestination::*)(boost::system::error_code const&, i2p::data::Tag<32> const&)> (std::shared_ptri2p::client::LeaseSetDestination, std::_Placeholder<1>, i2p::data::Tag<32>)>::operator()<boost::system::error_code const&, void>(boost::system::error_code const&) (

this=0x151dfc30) at C:/msys64/mingw64/include/c++/5.3.0/functional:1133

#29 boost::asio::detail::binder1<std::_Bind<std::_Mem_fn<void (i2p::client::LeaseSetDestination::*)(boost::system::error_code const&, i2p::data::Tag<32> const&)> (std::shared_ptri2p::client::LeaseSetDestination, std::_Placeholder<1>, i2p::data::Tag<32>)>, boost::system::error_code>::operator()() (

this=0x151dfc30)
at C:/msys64/mingw64/include/boost/asio/detail/bind_handler.hpp:47

#30 boost::asio::asio_handler_invoke<boost::asio::detail::binder1<std::_Bind<std::_Mem_fn<void (i2p::client::LeaseSetDestination::)(boost::system::error_code const&, i2p::data::Tag<32> const&)> (std::shared_ptri2p::client::LeaseSetDestination, std::_Placeholder<1>, i2p::data::Tag<32>)>, boost::system::error_code> >(boost::asio::detail::binder1<std::_Bind<std::_Mem_fn<void (i2p::client::LeaseSetDestination::)(boost::system::error_code const&, i2p::data::Tag<32> const&)> (std::shared_ptri2p::client::LeaseSetDestination, std::_Placeholder<1>, i2p::data::Tag<32>)>, boost::system::error_code>&, ...) (function=...)

at C:/msys64/mingw64/include/boost/asio/handler_invoke_hook.hpp:69

#31 boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder1<std::_Bind<std::_Mem_fn<void (i2p::client::LeaseSetDestination::)(boost::system::error_code const&, i2p::data::Tag<32> const&)> (std::shared_ptri2p::client::LeaseSetDestination, std::_Placeholder<1>, i2p::data::Tag<32>)>, boost::system::error_code>, std::_Bind<std::_Mem_fn<void (i2p::client::LeaseSetDestination::)(boost::system::error_code const&, i2p::data::Tag<32> const&)> (std::shared_ptri2p::client::LeaseSetDestination, std::_Placeholder<1>, i2p::data::Tag<32>)> >(boost::asio::detail::binder1<std::_Bind<std::_Mem_fn<void (i2p::client::LeaseSetDestination::)(boost::system::error_code const&, i2p::data::Tag<32> const&)> (std::shared_ptri2p::client::LeaseSetDestination, std::_Placeholder<1>, i2p::data::Tag<32>)>, boost::system::error_code>&, std::_Bind<std::_Mem_fn<void (i2p::client::LeaseSetDestination::)(boost::system::error_code const&, i2p::data::Tag<32> const&)> (std::shared_ptri2p::client::LeaseSetDestination, std::_Placeholder<1>, i2p::data::Tag<32>)>&) (context=..., function=...)

at C:/msys64/mingw64/include/boost/asio/detail/handler_invoke_helpers.hpp:37

#32 boost::asio::detail::wait_handler<std::_Bind<std::Mem_fn<void (i2p::client::LeaseSetDestination::*)(boost::system::error_code const&, i2p::data::Tag<32> const&)> (std::shared_ptri2p::client::LeaseSetDestination, std::Placeholder<1>, i2p::data::Tag<32>)> >::do_complete(boost::asio::detail::win_iocp_io_service, boost::asio::detail::win_iocp_operation, boost::system::error_code const&, unsigned long long) (owner=0x140fc080, base=)

at C:/msys64/mingw64/include/boost/asio/detail/wait_handler.hpp:70

#33 0x0000000000699986 in boost::asio::detail::win_iocp_operation::complete (

bytes_transferred=<optimized out>, ec=..., owner=..., this=0x137ea1e0)
at C:/msys64/mingw64/include/boost/asio/detail/win_iocp_operation.hpp:46

#34 boost::asio::detail::win_iocp_io_service::do_one (

this=this@entry=0x140fc080, block=block@entry=true, ec=...)
at C:/msys64/mingw64/include/boost/asio/detail/impl/win_iocp_io_service.ipp:405

#35 0x0000000000698158 in boost::asio::detail::win_iocp_io_service::run (

this=0x140fc080, ec=...)
at C:/msys64/mingw64/include/boost/asio/detail/impl/win_iocp_io_service.ipp:164

#36 0x0000000000436f78 in boost::asio::io_service::run (this=0x13d48228)

at C:/msys64/mingw64/include/boost/asio/impl/io_service.ipp:59

#37 i2p::client::LeaseSetDestination::Run (this=0x13d48160)

at Destination.cpp:119

#38 0x000000000077bc40 in execute_native_thread_routine ()

at C:/msys64/mingw64/include/boost/exception/exception.hpp:284

#39 0x00000000006385a4 in pthread_create_wrapper ()
#40 0x00007fff8ee50b13 in msvcrt!_strupr ()

from C:\WINDOWS\system32\msvcrt.dll
#41 0x00007fff8ee50bcd in msvcrt!_endthreadex ()

from C:\WINDOWS\system32\msvcrt.dll
#42 0x00007fff905013d2 in KERNEL32!BaseThreadInitThunk ()

from C:\WINDOWS\system32\kernel32.dll
#43 0x00007fff906554e4 in ntdll!RtlUserThreadStart ()

from C:\WINDOWS\SYSTEM32\ntdll.dll
#44 0x0000000000000000 in ?? ()

Backtrace stopped: previous frame inner to this frame (corrupt stack?)

@orignal
Copy link
Contributor

orignal commented Sep 16, 2016

Через I2CP?

@AlexBeLi
Copy link
Contributor Author

Да, конечно.
[i2cp]
enabled = true
port = 7654

@orignal
Copy link
Contributor

orignal commented Sep 16, 2016

Памяти что ли не хватает?
Вседа в этом месте падает или бывает в других?

@AlexBeLi
Copy link
Contributor Author

AlexBeLi commented Sep 16, 2016

Падает постоянно и давно, а вот в этом месте или в разных не знаю (запускал без gdb). Позапускаю еще несколько раз.

Плагин I2P Helper в паре с i2pd в целом работают как-то по-другому: когда используется javai2p в Vuze отображается например
I2P Node Estimate 231/2000
а когда i2pd
I2P Node Estimate 128/31
Вторая цифра обычно меньше.

@AlexBeLi
Copy link
Contributor Author

Странно, раньше падало стабильно, а вчера похоже действительно упало при нехватке оперативной памяти. 12 часов работает под gdb нормально.

@orignal
Copy link
Contributor

orignal commented Sep 17, 2016

Я не знаю что эти числа означают и откуда они берутся.

@AlexBeLi
Copy link
Contributor Author

AlexBeLi commented Sep 17, 2016

Мне они тоже не понятны.
Заметил, кстати, что в Azureus на вкладке Privacy при нажатии на кнопку Search DHT пишет:
Lookup Status: Error: Timeout waiting for DHT initialization
Работает i2pd уже 20 часов, Vuze столько же.

@orignal
Copy link
Contributor

orignal commented Sep 17, 2016

А какого то отладочного лога нет чтобы посмотреть обмен сообщениями?

@AlexBeLi
Copy link
Contributor Author

Пока что нет. Какой лучше loglevel установить?

@orignal
Copy link
Contributor

orignal commented Sep 17, 2016

Я имел ввиду на стороне клиента.
В i2pd можно установить debug, тогда будет печатать все I2CP сообщения, но этот никак не добавит знания о том, что происходит с джавой.

@AlexBeLi
Copy link
Contributor Author

Не нашел ничего в логах Vuze, кроме записей наподобие таких
[21:56:19] [stderr] java.lang.NullPointerException
[21:56:19] [stderr] at org.parg.azureus.plugins.networks.i2p.I2PHelperNetworkMixer$5.runSupport(I2PHelperNetworkMixer.java:481)
[21:56:19] [stderr] at org.gudy.azureus2.core3.util.AsyncDispatcher$1.run(AsyncDispatcher.java:160)
[21:56:19] [stderr] at org.gudy.azureus2.core3.util.AEThread2$threadWrapper.run(AEThread2.java:294)
Буду смотреть еще.

@AlexBeLi
Copy link
Contributor Author

Опять грохнулось и без понятной причины (вывело в msys2 абракадабру). Не знаю, есть ли смысл выкладывать логи (в Vuze-логе оставил только относящиеся к i2phelper сообщения).
az.txt
i2pd.txt

@orignal
Copy link
Contributor

orignal commented Sep 18, 2016

Под виндой оно падает под понятной причины давным давно.
Причем какой то бред выдает.

@AlexBeLi
Copy link
Contributor Author

Заметил разницу в az.log, правда, что за цифры и откуда берутся...
i2pd
00:00:18.934 0 plug [I2PHelper] DHT 0: ping:4221,617,3305,966,store:466,79,377,0,node:250,1,11,3,value:18460,1428,13775,82,stats:0,0,0,1022,data:0,0,0,0,kb:0,0,0,0,incoming:1092,alien:0,0,0,0,0,0,0/ping:194,51,143,35,store:0,0,0,0,node:433,52,378,4,value:0,0,0,0,stats:0,0,0,1022,data:0,0,0,2,kb:0,0,0,0,incoming:0,alien:0,0,0,0,0,0,0:1
00:00:18.939 0 plug [I2PHelper] DHT 1: ping:1462,124,853,464,store:0,0,0,0,node:559,35,317,9,value:0,0,0,103,stats:0,0,0,980,data:0,0,0,0,kb:0,0,0,0,incoming:709,alien:0,0,0,0,0,0,0/ping:283,47,236,3,store:0,0,0,3,node:750,24,719,122,value:0,0,0,3,stats:0,0,0,980,data:0,0,0,2,kb:0,0,0,0,incoming:0,alien:0,0,0,0,0,0,0:1

javai2p
16:42:38.533 0 plug [I2PHelper] DHT 0: ping:10881,7059,3803,12182,store:4969,4562,407,1401,node:15,2,8,928,value:70767,36569,31375,11051,stats:0,0,0,2396,data:0,0,0,0,kb:0,0,0,0,incoming:29724,alien:0,0,0,0,0,0,0/ping:2045,1120,921,543,store:133,130,3,174,node:4089,2057,1989,3356,value:0,0,0,69,stats:0,0,0,2396,data:0,0,0,18,kb:0,0,0,0,incoming:0,alien:0,0,0,0,0,0,0:163
16:42:38.782 0 plug [I2PHelper] DHT 1: ping:7223,4834,2371,1624,store:0,0,0,861,node:2494,1241,1242,332,value:0,0,0,4922,stats:0,0,0,2241,data:0,0,0,0,kb:0,0,0,0,incoming:11442,alien:0,0,0,0,0,0,0/ping:1243,657,584,536,store:148,145,3,184,node:3864,2368,1494,2698,value:0,0,0,248,stats:0,0,0,2241,data:0,0,0,36,kb:0,0,0,0,incoming:0,alien:0,0,0,0,0,0,0:155

Постоянно повторяется при работе с i2pd в логах:
22:58:44.027 0 plug [I2PHelper] Bootstrapping...
22:58:54.033 0 plug [I2PHelper] Bootstrap not resolved
22:58:54.040 0 plug [I2PHelper] Injecting 16 alt-network nodes
22:58:54.046 0 plug [I2PHelper] Injecting cached bootstrap nodes

Характерная вроде только для i2pd запись в debug.log:
[22:46:37] [stderr] DEBUG::Sun Sep 18 22:46:37 2016::org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P::receiveMessage::2376:
[22:46:37] [stderr] DHTTransportI2P::messageAvailable::2249, I2PSessionDemultiplexer::messageAvailable::43, I2PSessionMuxedImpl$MuxedAvailabilityNotifier::run::400, Thread::run::-1, I2PThread::run::103
[22:46:37] [stderr] net.i2p.client.I2PSessionException: Timed out waiting while write queue was full
[22:46:37] [stderr] at net.i2p.client.impl.ClientWriterRunner.addMessage(ClientWriterRunner.java:61)
[22:46:37] [stderr] at net.i2p.client.impl.I2PSessionImpl.sendMessage_unchecked(I2PSessionImpl.java:1126)
[22:46:37] [stderr] at net.i2p.client.impl.I2PSessionImpl.sendMessage(I2PSessionImpl.java:1101)
[22:46:37] [stderr] at net.i2p.client.impl.I2CPMessageProducer.sendMessage(I2CPMessageProducer.java:196)
[22:46:37] [stderr] at net.i2p.client.impl.I2PSessionMuxedImpl.sendNoEffort(I2PSessionMuxedImpl.java:306)
[22:46:37] [stderr] at net.i2p.client.impl.I2PSessionMuxedImpl.sendMessage(I2PSessionMuxedImpl.java:247)
[22:46:37] [stderr] at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.sendMessage(DHTTransportI2P.java:2194)
[22:46:37] [stderr] at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.sendResponse(DHTTransportI2P.java:2125)
[22:46:37] [stderr] at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.receivePing(DHTTransportI2P.java:782)
[22:46:37] [stderr] at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.receiveQuery(DHTTransportI2P.java:2440)
[22:46:37] [stderr] at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.receiveMessage(DHTTransportI2P.java:2316)
[22:46:37] [stderr] at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.messageAvailable(DHTTransportI2P.java:2249)
[22:46:37] [stderr] at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
[22:46:37] [stderr] at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
[22:46:37] [stderr] at java.lang.Thread.run(Unknown Source)
[22:46:37] [stderr] at net.i2p.util.I2PThread.run(I2PThread.java:103)

@AlexBeLi
Copy link
Contributor Author

I2CP.cpp
112 auto outboundTunnel = GetTunnelPool ()->GetNextOutboundTunnel ();
Здесь точно auto должно быть?

@orignal
Copy link
Contributor

orignal commented Sep 25, 2016

А что должно быть?

@AlexBeLi
Copy link
Contributor Author

AlexBeLi commented Sep 25, 2016

Просто чуть выше она объявлена
98 std::shared_ptr<i2p::tunnel::OutboundTunnel> outboundTunnel;
а auto создает локальную переменную в данном блоке else (еcли я правильно понимаю), снизу же проверка
if (remoteLease && outboundTunnel)
Если просто присвоить
outboundTunnel = GetTunnelPool ()->GetNextOutboundTunnel ();
вроде чувствует себя бодрее Azureus, даже качает торрент, но все равно через некоторое время отваливается, перестает качать и искать при нажатии Search DHT.

@orignal
Copy link
Contributor

orignal commented Sep 25, 2016

Отличная находка. PR сделаете?

@AlexBeLi
Copy link
Contributor Author

AlexBeLi commented Sep 25, 2016

PR не сделаю, я с git как и с программированием на вы:) Просто огромное количество I2CP: Failed to send message. No outbound tunnels напрягло.
Плохо, что никак не найду, почему он в дальнейшем не пашет (20-40 Мб скачивает, затем отрубается). В логах Azureus никакой аномалии вроде не видно.

@orignal
Copy link
Contributor

orignal commented Sep 25, 2016

ну тогда я сам :)

@AlexBeLi
Copy link
Contributor Author

Стал работать подольше после замены в функции I2CPDestination::SendMsgTo
GetService ().post (std::bind (&I2CPDestination::SendMsg, GetSharedFromThis (), msg, remote, nonce));
на

auto s = GetSharedFromThis ();
bool sent = s->SendMsg (msg, remote);
s->m_Owner->SendMessageStatusMessage (nonce, sent ? eI2CPMessageStatusGuaranteedSuccess : eI2CPMessageStatusGuaranteedFailure);

и копипаста в функции I2CPDestination::SendMsg

if (!remoteSession->CleanupUnconfirmedTags ())
{...}
else {
remoteSession->SetSharedRoutingPath (nullptr);
outboundTunnel = GetTunnelPool ()->GetNextOutboundTunnel ();
auto leases = remote->GetNonExpiredLeases ();
if (!leases.empty ())
    remoteLease = leases[rand () % leases.size ()];
if (remoteLease && outboundTunnel)
    remoteSession->SetSharedRoutingPath (std::make_shared<i2p::garlic::GarlicRoutingPath> (
                    i2p::garlic::GarlicRoutingPath{outboundTunnel, remoteLease, 10000, 0, 0}));
else
    remoteSession->SetSharedRoutingPath (nullptr);
}

Но где-то течет память довольно бодро, и через некоторое время перестает работать i2phelper, в логах Vuze вылазит

23:17:16.447 3 stderr  DEBUG::Tue Sep 27 23:17:16 2016::org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P::receiveMessage::2376:
23:17:16.447 3 stderr      DHTTransportI2P::messageAvailable::2249, I2PSessionDemultiplexer::messageAvailable::43, I2PSessionMuxedImpl$MuxedAvailabilityNotifier::run::400, Thread::run::-1, I2PThread::run::103
23:17:16.447 3 stderr  net.i2p.client.I2PSessionException: Timed out waiting while write queue was full
23:17:16.448 3 stderr   at net.i2p.client.impl.ClientWriterRunner.addMessage(ClientWriterRunner.java:61)
23:17:16.448 3 stderr   at net.i2p.client.impl.I2PSessionImpl.sendMessage_unchecked(I2PSessionImpl.java:1126)
23:17:16.448 3 stderr   at net.i2p.client.impl.I2PSessionImpl.sendMessage(I2PSessionImpl.java:1101)
23:17:16.448 3 stderr   at net.i2p.client.impl.I2CPMessageProducer.sendMessage(I2CPMessageProducer.java:196)
23:17:16.449 3 stderr   at net.i2p.client.impl.I2PSessionMuxedImpl.sendNoEffort(I2PSessionMuxedImpl.java:306)
23:17:16.449 3 stderr   at net.i2p.client.impl.I2PSessionMuxedImpl.sendMessage(I2PSessionMuxedImpl.java:247)
23:17:16.449 3 stderr   at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.sendMessage(DHTTransportI2P.java:2194)
23:17:16.449 3 stderr   at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.sendResponse(DHTTransportI2P.java:2125)
23:17:16.449 3 stderr   at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.receiveAZRequest(DHTTransportI2P.java:1706)
23:17:16.450 3 stderr   at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.receiveQuery(DHTTransportI2P.java:2475)
23:17:16.450 3 stderr   at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.receiveMessage(DHTTransportI2P.java:2316)
23:17:16.450 3 stderr   at org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.messageAvailable(DHTTransportI2P.java:2249)
23:17:16.450 3 stderr   at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
23:17:16.450 3 stderr   at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
23:17:16.451 3 stderr   at java.lang.Thread.run(Unknown Source)
23:17:16.451 3 stderr   at net.i2p.util.I2PThread.run(I2PThread.java:103)

@orignal
Copy link
Contributor

orignal commented Sep 29, 2016

При такой замене будет отсылаться из другого трэда, что не есть хорошо.

@orignal
Copy link
Contributor

orignal commented Sep 29, 2016

Память течет вот как раз из-за этого
net.i2p.client.I2PSessionException: Timed out waiting while write queue was full
А "full" она как раз по причине того что теперь вся логика с отсылкой делается на том треде который читает.

@AlexBeLi
Copy link
Contributor Author

AlexBeLi commented Sep 29, 2016

Понятно. Но похоже, что azureus не устраивает то, что он не знает статус отосланного им сообщения и вот это ему нужно
s->m_Owner->SendMessageStatusMessage (nonce, sent ? eI2CPMessageStatusGuaranteedSuccess : eI2CPMessageStatusGuaranteedFailure);
Та же ошибка переполненной очереди возникает еще быстрее.

@orignal
Copy link
Contributor

orignal commented Sep 29, 2016

тогда следует впихнуть его в SendMsg. И там тоже post вызывать уже для другого треда.
Ну я понял что надо.
Счас поправлю

@AlexBeLi
Copy link
Contributor Author

AlexBeLi commented Sep 29, 2016

И все-таки память утекает.

@orignal
Copy link
Contributor

orignal commented Sep 29, 2016

С утечками надо разбираться отдельно.
Это может и не утечки вовсе,

@AlexBeLi
Copy link
Contributor Author

Может быть и так, я не спорю:) Буду дальше наблюдать.

@orignal
Copy link
Contributor

orignal commented Sep 29, 2016

На самом деле это проблема не только I2CP.
Всякий тяжелый трафик порождает увеличенное потребление памяти.
Скорее всего слишком много тэгов становится.

@AlexBeLi
Copy link
Contributor Author

Странно, они вроде чистятся периодически CleanupExpiredTags. А тут наблюдается прирост стабильный (но неравномерно по времени, иногда резко прибавляется). Впечатление, будто где-то push без pop.

@orignal
Copy link
Contributor

orignal commented Sep 30, 2016

А если выключить торренты на некоторое время не уменьшается?

@AlexBeLi
Copy link
Contributor Author

В смысле, совсем вырубить Vuze? Или остановить раздачу? Сейчас попробую совсем отрубить Vuze.

@orignal
Copy link
Contributor

orignal commented Sep 30, 2016

Отключить Vuze - он должен все эти адреса вычистить.

@AlexBeLi
Copy link
Contributor Author

Отключил сейчас - изменений нет пока что. Ни в большую, ни в меньшую сторону. Посмотрю через 16 минут.

@AlexBeLi
Copy link
Contributor Author

AlexBeLi commented Sep 30, 2016

Нет изменений по потреблению памяти. Сколько в heap съедено - назад не возвращается.

@orignal
Copy link
Contributor

orignal commented Sep 30, 2016

придется искать где

@AlexBeLi
Copy link
Contributor Author

AlexBeLi commented Oct 1, 2016

Заметил, что в логах отсутствуют записи вида
DatagramDestination: clean up sessions и DatagramDestination: expiring idle session with....
Такое может быть?

@orignal
Copy link
Contributor

orignal commented Oct 1, 2016

Если датаграмых тоннелей нет то и не будет

@r4sas
Copy link
Member

r4sas commented Oct 1, 2016

Датаграммы используются только в туннелях класса udpserver и udpclient

@orignal
Copy link
Contributor

orignal commented Oct 1, 2016

@atnaguzin на самом деле они используются всегда если надо адрес найти, но специально не чистятся

@AlexBeLi
Copy link
Contributor Author

AlexBeLi commented Oct 1, 2016

То есть не может быть такого, чтобы при поиске адреса назначения происходило их избыточное накопление при работе I2CP?

@orignal
Copy link
Contributor

orignal commented Oct 1, 2016

Нет, там что то другое. Возможно части тоннельных сообщений не вычищаются. Эта проблема на самом деле комплексная

@AlexBeLi
Copy link
Contributor Author

AlexBeLi commented Oct 1, 2016

Заметил какую-то странность: I2CP работает, когда статус Firewalled и транзитных туннелей немного.
Если OK и транзитов побольше - опять вылазит net.i2p.client.I2PSessionException: Timed out waiting while write queue was full.
Если поставить notransit=true - вообще не работает и постоянно висит в Vuze DHT:initializing.
Последнюю неделю провайдер прятал за nat и это было незаметно.

P.S. Может транзитные туннели и ни при чем, совсем не обратил внимания на floodfill = true.
P.S.P.S. Все-таки транзиты как-то связаны. Примерно 40 минут проработало без ошибки, хотя когда Firewalled работало часами.

@l-n-s l-n-s added the bug label Oct 9, 2016
@r4sas
Copy link
Member

r4sas commented Feb 21, 2017

Если проблема продолжается, просьба открыть иссуй. Закрываю по причине не активности.

@r4sas r4sas closed this as completed Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants