Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PF related panic



Joerg Sonnenberger wrote:

(See http://kuparinen.org/martti/tmp/pf1.png for a screenshot)

Backtrace? Or can you match the address to a source line with addr2line
if you have netbsd.gdb around?

I created a debug kernel

--- GENERIC     2009-10-28 11:03:42.000000000 +0200
+++ DEBUG       2009-11-12 07:58:42.000000000 +0200
@@ -90,4 +90,4 @@
 # Diagnostic/debugging support options
-#options       DIAGNOSTIC      # expensive kernel consistency checks
-#options       DEBUG           # expensive debugging checks/support
+options        DIAGNOSTIC      # expensive kernel consistency checks
+options        DEBUG           # expensive debugging checks/support
 #options       KMEMSTATS       # kernel memory statistics (vmstat -m)
@@ -104,3 +104,3 @@
 #options       KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600
-#makeoptions   DEBUG="-g"      # compile full symbol table
+makeoptions    DEBUG="-g"      # compile full symbol table
 #options       SYSCALL_STATS   # per syscall counts

I also rebuilt the PF module with -DDEBUG. The kernel crashes like this:

http://kuparinen.org/martti/tmp/pf2.png
http://kuparinen.org/martti/tmp/pf3.png
http://kuparinen.org/martti/tmp/pf4.png

# nm netbsd.gdb | grep pfil_run_hooks
ffffffff8052b1f0 T pfil_run_hooks

# addr2line -e netbsd.gdb ffffffff8052b1f0
../../../../net/pfil.c:59

Look correct, that's the beginning of the function. Next I added ffffffff8052b1f0 and 0xad and

# addr2line -e netbsd.gdb FFFFFFFF8052B29D
../../../../net/pfil.c:67

56 int
57 pfil_run_hooks(struct pfil_head *ph, struct mbuf **mp, struct ifnet *ifp,
58     int dir)
59 {
60         struct packet_filter_hook *pfh;
61         struct mbuf *m = NULL;
62         int rv = 0;
63
64         if ((dir & PFIL_ALL) && mp)
65                 m = *mp;
66         for (pfh = pfil_hook_get(dir, ph); pfh != NULL;
67              pfh = TAILQ_NEXT(pfh, pfil_link)) {
68                 if (pfh->pfil_func != NULL) {
69                         if (pfh->pfil_flags & PFIL_ALL) {
70                                 rv = (*pfh->pfil_func)(pfh->pfil_arg, &m, 
ifp,
71                                     dir);
72                                 if (rv != 0 || m == NULL)
73                                         break;
74                         } else {


Home | Main Index | Thread Index | Old Index