We were setting up a new system that involved creating 3 new threads and changing 4 existing ones. Somehow I managed to get 2 threads listening to the same port. It ran this way for 5 months. Then suddenly, after our routine monthly reboot of the engine, the threads swapped which caused the data from one system to feed back into itself and the other thread to send incorrect messages to another system.
My question is…why did this ever work at all and why would the threads suddenly swap and continue to work albeit incorrectly?