LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 06-30-2012, 03:40 AM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Rep: Reputation: 23
Angry 2.6.27.35: Application causes linux to crash


Hello,

I'm running vanilla 2.6.27.35 on Pentium-M with busybox 1.14.2

At a specific scenario the application is causing linux to crash.

How can I debug this ?

After the crash, the console is not active any more.

I also tried using ttyS1 as console (RS232) but the kernel messages does not give a clue.

When I tried a smaller kernel I get other messages (I removed unnecessary drivers).

I tried using duma.

On the init phase, there are thousands of dynamic allocations and this is causing the init phase to run forever. The console is active and the CPU usage is almost 100%.

With dmalloc, the init phase does not start and CPU usage is 0%.

What other tools can I use ?

Thanks,
Zvika.
 
Old 07-04-2012, 05:40 AM   #2
anshuman84
Member
 
Registered: May 2008
Location: Bangalore
Posts: 31

Rep: Reputation: 6
Let me get clarity about your issue. If you are getting the issue after running the application then you can use following tools >>>>>>>
1>GDB
2>Valgrind (mainly for memory leak issue as I saw you CPU utilization shooting to 100%)
3>trace (To trace the system calls)
 
Old 07-21-2012, 07:45 AM   #3
gchen
Member
 
Registered: May 2012
Location: Beijing China
Distribution: Asianux
Posts: 56

Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by anshuman84 View Post
Let me get clarity about your issue. If you are getting the issue after running the application then you can use following tools >>>>>>>
1>GDB
2>Valgrind (mainly for memory leak issue as I saw you CPU utilization shooting to 100%)
3>trace (To trace the system calls)
Firstly, support what anshuman84 said above.

Then, I think, the kernel debugger is necessary, such as KGDB (also need GDB in user mode on remote machine) or KDB (can debug in one machine).

KGDB is integrated into kernel in later version (but maybe not in 2.6.27), and KDB is later than KGDB for being integrated into kernel.

: )



And by the way (maybe not quite relative with this issue)

Reading source code and programming carefully (especially for the relative changes) is still a way for solving this issue, it is the sugestion of Linus Torvalds.

Linus does not suggest using debugger: reading source code and carefully programming are much important than debugging (it is truly reasonable)

: )
 
Old 07-23-2012, 09:52 PM   #4
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Debugging linux kernel

Dear Members,

When I use gdb to debug and application I run gdbserver on the target and gdb on the host.
Debugging is done over ethernet.

How gdb works with kgdb ?

I checked kgdb in the kernel configuration and also compiled the kernel with -g

How should I start debugging the kernel ?

1. Should I run gdb on the host and enter 'continue' ?
2. In case debugging is possible only via RS232, should I copy gdb to the target and run it ?

Thanks,
Zvika
 
Old 07-23-2012, 11:53 PM   #5
gchen
Member
 
Registered: May 2012
Location: Beijing China
Distribution: Asianux
Posts: 56

Rep: Reputation: Disabled
Firstly, sorry for I have no experience for KGDB either.

But I have experience for KDB in local machine and serial port to Notbook.

For kernel debug, I think my experience has effect too.


1) google the home page of KGDB.

2) follow the documents which you find on the home page of KDB to constructing your environments;

3) when enrionments is ok, try some simple test.

If all 3 items you performed, I think, you will know all the answers you asked.

(by the way, if has "-g", the debugger will display the source code, if no "-g", debug still can work, but can not relative with source code)


Hope these information above is helpful for you.

: )
 
  


Reply



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
2.6.27.35: application is make linux to crash zvivered Linux - Kernel 1 07-01-2012 03:25 AM
Application causes Linux to crash zvivered Linux - Embedded & Single-board computer 1 05-25-2011 02:56 AM
X application persistence over X crash: Is It Possible? azdruid Linux - Software 3 08-01-2007 11:34 AM
Application crash Getafix Linux - Newbie 6 10-08-2004 03:03 PM
How to debug an X application crash pbhj Linux - Software 1 06-12-2003 10:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:43 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