From owner-freebsd-current@FreeBSD.ORG Sun Jun 1 02:30:45 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 577E337B401; Sun, 1 Jun 2003 02:30:45 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B90E43FE3; Sun, 1 Jun 2003 02:28:04 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.8p1/8.12.3) with ESMTP id h519QYQg004401; Sun, 1 Jun 2003 02:26:34 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.8p1/8.12.3/Submit) id h519QYcR004400; Sun, 1 Jun 2003 02:26:34 -0700 (PDT) (envelope-from rizzo) Date: Sun, 1 Jun 2003 02:26:34 -0700 From: Luigi Rizzo To: ticso@cicely.de Message-ID: <20030601022633.A4287@xorpc.icir.org> References: <3ED94166.7070300@btc.adaptec.com> <20030531173958.C91048@xorpc.icir.org> <20030601013256.GH503@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030601013256.GH503@cicely12.cicely.de>; from ticso@cicely12.cicely.de on Sun, Jun 01, 2003 at 03:32:56AM +0200 cc: Scott Long cc: Robert Watson cc: current@freebsd.org Subject: Re: 5.1-RELEASE TODO X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2003 09:30:45 -0000 On Sun, Jun 01, 2003 at 03:32:56AM +0200, Bernd Walter wrote: ... > :) > And I hoped a programmer who knows the source could find out and fix > very quickly. sorry, i missed the offending line number in your previous email. I think i missed a & in all the first arguments to bcopy in the src/sbin/ipfw2.c changes :( this happens at lines 818, 1224, 1461 and 1701. Fortunately the kernel part seems correct. In detail, the fix should be the following: 818: - bcopy(rule->next_rule, &set_disable, sizeof(set_disable)); + bcopy(&rule->next_rule, &set_disable, sizeof(set_disable)); 1224: - bcopy(d->rule, &rulenum, sizeof(rulenum)); + bcopy(&d->rule, &rulenum, sizeof(rulenum)); 1461: - bcopy(((struct ip_fw *)data)->next_rule, + bcopy(&((struct ip_fw *)data)->next_rule, 1701: - bcopy(d->rule, &rulenum, sizeof(rulenum)); + bcopy(&d->rule, &rulenum, sizeof(rulenum)); thanks luigi > To be honest - I did not investigate the reason for the failure as > there were other things on my todo list. > Well after getting some sleep I will check that again. > > Nevertheless here are the stack traces again - in case someone else can > identify the cause in the meantime: > cicely12# ipfw flush > Are you sure? [yn] y > > Flushed all rules. > cicely12# ipfw show > Segmentation fault (core dumped) > cicely12# May 23 17:09:50 cicely12 kernel: pid 601 (ipfw), uid 0: exited on signal 11 (core dumped) > cicely12# gdb /usr/obj/var/d3/FreeBSD-2003-05-22/src/sbin/ipfw/ipfw ipfw.core > GNU gdb 5.2.1 (FreeBSD) > Copyright 2002 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 "alpha-undermydesk-freebsd"... > Core was generated by `ipfw'. > Program terminated with signal 11, Segmentation fault. > #0 0x120044794 in bcopy () > (gdb) bt > #0 0x120044794 in bcopy () > #1 0x120001564 in show_ipfw (rule=0x1200ac000, pcwidth=3, bcwidth=5) > at /var/d3/FreeBSD-2003-05-22/src/sbin/ipfw/ipfw2.c:818 > (gdb) > > cicely12# ipfw add allow ip from any to any > Segmentation fault (core dumped) > cicely12# May 23 17:13:40 cicely12 kernel: pid 644 (ipfw), uid 0: exited on signal 11 (core dumped) > cicely12# gdb /usr/obj/var/d3/FreeBSD-2003-05-22/src/sbin/ipfw/ipfw ipfw.core > GNU gdb 5.2.1 (FreeBSD) > Copyright 2002 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 "alpha-undermydesk-freebsd"... > Core was generated by `ipfw'. > Program terminated with signal 11, Segmentation fault. > #0 0x120044794 in bcopy () > (gdb) bt > #0 0x120044794 in bcopy () > #1 0x120001564 in show_ipfw (rule=0x120099cb0, pcwidth=10, bcwidth=10) > at /var/d3/FreeBSD-2003-05-22/src/sbin/ipfw/ipfw2.c:818 > warning: Hit beginning of text section without finding > warning: enclosing function for address 0x8 > This warning occurs if you are debugging a function without any symbols > (for example, in a stripped executable). In that case, you may wish to > increase the size of the search with the `set heuristic-fence-post' command. > > Otherwise, you told GDB there was a function where there isn't one, or > (more likely) you have encountered a bug in GDB. > (gdb) > > -- > B.Walter BWCT http://www.bwct.de > ticso@bwct.de info@bwct.de >