OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 24, 2024 11:31 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Scheduler randomly crashes
PostPosted: Mon Aug 03, 2020 1:28 pm 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1071
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

_________________
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg


Top
 Profile  
 
 Post subject: Re: Scheduler randomly crashes
PostPosted: Mon Aug 03, 2020 2:24 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
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.

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: Scheduler randomly crashes
PostPosted: Mon Aug 03, 2020 2:42 pm 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1071
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.

_________________
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], rdos and 211 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group