More pf work

Jan Lentfer Jan.Lentfer at web.de
Wed Nov 17 15:18:45 PST 2010


Am 17.11.2010 23:49, schrieb Samuel J. Greear:
It has been my experience that panic loops are typically caused by
calling a null function pointer. Turning off break to debugger will
get you a real trace in this case.
It would be great if someone who was more comfortable with kdb and
etc. could take a look at my patch on the tracker related to this.
That backtrace looks strange to me:

df386devel# kgdb kern.8 vmcore.8
GNU gdb (GDB) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-dragonfly".
For bug reporting instructions, please see:
<http://bugs.dragonflybsd.org/>...
Reading symbols from /var/crash/kern.8...done.

Unread portion of the kernel message buffer:
PF: enterinf pfunload()
PF: o1
PF: entering shutdown_pf()
PF: s0
PF: s1
PF: s2
PF: s3
PF: s4
PF: entering pf_commit_rules()
PF: r0
PF: r1
PF: r2
PF: r3
PF: r4
PF: entering pf_rm_rule()
PF: rmr0
PF: rmr1
PF: rmr2
PF: rmr3
PF: rmr4
PF: rmr5
PF: rmr6
PF: rmr7
PF: rmr8
PF: rmr9
PF: rmr10
PF: entering pfi_dynaddr_remove()
PF: rmr11
PF: entering pfi_dynaddr_remove()
PF: rmr12
PF: rmr17
PF: rmr18
PF: rmr19
PF: rmr20
PF: rmr21
PF: r4.1
PF: r4.2
PF: r4.3
PF: r4.4
PF: r4.5
PF: r4.6
PF: r5
PF: s4.1
PF: entering pf_commit_rules()
PF: r0
PF: r1
PF: r2
PF: r3
PF: r4
PF: r4.1
PF: r4.2
PF: r4.3
PF: r4.4
PF: r4.5
PF: r4.6
PF: r5
PF: s4.2
PF: entering pf_commit_rules()
PF: r0
PF: r1
PF: r2
PF: r3
PF: r4
PF: entering pf_rm_rule()
PF: rmr0
PF: rmr1
PF: rmr2
PF: rmr3
PF: rmr4
PF: rmr5
PF: rmr6
PF: rmr7
PF: rmr8
PF: rmr9
PF: rmr10
PF: entering pfi_dynaddr_remove()
PF: dynrm0
PF: dynrm1
PF: dynrm2
PF: dynrm3
PF: entering pfr_detach_table()
pfr_detach_table before pfr_setflags_ktable()
PF: entering pfr_setflags_ktable()
PF: entering pfr_setflags_ktable()
PF: pfr_destroy_ktable()
PF: pfr_destroy_ktable p1
PF: entering pfr_enqueue_addrs()
PF: pfr_enqueue_addrs p1
PF: pfr_enqueue_addrs p2
PF: pfr_enqueue_addrs p3
PF: pfr_enqueue_addrs p4
PF: pfr_enqueue_addrs p5
PF: pfr_enqueue_addrs p6
PF: pfr_enqueue_addrs p7
PF: pfr_destroy_ktable p2
PF: pfr_destroy_ktable p3
PF: pfr_destroy_ktable p4
PF: pfr_destroy_ktable p5
PF: pfr_destroy_ktable p6
PF: pfr_destroy_ktable p9
PF: pfr_destroy_ktable p10
PF: pfr_destroy_ktable p11
PF: pfr_destroy_ktable()
PF: pfr_destroy_ktable p1
PF: entering pfr_enqueue_addrs()
PF: pfr_enqueue_addrs p1
PF: pfr_enqueue_addrs p2
PF: pfr_enqueue_addrs p3
PF: pfr_enqueue_addrs p4
Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xdeadc0de
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xdeadc0de
stack pointer           = 0x10:0xd1f036f4
frame pointer           = 0x10:0xd1f03720
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 4524 (kldunload)
current thread          = pri 10 (CRIT)
trap number             = 12
panic: page fault
Trace beginning at frame 0xd1f03604
panic(ffffffff) at panic+0xe8
panic(c05a44e9,c05d24f0,0,0,fffff) at panic+0xe8
trap_fatal(deadc0de,0,c07264e0,cea11158,0) at trap_fatal+0x2d7
trap_pfault(ce9de7e0,cea11158,0,2,cea1128c) at trap_pfault+0x122
trap(d1f036ac) at trap+0x416
calltrap() at calltrap+0xd
--- trap 0, eip = 0, esp = 0xd1f036f0, ebp = 0xd1f1e4e0 ---
(null)(0,0,0,0,0) at 0
Uptime: 8m40s
Physical memory: 1015 MB
Dumping 197 MB: 182 166 150 134 118 102 86 70 54 38 22 6
Reading symbols from /boot/kernel/acpi.ko...done.
Loaded symbols for /boot/kernel/acpi.ko
Reading symbols from /boot/kernel/ahci.ko...done.
Loaded symbols for /boot/kernel/ahci.ko
Reading symbols from /boot/kernel/ehci.ko...done.
Loaded symbols for /boot/kernel/ehci.ko
Reading symbols from /boot/kernel/pf.ko...done.
Loaded symbols for /boot/kernel/pf.ko
_get_mycpu (di=0xc06d63e0) at ./machine/thread.h:83
83          __asm ("movl %%fs:globaldata,%0" : "=r" (gd) : 
"m"(__mycpu__dummy));
(kgdb) backtrace
#0  _get_mycpu (di=0xc06d63e0) at ./machine/thread.h:83
#1  md_dumpsys (di=0xc06d63e0) at 
/home/lentferj/repo/src/sys/platform/pc32/i386/dump_machdep.c:263
#2  0xc03105c1 in dumpsys () at 
/home/lentferj/repo/src/sys/kern/kern_shutdown.c:881
#3  0xc0310b30 in boot (howto=260) at 
/home/lentferj/repo/src/sys/kern/kern_shutdown.c:388
#4  0xc0310cb0 in panic (fmt=0xc05a44e9 "%s") at 
/home/lentferj/repo/src/sys/kern/kern_shutdown.c:787
#5  0xc0557834 in trap_fatal (frame=0xd1f036ac, eva=<value optimized 
out>) at /home/lentferj/repo/src/sys/platform/pc32/i386/trap.c:1125
#6  0xc0557968 in trap_pfault (frame=0xd1f036ac, usermode=0, 
eva=3735929054) at 
/home/lentferj/repo/src/sys/platform/pc32/i386/trap.c:1026
#7  0xc0557df8 in trap (frame=0xd1f036ac) at 
/home/lentferj/repo/src/sys/platform/pc32/i386/trap.c:707
#8  0xc05472b7 in calltrap () at 
/home/lentferj/repo/src/sys/platform/pc32/i386/exception.s:785
#9  0xdeadc0de in ?? ()
#10 0x850cc483 in ?? ()
#11 0x680d74c0 in ?? ()
#12 0xd272ec98 in ?? () from /boot/kernel/pf.ko
#13 0xc07165e8 in baddynamicports ()
#14 0x04c483ed in ?? ()
#15 0x72fa6d68 in ?? ()
#16 0x7158e8d2 in ?? ()
#17 0x968bedc0 in ?? ()
#18 0x000004c0 in ?? ()
#19 0x8504c483 in ?? ()
#20 0x8d2174d2 in ?? ()
---Type <return> to continue, or q <return> to quit---
---Type <return> to continue, or q <return> to quit---#21 0x6850e445 in 
?? ()
#22 0xd272b5c1 in pfr_clr_tables (filter=0xd1f1e4e0, ndel=0xd1f0373c, 
flags=0) at /home/lentferj/repo/src/sys/net/pf/pf_table.c:1172
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

--
professional: http://www.oscar-consult.de
private: http://neslonek.homeunix.org/drupal/





More information about the Kernel mailing list