Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13
Originally Posted by Dolda2000 Those aren't errors -- they're just info messages from various system services, in this case cron running a couple of programs. I find it strange indeed ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Nov 2004
    Posts
    43

    Quote Originally Posted by Dolda2000
    Those aren't errors -- they're just info messages from various system services, in this case cron running a couple of programs.

    I find it strange indeed that you don't get a panic message on the text console. Maybe the machine hangs before the kernel even gets to detect that, although I haven't seen anything like that previously. What does your module do, really? If you printk() some messages immediately upon module initialization, would they appear on the text console?
    Thank you very much! I am sending packets based on the modified module. This module
    is like UDP/IP. Sometimes, I can send packets smoothly, sometimes the sending makes the
    computer crashed (only the source node). Yesterday I found sometimes it made the system
    "segmentation fault" instead of hanging up, that is much better for me. Here is the error:


    Code:
    Unable to handle kernel NULL pointer dereference at virtual address 0000007f
     printing eip:
    d0861472
    *pde = 00000000
    Oops: 0000
    CPU:    0
    EIP&#58;    0010&#58;&#91;<d0861472>&#93;    Not tainted
    EFLAGS&#58; 00010297
    eax&#58; 00000073   ebx&#58; cfa16964   ecx&#58; 00000000   edx&#58; cfc22800
    esi&#58; cfafc140   edi&#58; cfc22800   ebp&#58; cf05dcd4   esp&#58; cf05dcb4
    ds&#58; 0018   es&#58; 0018   ss&#58; 0018
    Process my_test &#40;pid&#58; 264, stackpage=cf05d000&#41;
    Stack&#58; cf05dcdc d085f153 cfafc140 08049578 cf046c2e 00000020 cfafc140 0000000e
           cf05dd14 d0860bf9 cfa16d40 cfafc140 ca000000 d0860b29 ca000000 cfa16d40
           00000001 d08614f5 d0865923 d0865967 00000000 ffffffff 00000001 0005df08
    Call Trace&#58; &#91;<d085f153>&#93; &#91;<d0860bf9>&#93; &#91;<d0860b29>&#93; &#91;<d08614f5>&#93; &#91;<d0865923>&#93;
       &#91;<d0865967>&#93; &#91;<d0860630>&#93; &#91;<d08636b1>&#93; &#91;<d0863ede>&#93; &#91;<d0863d04>&#93; &#91;<d085f564>&#93;
       &#91;<c01ff3f5>&#93; &#91;<c02002f5>&#93; &#91;<c0112d2a>&#93; &#91;<c0112d2a>&#93; &#91;<c0200afb>&#93; &#91;<c0106e5b>&#93;
    However, I don't think I access an NULL pointer in my module. Is there any kernel function
    I used wrong? Can I get some information from the above errors? I read the file under the directory /var/log/ksysmoops trying to find the above xxxxxxx code's meaning, but I didn't get them.

    What's more, when I tried to remove the module, it said " Device or Resource Busy". Why this happened? Thanks a lot!

    Thanks again!

    Mod edit - added code tags.

  2. #12
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Quote Originally Posted by walking
    However, I don't think I access an NULL pointer in my module.
    How can you be so sure? Is it really impossible that you may have stored 0 or NULL in a pointer anywhere, or alternatively not initialized some structure insufficiently, and then derefenced it?

    Quote Originally Posted by walking
    Is there any kernel function I used wrong? Can I get some information from the above errors?
    The first thing you should do is recompile the kernel with debugging support. That way, the panic handler will be able to print symbolic function names instead of addresses in the backtrace. That'll make it very much easier to debug.
    Quote Originally Posted by walking
    I read the file under the directory /var/log/ksysmoops trying to find the above xxxxxxx code's meaning, but I didn't get them.
    That could just be because the addresses were inside your module, in which case they won't be found by ksymoops. Anyhow, like I said, recompiling the kernel with debug support will solve that part of the problem.

    Quote Originally Posted by walking
    What's more, when I tried to remove the module, it said " Device or Resource Busy". Why this happened?
    Probably because some refcount mismatch. Are you releasing all resources properly? Either way, if you're segfaulting inside the kernel, there's really no telling what may happen.

  3. #13
    Just Joined!
    Join Date
    Nov 2004
    Posts
    43
    Thank you so much for your reply! I really appreciate it.

    Quote Originally Posted by Dolda2000
    How can you be so sure? Is it really impossible that you may have stored 0 or NULL in a pointer anywhere, or alternatively not initialized some structure insufficiently, and then derefenced it?
    I found the error which makes the kenel panic. As I tried to print "skb->mac.ethernet->h_proto " , probably sometimes it is a NULL pointer. I am not very
    sure. I haven't read how the mac header works. However, after I removed the printk
    statement. No segmentation fault any more.


    However, I returned to the original question. Sometimes, I sent traffic based on the module,
    everything works. However, sometimes, it made the whole machine HANG up. No any
    kernel panic information in log file or console. Because I tried to debug the code to see
    where is problem, I set some printk statements in every function. However, when I enabled
    the printk statements, the machine doesn't hangs up ( at least, very lower possibility than disabling the printk statements.). Why could it be that?

    I don't want to enable printk statments, because it really affected my measurements. such as
    throughput, etc.

    Any advice? Thanks a lot!

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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