LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-19-2012, 05:20 AM   #1
ma1
LQ Newbie
 
Registered: May 2012
Posts: 12

Rep: Reputation: Disabled
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?
 
Old 05-19-2012, 02:22 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,629

Rep: Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265
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
 
Old 05-19-2012, 02:55 PM   #3
ma1
LQ Newbie
 
Registered: May 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
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.
 
Old 05-20-2012, 03:32 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,629

Rep: Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265
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
 
  


Reply

Tags
debug, freeze, os, ubuntu 11.10


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Not able to debug a library compiled with debug information gregorian Programming 6 10-29-2011 09:53 AM
slackware nvidia driver install issue (computer freeze) Damarious Linux - Hardware 5 03-22-2010 07:16 AM
Wine in Slackware: my solution to random freeze issue digital_citizen Linux - Software 1 11-06-2008 08:38 PM
KDE 3.2 Logout Freeze Issue R0c4 Linux - Software 14 11-03-2004 02:02 PM
Hardware issue? GUI Freeze on Linux Distros reeprflame Linux - Hardware 5 10-12-2004 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration