From owner-freebsd-stable@FreeBSD.ORG Thu Oct 28 15:24:53 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2C08106566C; Thu, 28 Oct 2010 15:24:53 +0000 (UTC) (envelope-from petefrench@ticketswitch.com) Received: from constantine.ticketswitch.com (constantine.ticketswitch.com [IPv6:2002:57e0:1d4e:1::3]) by mx1.freebsd.org (Postfix) with ESMTP id 697888FC1D; Thu, 28 Oct 2010 15:24:53 +0000 (UTC) Received: from dilbert.rattatosk ([10.64.50.6] helo=dilbert.ticketswitch.com) by constantine.ticketswitch.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1PBULT-0003Ra-CD; Thu, 28 Oct 2010 16:24:51 +0100 Received: from petefrench by dilbert.ticketswitch.com with local (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PBULT-000NAu-BN; Thu, 28 Oct 2010 16:24:51 +0100 Date: Thu, 28 Oct 2010 16:24:51 +0100 Message-Id: To: to.my.trociny@gmail.com In-Reply-To: <86wrp3wj67.fsf@kopusha.home.net> From: Pete French Cc: pjd@FreeBSD.org, freebsd-stable@freebsd.org Subject: Re: hast vs ggate+gmirror sychrnoisation speed X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 15:24:53 -0000 > In hast_proto_send() we send header and then data. Couldn't it be that > remote_send and sync threads interfere and their packets are mixed? May be > some synchronization is needed here? Interesting - I haven't looked very closely at the code, but I didn't realise that more than one thread was in communication with the remote end. If that's true then theres always a possibility for mixed data if you are sending it in chunks surely ? > I set sleep(1) in hast_proto_send() between proto_send(header) and > proto_send(data). The error started to occur frequently. Where is the potential other write occuring ? I might try wrapping some locking round the calls to see what happens. -pete.