Page 1 of 1

Scheduler randomly crashes

Posted: Mon Aug 03, 2020 1:28 pm
by nexos
Hello,
In my operating system, the scheduler will crash randomly sometimes, leading to a triple fault or page fault. It happens mainly on multiple CPUs, or after a couple of hours. Does anybody have suggestions on what the problem is and how to debug these crashes?
Thanks,
nexos

Re: Scheduler randomly crashes

Posted: Mon Aug 03, 2020 2:24 pm
by Octacone
Your stack is probably getting corrupted. What tasks are you running exactly? Do you just run your OS and leave it be, then after an hour it crashes?
Also if I were you I'd ditch all the GOTOs, they make your code look ugly and they are a nightmare to debug.

Re: Scheduler randomly crashes

Posted: Mon Aug 03, 2020 2:42 pm
by nexos
I found a problem, and now it runs perfectly well on 1, 2, or 3 CPUs, but more then that and problem happen. The reason the GOTO is there is because it was the best solution to fix a bug in the idle thread calling code. I will probably remove it sooner or later.