Open MakeCartWheel opened 3 months ago
m_Peers.find
in Transports.cpp often lack mutex locks.
However it's not easy to rewrite this code properly.
The router worked without errors all the time, but since yesterday it has crashed three times, is this somehow related to the attacks (like dos? or remote crash?) or is it simply because of the load that the chance of a crash in thread is greater?
Attack produces load and load produces crashes. I don't think attack targets this particular place in code.
@Vort you mentioned in #2057 that "(fast, happens during shutdown)", initially I find out that there is a problem with the router when my uptimerobot signals that port i2pd is not listening, while i2pd itself works (as far as I understand), and only when shutting down gives SEGV. So I think the problem starts not when you turn it off, but before.
I saw many times that OOM and crashes happen when I shut down completely correctly working i2pd instance.
By the way, I figured out that m_Peers.insert (std::pair
line is responsible both for OOM and some of the crashes. Result is random.
I think you found some other problem, then initiated shutdown and triggered crash just because of shutdown.
problems started last night, crashes about 40 min after start. x64 i2pd version 2.51.0 (0.9.62) (branch openssl - 6ce2c30522a01534521354e83ee94f24d17bbf6e) Boost version 1.83.0 OpenSSL 3.2.1 30 Jan 2024