The remote_cmd function in data.py has a race condition on thread management
This was found by review with @patrick.thomas, it revolves around the access and mutation of self.threads.
This is a classic race condition, and if commands managed to hit close enough together you could get two threads going at the same time, the first one through would be running w/o being tracked as it would have been overwritten.
def remote_command(...): ... if self.active(tid): logger.debug("BUSY: {}".format(tid)) return ... t = nds.NDSThread(tid, cmd, **kwargs) self.threads[tid] = t ...