interruptible_sleep_on_timeout: OOPS (2.4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I am trying the jit.c example (from Chapter 6) for the jit-read-queue function:

int scull_read_queue(char *buf, char **start, off_t offset,
                   int len, int *eof, void *data)
{
    /* delay one second (or the chosen value), before printing */
/*    unsigned long j = jiffies + jit_delay * HZ; */
    
    wait_queue_head_t wait;

    init_waitqueue_head (&wait);
    interruptible_sleep_on_timeout(&wait, jit_delay*HZ);

    *eof = 1;
    return jit_print(buf);
}

I rewrote the program so that it only has this function and other
required functions.

Source and OOPS log:
http://www.geocities.com/cyborg4k/postjit.c
http://www.geocities.com/cyborg4k/oops.log

I am running Slackware 9.1 (kernel 2.4.22) on an Intel PII with 128 MB
RAM for this program testing. I compile the source file using:
#gcc -O2 -DMODULE -D__KERNEL__ -I/lib/modules/`uname -r`/build/include
-c postjit.c

Loading and unloading the module works. But, when I do "cat
/proc/jitqueue", I get an OOPS error message with the 2.4.22 kernel.
But, the output gets printed when I tested with a 2.6.0 kernel. I am
still learning about ksymoops and haven't got it to work yet.

The OOPS message gave the EIP as c01156b9.

I tried to see what is present near this address in /proc/ksyms (hope
my approach is correct :)), and it showed:

c0115630 interruptible_sleep_on
c0115690 interruptible_sleep_on_timeout

So, I am guessing there is some problem in the way the kernel handles
the interruptible_sleep_on_timeout?

I would appreciate if you can tell me why this is happening and how
best I can learn to debug the oops messages and trace/understand the
kernel control flow. Chapter 04 debugging techniques does not explain
elaborately with sufficient examples on debugging.

Sorry for the long e-mail. I wanted to give as much information as possible.

Thanks,

K Shakthi

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux