TODO: Race condition debugging after some time the software uses 100% cpu until restart