MPC855T + Linux kernel 2.4.18 + ppc patch + bridge patch = somtimes OOPS

MPC855T + Linux kernel 2.4.18 + ppc patch + bridge patch = somtimes OOPS

Post by Lim Chae Ho » Wed, 11 Dec 2002 09:39:36



hi, all

I have embedded powerpc board with ppc and bridge patched 2.4.18 linux
kernel.
(bridge patch file is downloaded from bridge.sourceforge.net)
When I boot form this board, kernel oops message occasionally occured
like below.

------------------------------------------------------------------------------
...
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash t<4>Kernel access address 7b
Oops: kernel access of bad area, sig: 11
NIP: C00C3EEC XER: 00000000 LR: C00C69FC SP: C01CDCA0 REGS: c01cdbf0
TRAP: 0300    Not tainted
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 0000007B, DSISR: 0000000A
TASK = c01cc000[1] 'swapper' Last syscall: 120
last math 00000000 last altivec 00000000
GPR00: 00AACC00 C01CDCA0 C01CC000 C0F0E070 932ED7FF 932ED758 00000000
00000002
GPR08: C0170000 C0160000 FFFFFFFF C0160000 0000000D 10048F30 00FF3C00
007FFF0D
GPR16: 00000000 00000001 007FFF00 FFFFFFFF 00001032 00000028 C0149350
0000012C
GPR24: 0000012B C0F0F0DC 00000800 C0F0F000 932ED758 00000000 C0F0E070
932ED7FF
Call backtrace:
C0F0C020 C00C69FC C00B6A48 C0014708 C0003AD4 C000298C 73747576
C0052920 C000F3D4 C000F46C C000F58C C000F8D4 C000F7C8 C01538DC
C0153B44 C01543CC C014A7C8 C014A810 C0002568 C0004D70
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing
 <0>Rebooting in 180 seconds..
------------------------------------------------------------------------------

so, I hack the source/object code. (src/net/ipv4/route.c, route.o)
and then, find oops position.

------------------------------------------------------------------------------
objdump -d src/net/ipv4/route.o
    ...
    2a48:       7c 7e 1b 78     mr      r30,r3  
    2a4c:       2c 0a 00 00     cmpwi   r10,0  
    2a50:       41 82 00 94     beq     2ae4 <ip_route_input+0x120>
    2a54:       3d 20 00 00     lis     r9,0    
    2a58:       3d 00 00 00     lis     r8,0    
    2a5c:       80 0a 00 7c     lwz     r0,124(r10) <======== HERE!!!!
    2a60:       7c 00 f8 00     cmpw    r0,r31  
    2a64:       40 82 00 74     bne     2ad8 <ip_route_input+0x114>
    2a68:       80 0a 00 80     lwz     r0,128(r10)
    2a6c:       7c 00 e0 00     cmpw    r0,r28  
    2a70:       40 82 00 68     bne     2ad8 <ip_route_input+0x114>
    2a74:       80 0a 00 84     lwz     r0,132(r10)
    2a78:       7c 00 38 00     cmpw    r0,r7  
    2a7c:       40 82 00 5c     bne     2ad8 <ip_route_input+0x114>
    2a80:       80 0a 00 88     lwz     r0,136(r10)
    2a84:       2c 00 00 00     cmpwi   r0,0
    2a88:       40 82 00 50     bne     2ad8 <ip_route_input+0x114>
    2a8c:       88 0a 00 8c     lbz     r0,140(r10)
    2a90:       7c 00 e8 00     cmpw    r0,r29  
    2a94:       40 82 00 44     bne     2ad8 <ip_route_input+0x114>
    ...

net/ipv4/route.c "ip_route_input()"
...
        read_lock(&rt_hash_table[hash].lock);
        for (rth = rt_hash_table[hash].chain; rth; rth =
rth->u.rt_next) {
                if (rth->key.dst == daddr && <============ HERE!!!!
                    rth->key.src == saddr &&
                    rth->key.iif == iif &&
                    rth->key.oif == 0 &&
#ifdef CONFIG_IP_ROUTE_FWMARK
                    rth->key.fwmark == skb->nfmark &&
#endif
...
------------------------------------------------------------------------------

but, I don't know why happen oops(why "rth" is invalid value).
please help me.

Thank for your time

Lim Chae Hong

 
 
 

MPC855T + Linux kernel 2.4.18 + ppc patch + bridge patch = somtimes OOPS

Post by Wolfgang Den » Fri, 13 Dec 2002 08:41:36



Quote:>I have embedded powerpc board with ppc and bridge patched 2.4.18 linux
>kernel.
>(bridge patch file is downloaded from bridge.sourceforge.net)
>When I boot form this board, kernel oops message occasionally occured
>like below.
...
>but, I don't know why happen oops(why "rth" is invalid value).

Probably your ethernet driver is ready to receive packets and  starts
pushing  them  to  the  TCP/IP  stack  before  the  latter  has  been
initialized.

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88   Web: www.denx.de
There's no sense in being precise  when  you  don't  even  know  what
you're talking about.                             -- John von Neumann

 
 
 

MPC855T + Linux kernel 2.4.18 + ppc patch + bridge patch = somtimes OOPS

Post by Lim Chae Ho » Tue, 07 Jan 2003 15:10:35




> >I have embedded powerpc board with ppc and bridge patched 2.4.18 linux
> >kernel.
> >(bridge patch file is downloaded from bridge.sourceforge.net)
> >When I boot form this board, kernel oops message occasionally occured
> >like below.
>  ...
> >but, I don't know why happen oops(why "rth" is invalid value).

> Probably your ethernet driver is ready to receive packets and  starts
> pushing  them  to  the  TCP/IP  stack  before  the  latter  has  been
> initialized.

Ok, you're right.
Because I use serial console, function "printk()" can cause serial
interrupt. so, I am faced an unwanted situation "OOPS".
I solved this problem with changing printk() position in function
"src/net/ipv4/route.c, ip_rt_init()".

=========================================================================
--- net/ipv4/route.c.old        Mon Jan  6 14:18:34 2003

        if (!rt_hash_table)
                panic("Failed to allocate IP route cache hash table\n");

-       printk("IP: routing cache hash table of %u buckets, %ldKbytes\n",
-              rt_hash_mask,
-              (long) (rt_hash_mask * sizeof(struct rt_hash_bucket)) / 1024);
-
        for (rt_hash_log = 0; (1 << rt_hash_log) != rt_hash_mask; rt_hash_log++)
                /* NOTHING */;

                rt_hash_table[i].chain = NULL;
        }

+       printk("IP: routing cache hash table of %u buckets, %ldKbytes\n",
+              rt_hash_mask + 1,
+              (long) ((rt_hash_mask + 1) * sizeof(struct rt_hash_bucket)) / 1024);
+
        ipv4_dst_ops.gc_thresh = (rt_hash_mask + 1);
        ip_rt_max_size = (rt_hash_mask + 1) * 16;
=========================================================================

Thank you for your help.

Lim Chae Hong