LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Does linux kernel try to recover from CPU stall? (https://www.linuxquestions.org/questions/linux-software-2/does-linux-kernel-try-to-recover-from-cpu-stall-4175635452/)

bharathm1 08-01-2018 10:03 AM

Does linux kernel try to recover from CPU stall?
 
Does Linux OS have any way to recover from problems that stalled CPU causes. By stalling CPU I mean a kernel thread that is not yielding a CPU in a non preemptible kernel (possibly a buggy kernel module).

Problems it may cause include lost CPU resource if it is a buggy process not doing any useful work. So does Linux forcefully yield such kernel thread or kill such kernel thread if it detects it is stalling for long long time

Some other problems I faced when one kernel module stalls CPU is that some functionality doesn't work. e.g., sudo,echo didn't work for me.

I am running a 2-core UBUNTU machine with 2 GB ram and ran a kernel module that does while(1)

business_kid 08-01-2018 02:52 PM

From what I recall of the kernel config, there is/was a watchdog in there? Sounds like what you want.

bharathm1 08-02-2018 12:57 AM

Watchdog helps in detection of a soft lockup in CPU, but I want to know what Linux does when it detects there is a soft lockup causing by some kthread.

business_kid 08-02-2018 03:43 AM

The traditional watchdog throws the cpu a reset (back in the primitive era). In primitive era industrial controllers, that was fine. I presume the kernel watchdog is a bit more sophisticated, but you'd want to read the options you have. You may also be able to do something by regularly checking top and grepping for that particular process; then kill it if it gets too busy.

Can't you restrain it with nice? From the problems you mention I gather you're writing software, not running a server? If you're having lockups, you may need a watchdog card, to have some monitoring intelligence at your disposal. There are some kernel hot keys, and you should look them up.

syg00 08-02-2018 04:35 AM

Non-preempt kernels are non-preemptible. Period.

This is how 2.4 was, and why preempt was introduced.

Ron Vaughan 08-30-2018 05:15 PM

Fedora 29 not finishing boot
 
I have beeun enjoying fedora 29 recently on my Toshiba laptop. Plenty of memory and HD space. I did a sudo dnf update as I often do, however this time it does not finish. It seems to be doing the update but hangs on the "Watchdog did not finish". I get this message when I am forced to hit CTL_ALT_DEL to restart. At that point I see a quick message appear briefly "Startin Hold until boot process finishes up... " - Previous updates have worked fine.
Not sure how I can get by this hold.
Suggestions or ideas would be appreciated.
~ Ron

syg00 08-30-2018 06:29 PM

You should really have started a new thread - but try adding "nowatchdog" to the kernel parameters.


All times are GMT -5. The time now is 04:39 AM.