Re: How to understand a kernel oops message?

Gabriel Paubert (paubert@iram.es)
Thu, 2 Apr 1998 10:27:38 +0200 (METDST)


On Thu, 2 Apr 1998, Foo Chun Choong wrote:

> Hi,
>
> Could u help me to understand this kernel oops message (enclosed below):
>
> (1) Is there a doc describing what the general protection numbers mean?
> What does the 0000 here stand for?

Go fetch an Intel doc. General protection with code 0 can be anything but
as far as the kernel is concerned it often means that a segment limit
has been violated. When not 0, the code is a segment selector.

> (2) In EIP:[dev_ioctl+476/508] is there a way for me to find the exact
> line of the kernel code that is causing the problem (using 476/508??)

There are several possibilities, use ksymoops as a first step. I often
prefer to objdump the .o file because I can have a look at the code
before the oops. You may also try gcc -S with the same options used to
compile the kernel (the -fverbose-asm switch does not seem to help in
getting more readable output).

[snipped]

> Apr 2 13:01:23 kukula kernel: general protection: 0000
> Apr 2 13:01:23 kukula kernel: CPU: 0
> Apr 2 13:01:23 kukula kernel: EIP: 0010:[dev_ioctl+476/508]
> Apr 2 13:01:23 kukula kernel: EFLAGS: 00010002
> Apr 2 13:01:23 kukula kernel: eax: 73736d20 ebx: 73736d20 ecx: 001d9bd4 edx: 73736d20
> Apr 2 13:01:23 kukula kernel: esi: 0008fe10 edi: 001e6ed8 ebp: 001e6e4c esp: 001d9bac
> Apr 2 13:01:23 kukula kernel: ds: 0018 es: 0018 fs: 002b gs: 0018 ss: 0018
> Apr 2 13:01:23 kukula kernel: Process swapper (pid: 0, process nr: 0, stackpage=001d7d4c)
> Apr 2 13:01:23 kukula kernel: Stack: 001d9bd4 001396c6 0008fe10 001d9bd4 0008fe00 41998489 001e6e4c 0008fe10
> Apr 2 13:01:23 kukula kernel: 00000000 00000202 0008fe10 ffaa0806 0008fde6 00138944 000000c4 00000001
> Apr 2 13:01:23 kukula kernel: 00139876 0008fe10 001e6e4c 00000000 0014ccfd 0008fe10 001e6e4c 00000000
> Apr 2 13:01:23 kukula kernel: Call Trace: [skb_recv_datagram+326/376] [sock_getsockopt+152/424] [datagram_select+210/380] [arp_bind_cache+229/676] [dev_mc_add+120/176] [ext2_new_block+358/2176] [ext2_new_block+308/2176]
> Apr 2 13:01:23 kukula kernel: [timer_bh+577/820] [get_ioport_list+23/96] [do_signal+183/636] [init+520/900] [do_signal+305/636] [do_shell+148/196] [start_kernel+406/464]
> Apr 2 13:01:23 kukula kernel: Code: 80 7b 09 04 75 12 8a 03 83 e0 0f c1 e0 02 89 f6 01 c2 80 7a

This instruction (80 7b 09 04 means cmpb $4,9(%ebx) AFAIR) uses %ebx
which is, strangely " mss" in ASCII. This type of problem may happen
with some compilers and current asm/string.h, but might also be a mistake
in your code. It is definitely a segment limit violation from the
point of view of the processor.

Gabriel.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu