From owner-freebsd-stable@freebsd.org Fri Mar 18 12:32:46 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F514AD5A9F for ; Fri, 18 Mar 2016 12:32:46 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 4B5FC1D01 for ; Fri, 18 Mar 2016 12:32:46 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: by mailman.ysv.freebsd.org (Postfix) id 470D4AD5A9E; Fri, 18 Mar 2016 12:32:46 +0000 (UTC) Delivered-To: stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46AEBAD5A9D for ; Fri, 18 Mar 2016 12:32:46 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07EF61D00 for ; Fri, 18 Mar 2016 12:32:46 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1agtZx-000BoY-EY; Fri, 18 Mar 2016 15:32:33 +0300 Date: Fri, 18 Mar 2016 15:32:33 +0300 From: Slawa Olhovchenkov To: Giuseppe Lettieri Cc: Luigi Rizzo , Adrian Chadd , "stable@freebsd.org" Subject: Re: 82576 + NETMAP + VLAN Message-ID: <20160318123233.GV70809@zxy.spb.ru> References: <56B9E398.1060105@iet.unipi.it> <20160210115937.GA37895@zxy.spb.ru> <56BB3C20.600@iet.unipi.it> <20160210135318.GL68298@zxy.spb.ru> <56BC505F.7080309@iet.unipi.it> <20160211133428.GM68298@zxy.spb.ru> <56C1EA66.807@iet.unipi.it> <20160215151318.GQ68298@zxy.spb.ru> <56C1F69C.5010004@iet.unipi.it> <20160215214446.GE68298@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160215214446.GE68298@zxy.spb.ru> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2016 12:32:46 -0000 On Tue, Feb 16, 2016 at 12:44:46AM +0300, Slawa Olhovchenkov wrote: > On Mon, Feb 15, 2016 at 05:02:36PM +0100, Giuseppe Lettieri wrote: > > > Il 15/02/2016 16:13, Slawa Olhovchenkov ha scritto: > > > On Mon, Feb 15, 2016 at 04:10:30PM +0100, Giuseppe Lettieri wrote: > > > > > >> Hi Slawa, > > >> > > >> I think WITNESS is seeing a false positive, since those two are always > > >> different mutexes. > > >> > > >> The actual deadlock you experience should be caused by something else. I > > > > > > Are you sure? When deadlock occur I am see threads waiting on nm_kn_lock. > > > > The deadlock I mentioned still involves nm_kn_locks, sorry if I was not > > clear about that. I am just saying that we never try to take the same > > lock that we already holding. > > > > Nonetheless, there are indeed problems in the path that WITNESS has > > seen. The problem is that pipes have to notify the other end while > > called by kevent. kevent holds the nm_kn_lock on the TX src ring and the > > notification takes the nm_kn_lock on the RX dst ring. > > Can you comment other issuses? Is this by design or is this bug? Do you commit this fix? > - with kevent sync for transmiting need first register > EVFILT_WRITE/EV_DISABLE and after every write > EVFILT_WRITE/EV_DISPATCH > > - with kevent sync all opening /dev/netmap and registering need do > from same thread as kevent using for sinc (unless no RX/TX). >