From owner-freebsd-pf@FreeBSD.ORG Wed May 23 22:08:19 2012 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11BD7106566B; Wed, 23 May 2012 22:08:19 +0000 (UTC) (envelope-from Joerg.Pulz@frm2.tum.de) Received: from mailhost.frm2.tum.de (mailhost.frm2.tum.de [129.187.179.12]) by mx1.freebsd.org (Postfix) with ESMTP id 607338FC08; Wed, 23 May 2012 22:08:18 +0000 (UTC) Received: from mailhost.frm2.tum.de (localhost [127.0.0.1]) by mailhost.frm2.tum.de (8.14.4/8.14.4) with ESMTP id q4NM72ab000246; Thu, 24 May 2012 00:07:02 +0200 (CEST) (envelope-from Joerg.Pulz@frm2.tum.de) X-Virus-Scanned: at mailhost.frm2.tum.de Received: from hades.admin.frm2 (hades.admin.frm2 [172.25.1.10]) (authenticated bits=0) by mailhost.frm2.tum.de (8.14.4/8.14.4) with ESMTP id q4NM6v87000242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 24 May 2012 00:07:00 +0200 (CEST) (envelope-from Joerg.Pulz@frm2.tum.de) Date: Thu, 24 May 2012 00:06:54 +0200 (CEST) From: Joerg Pulz To: Daniel Hartmeier In-Reply-To: <20120523202202.GH29536@insomnia.benzedrine.cx> Message-ID: References: <201205231950.q4NJo4m1088701@freefall.freebsd.org> <20120523202202.GH29536@insomnia.benzedrine.cx> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="3469798045-489758976-1337810639=:24195" Content-ID: X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (mailhost.frm2.tum.de [129.187.179.12]); Thu, 24 May 2012 00:07:00 +0200 (CEST) Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-pf@freebsd.org Subject: Re: kern/168190: [pf] panic when using pf and route-to (maybe: bad fragment handling?) X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2012 22:08:19 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --3469798045-489758976-1337810639=:24195 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT Content-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: On Wed, 23 May 2012, Daniel Hartmeier wrote: > On Wed, May 23, 2012 at 07:50:04PM +0000, Joerg Pulz wrote: > >> Let me know if you need more output. > > Oh, we can identify the pfil hook by printing *pfh, pfh->pfil_func and > comparing the address to that of pf_check_out, fr_check_wrapper, and the > one for ipfw, right? Danniel, here is what i could get out. I was unable to print *pfh and pfh->pfil_func, but i printed the other two and *ph, maybe this helps. Joerg #### kgdb.out_assert2 GNU gdb 6.1.1 [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 "amd64-marcel-freebsd"... Unread portion of the kernel message buffer: panic: ASSERT_HOST_BYTE_ORDER cpuid = 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2a kdb_backtrace() at kdb_backtrace+0x37 panic() at panic+0x182 pfil_run_hooks() at pfil_run_hooks+0x159 ip_output() at ip_output+0x6de ip_forward() at ip_forward+0x19e ip_input() at ip_input+0x670 swi_net() at swi_net+0x15a intr_event_execute_handlers() at intr_event_execute_handlers+0x66 ithread_loop() at ithread_loop+0xaf fork_exit() at fork_exit+0x12a fork_trampoline() at fork_trampoline+0xe - --- trap 0, rip = 0, rsp = 0xffffff8000241d00, rbp = 0 --- KDB: enter: panic Dumping 585 out of 4077 MB:..3%..11%..22%..31%..41%..52%..61%..72%..82%..91% Reading symbols from /boot/kernel/geom_mirror.ko...Reading symbols from /boot/kernel/geom_mirror.ko.symbols...done. done. Loaded symbols for /boot/kernel/geom_mirror.ko Reading symbols from /boot/kernel/ipmi.ko...Reading symbols from /boot/kernel/ipmi.ko.symbols...done. done. Loaded symbols for /boot/kernel/ipmi.ko #0 doadump (textdump=0) at pcpu.h:224 224 __asm("movq %%gs:0,%0" : "=r" (td)); (kgdb) up 10 #10 0xffffffff8074b325 in pfil_run_hooks (ph=0xfffffe000581f880, mp=0xffffff8000241978, ifp=0xfffffe0003002000, dir=2, inp=0x0) at /usr/src/sys/net/pfil.c:89 89 ASSERT_HOST_BYTE_ORDER(m); (kgdb) list 84 ASSERT_HOST_BYTE_ORDER(m); 85 rv = (*pfh->pfil_func)(pfh->pfil_arg, &m, ifp, dir, 86 inp); 87 if (rv != 0 || m == NULL) 88 break; 89 ASSERT_HOST_BYTE_ORDER(m); 90 } 91 } 92 PFIL_RUNLOCK(ph, &rmpt); 93 *mp = m; (kgdb) p *pfh (kgdb) p pfh->pfil_func (kgdb) p pf_check_out $1 = {int (void *, struct mbuf **, struct ifnet *, int, struct inpcb *)} 0xffffffff8032d17a (kgdb) p fr_check_wrapper $2 = {int (void *, struct mbuf **, struct ifnet *, int)} 0xffffffff802fae2d (kgdb) p *ph $3 = {ph_in = {tqh_first = 0xfffffe0003007b40, tqh_last = 0xfffffe000581fb00}, ph_out = {tqh_first = 0xffffffff80779733, tqh_last = 0x0}, ph_type = 92404512, ph_nhooks = -512, ph_lock = {lock_object = { lo_name = 0xfffffe0003007ae0 " ø\201\005", lo_flags = 2155321139, lo_data = 4294967295, lo_witness = 0x0}, rm_writecpus = {__bits = { -2198926812672}}, rm_activeReaders = {lh_first = 0xfffffe0005bf9b00}, _rm_lock = {_rm_lock_mtx = {lock_object = { lo_name = 0x1
, lo_flags = 0, lo_data = 0, lo_witness = 0xfffffe000589f800}, mtx_lock = 18446741874779218176}, _rm_lock_sx = {lock_object = { lo_name = 0x1
, lo_flags = 0, lo_data = 0, lo_witness = 0xfffffe000589f800}, sx_lock = 18446741874779218176}}}, ph_un = {phu_val = 0, phu_ptr = 0x0}, ph_list = {le_next = 0x0, le_prev = 0xfffffe000581f800}} (kgdb) #### kgdb.out_assert2 - -- The beginning is the most important part of the work. -Plato -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFPvV+BSPOsGF+KA+MRAudvAJ4kQQl4isOAkmVCvzcj1ipGEagbwACgkhhO Ib9Dfbm6bUJcUHS6yBcbrQU= =FnJL -----END PGP SIGNATURE----- --3469798045-489758976-1337810639=:24195--