"Why is my kernel restarting?"

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Civillian
Member
Member
Posts: 32
Joined: Tue Feb 21, 2012 3:26 pm

"Why is my kernel restarting?"

Post by Civillian »

I ...
  • noticed that my kernel restarts when it panic()'s. (That function only prints some text then enters an infinite loop.)
  • suggest that the Wiki be added a section "Why is my kernel restarting?" here, detailing a few reasons why one's kernel would restart.
  • can only think of the Triple Fault... my own explanation of which would be poor content (and is why I didn't start the article myself).
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: "Why is my kernel restarting?"

Post by JamesM »

Triple fault will be the reason, but the other question to ask is *what causes a triple fault*?

Stack overflow, stack underflow, corrupt stack, corrupt EIP...
Snake
Posts: 19
Joined: Wed Mar 21, 2012 7:38 pm

Re: "Why is my kernel restarting?"

Post by Snake »

Panic function can be tricky to write, because it is called when things are broken. If things are broken it is possible that doing anything in panic will cause more panics, and so on. Perhaps check if panic is being called multiple times, and if it called more than once just go into infinite loop. This would prevent your system from detierating even further towards triple faults and worse.
Post Reply