An interesting question arose in kernelnewbies mailing list. Basically, somebody somebody asked why calling printk() when intercepting scheduler code (using jprobe) results in kernel panic. Full thread can be read here.
My analysis, somehow during module initialization, printk() must not be executed to avoid recursively waking up klogd. The original poster said it didn't help. Finally, he found a workaround, that is by incrementing a variable named oops_in_progress. I bet works like a flag. When it's greater than zero, it prevents klogd to wake up. Problem solved!
Note: klogd is a kernel thread that reads kernel ring buffer and send it to user space daemon syslogd if there's any entries there. Those are the messages that we see ending up in /var/log/messages (for non critical kernel messages).
regards,
Mulyadi.
A place where I share my daily experience in both technical and non technical issues. Expect to read Linux kernel related posts too.
Subscribe to:
Post Comments (Atom)
How to execute multiple commands directly as ssh argument?
Perhaps sometimes you need to do this: ssh user@10.1.2.3 ls It is easy understand the above: run ls after getting into 10.1.2.3 via ssh. Pi...
-
Update: June 14th, 2016 6:01 PM UTC+7: using direct I/O or raw access also bypass filesystem caching. This also has effect to avoid double...
-
Quick summary first: use gcc -save-temps ! Ever dig into Qemu (qemu.org) source code? OK, I assume you ever did that at least once... may ...
-
Ever saw something like below messages inside your KVM (Kernel Virtual Machine) guest's console? " BUG: soft lockup - CPU#0 stuck f...
1 comment:
Ndak mudeng2 aku iki... :D
Post a Comment