I believe I managed to fix a crash bug that came from the orginal Diku codebase, so it seems to have been around for a very long time, but rarely hit. What seems to have happened is that a player is able to generate enough command input to actually fill up the process space and therefore cause a core dump. The fix is actually pretty simple since each of the input queues are stored with each player. I added a check on each of the descriptors' queues to make sure there weren't more than 500 items waiting.
If someone manages more than that, they'll have a rude bye bye when the mud cuts their link. I'm not nice enough to try to figure out how to tell the player that they managed to spam the mud, and depending on the mud client they'll probably be happy that their link was cut so they can regain control of it. TinTin used to be a bugger to try to figure out when you got into loops in your own code. It would be a lot of trouble for me to add something to the write queue, flush it and then only do that once, so that we don't hang up the rest of the code for all of the other lines of input spam.
For now the player who was able to do this shall remain anonymous especially since the method they used to create this situation was not intentional
The reason I actually decided to post about this is that it is likely the first code bug fix I have made in several years. The last time I did one was when Jake forced me to fix some silly thing that was about one line of code, but took me an hour and 30 questions to him since I couldn't remember any of my passwords or the steps to compile and move anything. I've been around more lately and doing other things as may or may not be evident, which has made it much less painful to do.
Enough patting my own back. If you have a Diku and want the fix, I can probably describe in more detail what I did if you post in the comments the desire for it. Perhaps it's already been fixed as Sloth MUD is a pretty old branch.
Friday, May 26, 2006
Subscribe to:
Post Comments (Atom)
1 comment:
Good job on the fix!
Now while you're fixing DIKU bugs, can you fix the armor class system so that we don't have the situations of "players always hit, mobs almost never hit"?
Post a Comment