What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

DB's unstucker causing DB to DDOS the nav-server

GilesSmith

New Member
Joined
Jun 2, 2012
Messages
1,564
Reaction score
34
This is being repeated over and over and over on my bots today, with many many more lines between. This is just a small sample paste.

Code:
[17:13:22.524 D] Generating path to UNKNOWN - <2812.105, 429.4962, 0.07882276>
[17:13:22.525 D] Waiting for path request to finish...
[17:13:22.556 D] Generating path to UNKNOWN - <2812.105, 429.4962, 0.07882276>
[17:13:22.556 D] Waiting for path request to finish...
[17:13:22.658 D] Generating path to UNKNOWN - <2812.105, 429.4962, 0.07882276>
[17:13:22.658 D] Waiting for path request to finish...
[17:13:22.692 D] Generating path to UNKNOWN - <2812.105, 429.4962, 0.07882276>
[17:13:22.692 D] Waiting for path request to finish...
[17:13:22.794 D] Generating path to UNKNOWN - <2812.105, 429.4962, 0.07882276>
[17:13:22.795 D] Waiting for path request to finish...
[17:13:22.828 D] Generating path to UNKNOWN - <2812.105, 429.4962, 0.07882276>
[17:13:22.829 D] Waiting for path request to finish...
[17:13:22.932 D] Generating path to UNKNOWN - <2812.105, 429.4962, 0.07882276>
[17:13:22.932 D] Waiting for path request to finish...
[17:13:22.964 D] Generating path to UNKNOWN - <2812.105, 429.4962, 0.07882276>
[17:13:22.964 D] Waiting for path request to finish...
[17:13:23.067 D] [Stuck Handler] We're stuck at <3408.83, 689.4477, 0.1002907>
[17:13:23.068 D] Navigator.Clear

Having looked at what DemonBuddy is actually doing in this situation - it looks like DemonBuddy's built in stuck handler is resetting the attempt to generate a path from the nav-server too quickly. DB's built in stuck handler kicks in at exactly 2 seconds of inactivity (with no way to alter or disable this feature) - when it kicks in, it clears all current navigation attempts everywhere client-side (but not server side), and resets all navigation client-side... Since the nav server is being a bit laggy for some paths today - taking longer than 2 seconds to generate them - it is causing DB's own unstucker to reset before it has time to finish the nav-request.

This is causing DemonBuddy to issue another nav-generation request to the DemonBuddy nav-servers - even though the nav-server is still generating the last request!

In effect, DemonBuddy is DDosing itself with nav-server requests, and causing the client to never get a path generated, when the nav-servers are busy - with the problem getting worse and worse as it tries to generate more and more nav-server requests every 2 seconds on every bot - which will cause other bots running to also experience slower nav-servers until they too start hitting DB's built in 2-second unstucker, causing the problems to escalate.

I will repeat my request to allow plugins to disable/replace DB's built in unstucker behavior, and to remove DB's built in unstucker from being hard-coded into the movement generation function;
[url]http://www.thebuddyforum.com/demonbuddy-forum/developers/66371-request-built-db-unstucker-can-we-replace-disable-interface.html[/url]

Likewise I'll just bump my request to also replace DB's barricade handling function, which like the unstucker, is also hardcoded into DB's movement generation function with no way to interface or replace it and causes it's own navigation problems at times;
[url]http://www.thebuddyforum.com/demonbuddy-forum/developers/66500-barricade-kicking-treasure-goblin-portals-treated-barricades.html][/url]
 
Last edited:
The nav server caches paths, which means that even though it is requesting the same path, as it has been generated once, it will not require any CPU the second time that path is requested.
It does seem strange that it's taking so long to answer path requests, though. I will have a look if it is being exhausted.
 
The nav server caches paths, which means that even though it is requesting the same path, as it has been generated once, it will not require any CPU the second time that path is requested.
It does seem strange that it's taking so long to answer path requests, though. I will have a look if it is being exhausted.

That's good to hear - obviously I can't see what's happening nav-server side, all I can see is that DB makes a new-path request - in 2 seconds DB's built in client-side unstucker clears it (without any new instructions to the server to abandon the past request) - then immediately requests a new path, every 2 seconds. The 2 second duration is too-short for the nav-server today (either because the nav-server is under heavy load, is having issues, or just needs a reboot!), which means that fairly often today DB unstucker is actually causing stucks - by repeatedly clearing the attempt to get a path from the server before the server has time to generate/return it.

If the server is actually still generating the path - I wonder why the requests are happening constantly - you'd think that after a few repeat-requests, the nav-server would have already generated it from the 1st request attempt, and have it cached ready to send back by the time the DB client makes it's 3rd or 4th repeat-request?

I've attached a sample log - this is from just before it got stuck, to when I noticed and clicked stop. It ran for approximately 6 minutes constantly trying to generate the same path.
 

Attachments

I can confirm that the bot ain't working
All I get is
[16:52:52.025 D] Generating path to 1 - <300.7252, 720.0497, 0.1157728>
[16:52:52.025 D] Waiting for path request to finish...
[16:52:52.072 D] Generating path to 1 - <300.7252, 720.0497, 0.1157728>
[16:52:52.072 D] Waiting for path request to finish...
[16:52:52.165 D] Generating path to 1 - <300.7252, 720.0497, 0.1157728>
[16:52:52.165 D] Waiting for path request to finish...
[16:52:52.212 D] Generating path to 1 - <300.7252, 720.0497, 0.1157728>
 
Back
Top