Open HarryMuscle opened 2 years ago
DHT-related codes are s***hole. They haven't been updated for almost a decade, and there is minimal activity on them after initial addition. When the number of DHT-enabled torrents (and, as a result, DHT peers) is sufficiently large, they are prone to overflow and other issues. There is also a race condition. Performance issues are prevalent as well.
At best, they could lead to some stability issues. At worst, it could be possible for one to find a way to exploit those issues.
I deployed sanitizers and other technologies to spot obvious issues. Some issues are fixed, but for others, only band aids are applied.
I plan to clean up this DHT mess when I get the chance. However, I am not a frequent user of DHT myself, and I keep DHT disabled on my rTorrent instance. I would recommend users to do the same when they don't need DHT.
Running your version of rTorrent 0.9.8/0.13.8 I regularly get the following error:
This seems to be a known issue and is discussed further in the following issues from other rTorrent repo's and related projects:
https://github.com/rakshasa/libtorrent/issues/141 https://github.com/rakshasa/rtorrent/issues/760 https://github.com/chros73/rtorrent-ps-ch/issues/166
Also included in those issues are logs and a possible workaround patch. Unfortunately it looks like this issue is not being acted on since it's been known for years. I was wondering if you would consider adding the workaround patch or maybe a different solution to your version of rTorrent so that this issue can be fixed.