From: "Peter Olsson" Subject: Kernel Oops with kernel 2.4.25 and iptables 1.2.9 in __unexpect_related Date: Tue, 15 Jun 2004 09:40:26 +0200 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <002401c452ac$06523580$7c01a8c0@std.visionutv.se> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0021_01C452BC.C9D4EB00" Return-path: To: Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_0021_01C452BC.C9D4EB00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable After running my firewall without any problems for about 90 days, I = suddenly got a Kernel Oops. When running it through ksymoops I received the result below. I've read a few comments about a bug in the newnat code in = unexpect_related, but what I can see this should be fixed a long time ago, and if I compare the = unexpect_related calls in the ip_conntrack_core.c from version 2.4.25 til 2.4.26 they work in exactly the same way. Could = there be something else causing this problem? I don't think it's hardware related, I've been using the = same hardware, but with kernel 2.4.27 for about a year before this happened, and it's been working really = good. Best regards, Peter Olsson ---- ksymoops on i686 2.4.25. Options used -V (specified) -k /proc/ksyms (default) -l /proc/modules (default) -o /lib/modules/2.4.25/ (default) -m /boot/System.map-2.4.25 (default) Unable to handle kernel NULL pointer dereference at virtual address = 00000004 printing eip: c026f410 *pde =3D 00000000 Oops: 0002 CPU: 0 EIP: 0010:[] Tainted: P Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010286 eax: 00000000 ebx: e1499a80 ecx: e1499a8c edx: 00000000 esi: f7c34b8c edi: f7c34b80 ebp: c2477380 esp: c036bcfc ds: 0018 es: 0018 ss: 0018 Process swapper (pid: 0, stackpage=3Dc036b000) Stack: 00000000 f7dd1000 e1499a80 c036a000 c036a000 c0271bc0 e1499a80 = e1499a80 c0272ee0 e1499a80 e1499a80 e6c9c500 f7c34b80 f7c34bc0 00000000 = c02704fd e6c9c500 c9648c80 cd6dd2d9 00000001 f7c34b80 c036bddc e6c9c500 = 020749d4 Call Trace: [] [] [] [] = [] [] [] [] [] [] = [] [] [] [] [] [] = [] [] [] [] [] [] = [] [] [] [] [] [] = [] Code: 89 50 04 89 02 8b 43 0c c7 03 00 00 00 00 c7 43 04 00 00 00 >>EIP; c026f410 <__unexpect_related+10/60> <=3D=3D=3D=3D=3D Trace; c0271bc0 Trace; c0272ee0 Trace; c02704fd Trace; c027067c Trace; c022fac6 Trace; c023d148 Trace; c023be60 Trace; c022f75e Trace; c023be60 Trace; c023be60 Trace; c022fa8f Trace; c023be60 Trace; c023bce6 Trace; c023be60 Trace; c0227889 Trace; c0222fbf Trace; c0227889 Trace; c0227985 Trace; f99a5f68 <[tg3]tg3_poll+f8/110> Trace; c0227adf Trace; c011dafb Trace; c0108bad Trace; c01052c0 Trace; c01052c0 Trace; c01052c0 Trace; c01052c0 Trace; c01052e9 Trace; c0105372 Trace; c0105000 <_stext+0/0> Code; c026f410 <__unexpect_related+10/60> 00000000 <_EIP>: Code; c026f410 <__unexpect_related+10/60> <=3D=3D=3D=3D=3D 0: 89 50 04 mov %edx,0x4(%eax) = <=3D=3D=3D=3D=3D Code; c026f413 <__unexpect_related+13/60> 3: 89 02 mov %eax,(%edx) Code; c026f415 <__unexpect_related+15/60> 5: 8b 43 0c mov 0xc(%ebx),%eax Code; c026f418 <__unexpect_related+18/60> 8: c7 03 00 00 00 00 movl $0x0,(%ebx) Code; c026f41e <__unexpect_related+1e/60> e: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) <0>Kernel panic: Aiee, killing interrupt handler! ---- This is the actual __unexpect_related code in my ip_contrack_core.c: static void __unexpect_related(struct ip_conntrack_expect *expect) { DEBUGP("unexpect_related(%p)\n", expect); MUST_BE_WRITE_LOCKED(&ip_conntrack_lock); =20 /* we're not allowed to unexpect a confirmed expectation! */ IP_NF_ASSERT(!expect->sibling); /* delete from global and local lists */ list_del(&expect->list); list_del(&expect->expected_list); /* decrement expect-count of master conntrack */ if (expect->expectant) expect->expectant->expecting--; ip_conntrack_expect_put(expect); } ------=_NextPart_000_0021_01C452BC.C9D4EB00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
After running my firewall without any = problems for=20 about 90 days, I suddenly got a Kernel Oops.
When running it through ksymoops I = received the=20 result below.
 
I've read a few comments about a bug in = the newnat=20 code in unexpect_related, but what I can see
this should be fixed a long time ago, = and if I=20 compare the unexpect_related calls in the = ip_conntrack_core.c
from version 2.4.25 til 2.4.26 they = work in exactly=20 the same way. Could there be something else causing
this problem? I don't think it's = hardware related,=20 I've been using the same hardware, but with kernel 2.4.27
for about a year before this happened, = and it's=20 been working really good.
 
Best regards,
 
Peter Olsson
 
----
 
ksymoops on i686 2.4.25.  Options=20 used
     -V = (specified)
     -k=20 /proc/ksyms (default)
     -l /proc/modules=20 (default)
     -o /lib/modules/2.4.25/=20 (default)
     -m /boot/System.map-2.4.25=20 (default)
 
Unable to handle kernel NULL pointer = dereference at=20 virtual address 00000004 printing eip:
c026f410
*pde =3D = 00000000
Oops:=20 0002
CPU:    0
EIP:   =20 0010:[<c026f410>]  Tainted: P
Using defaults from ksymoops = -t=20 elf32-i386 -a i386
EFLAGS: 00010286
eax: 00000000   ebx: = e1499a80     ecx:=20 e1499a8c       edx: 00000000
esi:=20 f7c34b8c   edi: f7c34b80     ebp:=20 c2477380       esp: c036bcfc
ds:=20 0018   es: 0018   ss: 0018
Process swapper (pid: = 0,=20 stackpage=3Dc036b000)
Stack: 00000000 f7dd1000 e1499a80 c036a000 = c036a000=20 c0271bc0 e1499a80 e1499a80
       c0272ee0 e1499a80 e1499a80 = e6c9c500=20 f7c34b80 f7c34bc0 00000000 = c02704fd
      =20 e6c9c500 c9648c80 cd6dd2d9 00000001 f7c34b80 c036bddc e6c9c500 = 020749d4
Call=20 Trace:    [<c0271bc0>] [<c0272ee0>]=20 [<c02704fd>] [<c027067c>] [<c022fac6>]
 =20 [<c023d148>] [<c023be60>] [<c022f75e>] = [<c023be60>]=20 [<c023be60>] [<c022fa8f>]
  [<c023be60>]=20 [<c023bce6>] [<c023be60>] [<c0227889>] = [<c0222fbf>]=20 [<c0227889>]
  [<c0227985>] [<f99a5f68>]=20 [<c0227adf>] [<c011dafb>] [<c0108bad>]=20 [<c01052c0>]
  [<c01052c0>] [<c01052c0>]=20 [<c01052c0>] [<c01052e9>] [<c0105372>]=20 [<c0105000>]
Code: 89 50 04 89 02 8b 43 0c c7 03 00 00 00 00 c7 = 43 04=20 00 00 00
 
>>EIP; c026f410=20 <__unexpect_related+10/60>   = <=3D=3D=3D=3D=3D
Trace; c0271bc0=20 <ip_conntrack_unexpect_related+30/70>
Trace; c0272ee0=20 <pptp_expectfn+90/b0>
Trace; c02704fd=20 <init_conntrack+40d/420>
Trace; c027067c=20 <ip_conntrack_in+16c/2a0>
Trace; c022fac6=20 <nf_hook_slow+106/180>
Trace; c023d148=20 <ip_forward+1f8/260>
Trace; c023be60=20 <ip_rcv_finish+0/20f>
Trace; c022f75e=20 <nf_iterate+2e/80>
Trace; c023be60=20 <ip_rcv_finish+0/20f>
Trace; c023be60=20 <ip_rcv_finish+0/20f>
Trace; c022fa8f=20 <nf_hook_slow+cf/180>
Trace; c023be60=20 <ip_rcv_finish+0/20f>
Trace; c023bce6 = <ip_rcv+3a6/3f0>
Trace;=20 c023be60 <ip_rcv_finish+0/20f>
Trace; c0227889=20 <netif_receive_skb+189/1c0>
Trace; c0222fbf=20 <alloc_skb+ef/1c0>
Trace; c0227889=20 <netif_receive_skb+189/1c0>
Trace; c0227985=20 <process_backlog+c5/180>
Trace; f99a5f68=20 <[tg3]tg3_poll+f8/110>
Trace; c0227adf=20 <net_rx_action+9f/160>
Trace; c011dafb=20 <do_softirq+6b/d0>
Trace; c0108bad = <do_IRQ+dd/f0>
Trace;=20 c01052c0 <default_idle+0/40>
Trace; c01052c0=20 <default_idle+0/40>
Trace; c01052c0 = <default_idle+0/40>
Trace;=20 c01052c0 <default_idle+0/40>
Trace; c01052e9=20 <default_idle+29/40>
Trace; c0105372 = <cpu_idle+52/70>
Trace;=20 c0105000 <_stext+0/0>
Code;  c026f410=20 <__unexpect_related+10/60>
00000000 = <_EIP>:
Code; =20 c026f410 <__unexpect_related+10/60>   = <=3D=3D=3D=3D=3D
  =20 0:   89 50=20 04            = ;     =20 mov    %edx,0x4(%eax)   = <=3D=3D=3D=3D=3D
Code; =20 c026f413 <__unexpect_related+13/60>
   3:   = 89=20 02            = ;        =20 mov    %eax,(%edx)
Code;  c026f415=20 <__unexpect_related+15/60>
   5:   8b 43=20 0c            = ;     =20 mov    0xc(%ebx),%eax
Code;  c026f418=20 <__unexpect_related+18/60>
   8:   c7 03 00 = 00 00=20 00         movl  =20 $0x0,(%ebx)
Code;  c026f41e=20 <__unexpect_related+1e/60>
   e:   c7 43 04 = 00 00=20 00 00      movl   = $0x0,0x4(%ebx)
 
 <0>Kernel panic: Aiee, = killing=20 interrupt handler!
----
 
This is the actual __unexpect_related = code in my=20 ip_contrack_core.c:
 
static void __unexpect_related(struct=20 ip_conntrack_expect = *expect)
{
       =20 DEBUGP("unexpect_related(%p)\n",=20 expect);
       =20 MUST_BE_WRITE_LOCKED(&ip_conntrack_lock); 
 
        /* we're=20 not allowed to unexpect a confirmed expectation!=20 */
       =20 IP_NF_ASSERT(!expect->sibling);
 
        /*=20 delete from global and local lists=20 */
       =20 list_del(&expect->list);
      &n= bsp;=20 list_del(&expect->expected_list);
 
        /*=20 decrement expect-count of master conntrack=20 */
        if=20 (expect->expectant)
        = ;       =20 expect->expectant->expecting--;
 
       =20 ip_conntrack_expect_put(expect);
}
 
------=_NextPart_000_0021_01C452BC.C9D4EB00--