I now maintain the MUD I played as a child and have been playing whack a mole with bugs like this for years. I'm a very poor C coder so still run into issues pretty often! Interestingly the game is much more stable on my MBP that I use for development than it is on the production Ubuntu 18 server I run it on. Not too bad for a Diku.
Do you hang out in the Mud Coder's Guild Slack at all? You might find it interesting: https://mudcoders.com/join-the-mud-coders-guild-6770301ddcbd...