Find the answer to your Linux question:
Results 1 to 7 of 7
hi, i have to make a module which can forecast the system hang. for that i have to start with the causes of system hangs and its effect to the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! rohan_nakar's Avatar
    Join Date
    Dec 2006
    Location
    India
    Posts
    45

    Question what happens to kernel when system hangs ?


    hi,
    i have to make a module which can forecast the system hang. for that i have to start with the causes of system hangs and its effect to the kernel.

    can anyone tell me what r the reasons of system hang or type of system hang ?

    What exactly happens to kernel when the sytem hangs ?

    Any help or suggestion r most welcome.
    u can suggest some related links, too.

    Thanks,

    Rohan Nakar

  2. #2
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    I am not sure by what your module is going to do, but here is what I know about hangs.

    There are hangs and then there are panics. They can be caused by all sorts of things. Bad hardware, faulty code,whatever basically. Hangs can be interruptable or non-interruptable. To find out what caused an interruptable hang, you need to use sysctl to turn kernel.sysrq on, or make the change to /etc/sysctl.conf. Then once the system hangs you can use Alt+SysRQ+P to dump the registers. This will show you the last function call before the hang. If you know what this function does, then you can take some educated guesses at what is causing the hang. If you don't know what the function does, you'll have to use gdb.

    If the hang is not interruptable, you have to use basic troubleshooting like notice patterns when the system gets in this state ie which modules are loaded/under heavy use, which daemons are encountering heavy traffic, etc etc.

    During a panic, the kernel calls the panic() function and in some cases a memory dump will be performed. From this memory dump you can tell what was going on.

    This is just a very basic explanation because I am not development. I have no clue how to use C to tap into these built-in kernel debugging features.

  3. #3
    Just Joined! rohan_nakar's Avatar
    Join Date
    Dec 2006
    Location
    India
    Posts
    45

    Red face

    hi likwid,
    thanks for the reply...

    it's very technical. i want to know the basics of the system hangs or the reasons of the system hangs...

    can anyone help me with this or provide some useful link for this.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! rohan_nakar's Avatar
    Join Date
    Dec 2006
    Location
    India
    Posts
    45

    Exclamation

    hi,
    i got two major reasons for system hang...
    1) Software Deadlock
    2) Processor Halt

    is there any other reason for system hang ???

    Please Help...

  6. #5
    Linux Newbie burntfuse's Avatar
    Join Date
    Nov 2006
    Location
    Laurel, MD
    Posts
    158
    The problem is that it's not as predictable as you think - unfortunately, it's impossible to look at a set of conditions and predict every kernel panic or deadlock before it happens. Sometimes it's just caused by a kernel bug (which of course you can't predict).
    I have sold my soul to the penguin

  7. #6
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    Exactly. Which is where using kernel.sysrq comes into play to track down the last function call and use gdb to debug.

  8. #7
    Just Joined! rohan_nakar's Avatar
    Join Date
    Dec 2006
    Location
    India
    Posts
    45

    Thumbs up

    hi,
    thanks burntfuse...

    actually that's what i wanna do.

    i wanna do kernel profiling

    any help or suggestion in that...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •