Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2013 15:30:26 +1100 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        "Alexander V. Chernikov" <melifaro@freebsd.org>
Cc:        freebsd-ipfw <freebsd-ipfw@freebsd.org>, Luigi Rizzo <rizzo@iet.unipi.it>, freebsd-stable <freebsd-stable@freebsd.org>, =?UTF-8?B?w5Z6a2FuIEtJUklL?= <ozkan.kirik@gmail.com>
Subject:   Re: ipfw table add problem
Message-ID:  <20131125152238.S78756@sola.nimnet.asn.au>
In-Reply-To: <529259DE.2040701@FreeBSD.org>
References:  <CAAcX-AGDZbFn5RmhLBBn2PPWRPcsFUnea5MgTc7nuXGD8Ge53A@mail.gmail.com> <52911993.8010108@ipfw.ru> <CAAcX-AEt_i8RUfmMy6WLnER0X=uLk5A1=oj911k-nyMJEghRLw@mail.gmail.com> <529259DE.2040701@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 24 Nov 2013 23:56:14 +0400, Alexander V. Chernikov wrote:
 > On 24.11.2013 19:43, Özkan KIRIK wrote:
 > > Hi,
 > > 
 > > I tested patch. This patch solves, ipfw table 1 add 4899
 > Ok. So I'll commit this fix soon.
 > > 
 > > But, ipfw table 1 add 10.2.3.01 works incorrectly.
 > > output is below.
 > > # ./ipfw table 1 flush
 > > # ./ipfw table 1 add 10.2.3.01
 > inet_pton() does not recognize this as valid IPv4 address, so it is
 > treated as usigned unteger key. It looks like this behavior is mentioned
 > in STANDARDS section.
 > > # ./ipfw table 1 list
 > > 0.0.0.10/32 0

I'm wondering if "so don't do that" is really sufficient to deal with 
this?  If it's not recognised as a valid address, shouldn't it fail to 
add anything, with a complaint?  I don't see how a string containing 
dots can be seen as a valid unsigned integer?

cheers, Ian
From owner-freebsd-stable@FreeBSD.ORG  Mon Nov 25 08:32:18 2013
Return-Path: <owner-freebsd-stable@FreeBSD.ORG>
Delivered-To: freebsd-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id 753918F5;
 Mon, 25 Nov 2013 08:32:18 +0000 (UTC)
Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72])
 by mx1.freebsd.org (Postfix) with ESMTP id 3E33F24D7;
 Mon, 25 Nov 2013 08:32:18 +0000 (UTC)
Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149])
 by mail.dawidek.net (Postfix) with ESMTPSA id 5E106411;
 Mon, 25 Nov 2013 09:25:45 +0100 (CET)
Date: Mon, 25 Nov 2013 09:32:23 +0100
From: Pawel Jakub Dawidek <pjd@FreeBSD.org>
To: Mikolaj Golub <trociny@FreeBSD.org>
Subject: Re: Hast locking up under 9.2
Message-ID: <20131125083223.GE1398@garage.freebsd.pl>
References: <20131121203711.GA3736@gmail.com>
 <E1Vjokn-000OuU-1Y@dilbert.ingresso.co.uk>
 <20131123215950.GA17292@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature"; boundary="WplhKdTI2c8ulnbP"
Content-Disposition: inline
In-Reply-To: <20131123215950.GA17292@gmail.com>
X-OS: FreeBSD 10.0-CURRENT amd64
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: freebsd-stable@freebsd.org, Pete French <petefrench@ingresso.co.uk>
X-BeenThere: freebsd-stable@freebsd.org
X-Mailman-Version: 2.1.16
Precedence: list
List-Id: Production branch of FreeBSD source code <freebsd-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-stable>,
 <mailto:freebsd-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-stable/>;
List-Post: <mailto:freebsd-stable@freebsd.org>
List-Help: <mailto:freebsd-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-stable>,
 <mailto:freebsd-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Nov 2013 08:32:18 -0000


--WplhKdTI2c8ulnbP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 23, 2013 at 11:59:51PM +0200, Mikolaj Golub wrote:
> On Fri, Nov 22, 2013 at 11:18:29AM +0000, Pete French wrote:
>=20
> > "Assertion failed: (!hio->hio_done), function write_complete, file
> >  /usr/src/sbin/hastd/primary.c, line 1130."
>=20
> It looks like write_complete usage (which should be called once per
> write request) for memsync is racy.
>=20
> Consider the following scenario:
>=20
> 1) remote_recv_thread: memsync ack received, refcount -> 2;
> 2) local_send_thread: local write completed, refcount -> 1, entering
>    write_complete()
> 3) remote_recv_thread: memsync fin received, refcount -> 0, move hio
>    to done queue, ggate_send_thread gets the hio, checks for
>    !hio->hio_done and (if loca_send_thread is still in
>    write_complete()) entering write_complete()

I don't see how is that possible. The write_complete() function is
called only when hio_countdown goes from 2 to 1 and because this is
atomic operation it can only happen in one thread. Can you elaborate on
how calling write_complete() concurrently for the same request is
possible?

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://mobter.com

--WplhKdTI2c8ulnbP
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iEYEARECAAYFAlKTCxcACgkQForvXbEpPzQmGwCaA5vKu0Jo/FrPxvpYDZiJydk2
JTQAoNctwZNEWmgY14oXdxJBrinujWVN
=Qm2c
-----END PGP SIGNATURE-----

--WplhKdTI2c8ulnbP--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131125152238.S78756>