LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux, How to debug OS freeze issue? (http://www.linuxquestions.org/questions/linux-newbie-8/linux-how-to-debug-os-freeze-issue-945865/)

ma1 05-19-2012 06:20 AM

Linux, How to debug OS freeze issue?
 
I am working on a kernel module and a user-space application to test that module.

The problem is that during testing my system hangs/freeze.

I have placed lots of debug prints in the code.

The last message that is printed is just before linux select call in my user-space application. Does select somehow freeze the system?

So, How can i debug that where is problem? whether the problem is on user-space application or kernel module?

pan64 05-19-2012 03:22 PM

probably a select in a user space app cannot freeze the system.
If you want to debug the kernel just google, you will find a lot of resources and howtos

ma1 05-19-2012 03:55 PM

Quote:

Originally Posted by pan64 (Post 4682805)
probably a select in a user space app cannot freeze the system.
If you want to debug the kernel just google, you will find a lot of resources and howtos

Thanks for reply.
Obviously there is something buggy on kernel side. But as i understand some event in user-space triggered that buggy code on kernel side. And that event is a call to select. I am sure about this.

This is the first time i am working on kernel side and i am helpless.

Today i also tried to configured the netconsole on system(Ubuntu 11.10) that freezes so that i can see what happened, but netconsole module load failed on Ubuntu 11.10 due to eth0 doesn't support polling.

I also found some resources for debugging kernel modules but all those resources says that i must have to build the kernel. But i have a less powerfull machine for kernel build and it will take too much time, second for every change i have to build the kernel again and again. not a feasible solution.

So, now i am stuck in the middle of nowhere.

pan64 05-20-2012 04:32 AM

if you want to debug kernel you will need the source compatible with that kernel. Maybe you can have it, but you need to rebuild your kernel with some specific debug related switches. If you cannot do that you can have the possibility to create a kernel dump and read the source code.
http://www.linuxtopia.org/online_boo...n/ch09s07.html


All times are GMT -5. The time now is 06:40 AM.