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

"DhtServer::event_write called but both write queues are empty" Error #32

Open
HarryMuscle opened this issue Jan 9, 2022 · 1 comment

Comments

@HarryMuscle
Copy link

Running your version of rTorrent 0.9.8/0.13.8 I regularly get the following error:

C Caught internal_error: 'DhtServer::event_write called but both write queues are empty.'.

This seems to be a known issue and is discussed further in the following issues from other rTorrent repo's and related projects:

rakshasa/libtorrent#141
rakshasa/rtorrent#760
chros73/rtorrent-ps-ch#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.

@jesec
Copy link
Owner

jesec commented Jan 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants