kern/67213: Kernel Panic on bootup from latest cvsup

HASHI Hiroaki hashiz at tomba.cskk-sv.co.jp
Sun Jun 27 12:14:11 PDT 2004


Hi.

I probably saw same bug.
And I tested a patch.

In "Re: kern/67213: Kernel Panic on bootup from latest cvsup" at Sat, 26 Jun 2004 20:00:39 GMT
 Giorgos Keramidas <keramida at ceid.upatras.gr>  wrote:
> The following reply was made to PR kern/67213; it has been noted by GNATS.
> 
> From: Giorgos Keramidas <keramida at ceid.upatras.gr>
> To: Bruce M Simpson <bms at freebsd.org>
> Cc: drew at corrupt.co.nz, bug-followup at freebsd.org
> Subject: Re: kern/67213: Kernel Panic on bootup from latest cvsup
> Date: Sat, 26 Jun 2004 22:07:26 +0300
> 
>  On 2004-06-23 06:55, Bruce M Simpson <bms at freebsd.org> wrote:
>  > State-Changed-From-To: open->feedback
>  > State-Changed-When: Wed Jun 23 06:54:39 GMT 2004
>  
>  > Please build a kernel with symbols and DDB, and obtain a full
>  > backtrace.

My kernel panic after run "ipf -y" command.

ipfilter was staticaly linked into my kernel.

kernel's backtrace:

tomba# gdb6 -k ./kernel.debug /var/crash/vmcore.17 
GNU gdb 20040525 [GDB v6.x for FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-portbld-freebsd5.2"...
panic: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x0
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc05282b2
stack pointer           = 0x10:0xd0c34964
frame pointer           = 0x10:0xd0c34964
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = resume, IOPL = 0
current process         = 451 (ipf)
trap number             = 12
panic: page fault

syncing disks, buffers remaining... 490 490 490 490 490 490 490 490 490 490 490 490 490 490 490 490 490 490 490 490 
giving up on 455 buffers
Uptime: 22s
Dumping 383 MB
 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 320 336 352 368
---
#0  doadump () at /home/sources/src/sys/kern/kern_shutdown.c:236
236             dumping++;
doadump () at /home/sources/src/sys/kern/kern_shutdown.c:236
236             dumping++;
(kgdb) bt
#0  doadump () at /home/sources/src/sys/kern/kern_shutdown.c:236
#1  0xc050da7c in boot (howto=256) at /home/sources/src/sys/kern/kern_shutdown.c:370
#2  0xc050dcba in panic (fmt=0xc06606b1 "%s")
    at /home/sources/src/sys/kern/kern_shutdown.c:548
#3  0xc063cdd0 in trap_fatal (frame=0xd0c34924, eva=0)
    at /home/sources/src/sys/i386/i386/trap.c:815
#4  0xc063c65d in trap (frame=
      {tf_fs = -1068236776, tf_es = -1066598384, tf_ds = -1051328496, tf_edi = 3, tf_esi = 0, tf_ebp = -792508060, tf_isp = -792508080, tf_ebx = -1066475424, tf_edx = -1053357664, tf_ecx = -1053357664, tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1068334414, tf_cs = 8, tf_eflags = 65606, tf_esp = -792508036, tf_ss = -1068470952})
    at /home/sources/src/sys/i386/i386/trap.c:250
#5  0xc062e9ba in calltrap () at /home/sources/src/sys/i386/i386/exception.s:140
#6  0xc0540018 in shutdown (td=0x0, uap=0x0)
    at /home/sources/src/sys/kern/uipc_syscalls.c:1305
#7  0xc0506d58 in _mtx_unlock_sleep (m=0x8, opts=0, 
    file=0xc0660e62 "/home/sources/src/sys/contrib/ipfilter/netinet/fil.c", line=2163)
    at /home/sources/src/sys/kern/kern_mutex.c:650
#8  0xc0506ada in _mtx_unlock_flags (m=0x0, opts=0, 
    file=0xc0660e62 "/home/sources/src/sys/contrib/ipfilter/netinet/fil.c", line=2163)
    at /home/sources/src/sys/kern/kern_mutex.c:343
#9  0xc0444ca9 in frsync () at /home/sources/src/sys/contrib/ipfilter/netinet/fil.c:2163
#10 0xc044611b in iplioctl (dev=0xc14d5200, cmd=2147775049, data=0xd0c34c60 "", mode=3, 
    td=0xc13709a0) at /home/sources/src/sys/contrib/ipfilter/netinet/ip_fil.c:882
#11 0xc04e0262 in spec_ioctl (ap=0xd0c34b88)
    at /home/sources/src/sys/fs/specfs/spec_vnops.c:357
#12 0xc04dfb6b in spec_vnoperate (ap=0x0)
    at /home/sources/src/sys/fs/specfs/spec_vnops.c:118
#13 0xc055cb17 in vn_ioctl (fp=0xc157e5d8, com=2147775049, data=0xd0c34c60, 
    active_cred=0xc133ae00, td=0xc13709a0) at vnode_if.h:503
#14 0xc0528f38 in ioctl (td=0xc13709a0, uap=0xd0c34d14) at file.h:258
#15 0xc063d047 in syscall (frame=
      {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = -1077940556, tf_esi = 2, tf_ebp = -1077940648, tf_isp = -792507020, tf_ebx = -1077940556, tf_edx = 121, tf_ecx = -1077940359, tf_eax = 54, tf_trapno = 12, tf_err = 2, tf_eip = 671914427, tf_cs = 31, tf_eflags = 658, tf_esp = -1077940676, tf_ss = 47}) at /home/sources/src/sys/i386/i386/trap.c:1004
#16 0xc062ea0f in Xint0x80_syscall () at /home/sources/src/sys/i386/i386/exception.s:201
#17 0x0000002f in ?? ()
#18 0x0000002f in ?? ()
#19 0x0000002f in ?? ()
#20 0xbfbfeeb4 in ?? ()
#21 0x00000002 in ?? ()
#22 0xbfbfee58 in ?? ()
#23 0xd0c34d74 in ?? ()
#24 0xbfbfeeb4 in ?? ()
#25 0x00000079 in ?? ()
#26 0xbfbfef79 in ?? ()
#27 0x00000036 in ?? ()
#28 0x0000000c in ?? ()
#29 0x00000002 in ?? ()
#30 0x280c99bb in ?? ()
#31 0x0000001f in ?? ()
#32 0x00000292 in ?? ()
#33 0xbfbfee3c in ?? ()
#34 0x0000002f in ?? ()
#35 0x00000000 in ?? ()
#36 0x00000000 in ?? ()
#37 0x00000000 in ?? ()
#38 0x00000000 in ?? ()
#39 0x108f7000 in ?? ()
#40 0xc148dc08 in ?? ()
#41 0xc1342c60 in ?? ()
#42 0xd0c34828 in ?? ()
#43 0xd0c34814 in ?? ()
#44 0xc13709a0 in ?? ()
#45 0xc051b5ac in sched_switch (td=0xbfbfeeb4)
    at /home/sources/src/sys/kern/sched_ule.c:1168
Previous frame inner to this frame (corrupt stack?)


>  Or update your sources to a newer version.  There were a few hiccups
>  during the last few days related to ipfilter too.  If you're seeing
>  ipf-related panics when IPFILTER is initialized at boot time, try this
>  patch for file `/usr/src/sys/contrib/ipfilter/netinet/fil.c':
>  
>  %%
>  Index: fil.c
>  ===================================================================
>  RCS file: /home/ncvs/src/sys/contrib/ipfilter/netinet/fil.c,v
>  retrieving revision 1.38
>  diff -u -r1.38 fil.c
>  --- fil.c	21 Jun 2004 22:46:35 -0000	1.38
>  +++ fil.c	24 Jun 2004 19:17:33 -0000
>  @@ -2155,9 +2155,6 @@
>   		ip_natsync(ifp);
>   		ip_statesync(ifp);
>   	}
>  -#  if defined(__FreeBSD_version) && (__FreeBSD_version >= 500043)
>  -	IFNET_RUNLOCK();
>  -#  endif
>   	ip_natsync((struct ifnet *)-1);
>   #  if defined(__FreeBSD_version) && (__FreeBSD_version >= 500043)
>   	IFNET_RUNLOCK();
>  %%

After applying this patch, ipfilter worked fine.

--
  HASHI, Hiroaki <hashiz at tomba.cskk-sv.co.jp>


More information about the freebsd-bugs mailing list