2.1.51 strace-oops

Henrik Wallin (henrik@triton.campus.luth.se)
Wed, 20 Aug 1997 02:40:40 +0200 (CEST)


In kernel 2.1.51 I get this when I do:
strace -p <pid>
It oopses everytime I run strace on that process.

Unable to handle kernel NULL pointer dereference at virtual address 000000c8
current->tss.cr3 = 00101000, ^_r3 = 00101000
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0010:[<c011566c>]
EFLAGS: 00010206
eax: 00000000 ebx: c05a2000 ecx: c1e4a0d8 edx: c1e4a000
esi: c1122000 edi: c1ecdc20 ebp: 00000021 esp: c1123f98
ds: 0018 es: 0018 ss: 0018
Process strace (pid: 9301, process nr: 59, stackpage=c1123000)
Stack: c1122000 00000000 c1ecdc20 c01158ff c1122000 400a5280 fffffffc bffff680
c0115956 00000000 c010943a 00000000 400a3e40 400a529c 400a5280 fffffffc
bffff680 00000001 0000002b 0000002b 00000001 400702dd 00000023 00000202
Call Trace: [<c01158ff>] [<c0115956>] [<c010943a>]
Code: 89 98 c8 00 00 00 8b 83 c0 00 00 00 89 98 c4 00 00 00 8b 03

>From System.map

c0109400 T system_call
c0109440 T ret_from_sys_call

c0115548 t exit_notify
c0115728 T do_exit
c0115948 T sys_exit
c0115958 T sys_wait4

[<c011566c>] exit_notify+0x124
[<c01158ff>] do_exit+0x1d7
[<c0115956>] sys_exit+0x08
[<c010943a>] system_call+0x3a

If I understand the oops correct it is failing in:

exit.o:
00000738 <exit_notify>:
..
840: 83 63 14 cf andl $0xffffffcf,0x14(%ebx)
844: 8b 83 bc 00 00 movl 0xbc(%ebx),%eax
849: 00
84a: 89 83 c0 00 00 movl %eax,0xc0(%ebx)
84f: 00
850: 8b 80 c4 00 00 movl 0xc4(%eax),%eax
855: 00
856: 89 83 cc 00 00 movl %eax,0xcc(%ebx)
85b: 00
85c: 89 98 c8 00 00 movl %ebx,0xc8(%eax) <-- Kaboom
861: 00

from exit.c:
503: p->flags &= ~(PF_PTRACED|PF_TRACESYS);
504:
505: p->p_pptr = p->p_opptr;
506: p->p_osptr = p->p_pptr->p_cptr;

As I see it p->p_opptr is NULL. I have no knowledge on what is going on in
these functions, but If anyone wants more info let me know.

The process (<pid>) is writing buffers to a char-device.(MPEG-card)
(The device is written by a friend of mine and it is possible that the driver
is involved in this, but I can't see why in that case. The driver has
worked good for a couple of weeks both under 2.0 and 2.1.)

regards,
/ Henrik Wallin